From b9248498ebb1169669772a38c68a7b57560782e0 Mon Sep 17 00:00:00 2001 From: roymondchen Date: Wed, 22 Mar 2023 15:29:53 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=E6=95=99=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/guide/tutorial/hello-world.md | 7 ++++++- docs/guide/tutorial/runtime.md | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/guide/tutorial/hello-world.md b/docs/guide/tutorial/hello-world.md index 13576e5b..38c9cf1d 100644 --- a/docs/guide/tutorial/hello-world.md +++ b/docs/guide/tutorial/hello-world.md @@ -51,7 +51,7 @@ cd hello-world ## 添加依赖 ```bash -npm install --save @tmagic/editor @tmagic/form @tmagic/stage element-plus +npm install --save @tmagic/editor @tmagic/form @tmagic/stage @tmagic/design @tmagic/element-plus-adapter element-plus ``` ## 注册组件 @@ -66,13 +66,16 @@ import '@tmagic/form/dist/style.css'; import { createApp } from 'vue'; import ElementPlus from 'element-plus'; +import TMagicDesign from '@tmagic/design'; import TMagicEditor from '@tmagic/editor'; +import TMagicElementPlusAdapter from '@tmagic/element-plus-adapter'; import TMagicForm from '@tmagic/form'; import App from './App.vue'; createApp(App) .use(ElementPlus) + .use(TMagicDesign, TMagicElementPlusAdapter) .use(TMagicEditor) .use(TMagicForm) .mount('#app'); @@ -157,6 +160,8 @@ api详情:[modelValue](../../api/editor/props.md#modelvalue-v-model) ```ts const value = ref({ type: 'app', + // 必须加上ID,这个id可能是数据库生成的key,也可以是生成的uuid + id: 1, items: [], }); ``` diff --git a/docs/guide/tutorial/runtime.md b/docs/guide/tutorial/runtime.md index 5ba1a5ed..ec411055 100644 --- a/docs/guide/tutorial/runtime.md +++ b/docs/guide/tutorial/runtime.md @@ -97,6 +97,8 @@ npm run serve -- --port=8078 const value = ref({ type: 'app', + // 必须加上ID,这个id可能是数据库生成的key,也可以是生成的uuid + id: 1, items: [], });