diff --git a/docs/package.json b/docs/package.json index 91535c98..19dd8edc 100644 --- a/docs/package.json +++ b/docs/package.json @@ -9,6 +9,7 @@ }, "dependencies": { "@element-plus/icons-vue": "^2.0.9", + "@tmagic/element-plus-adapter": "1.2.0-beta.2", "@tmagic/form": "1.2.0-beta.2", "@tmagic/schema": "1.2.0-beta.2", "@tmagic/utils": "1.2.0-beta.2", diff --git a/docs/src/.vuepress/client.ts b/docs/src/.vuepress/client.ts index 0cf72c1e..c0480c48 100644 --- a/docs/src/.vuepress/client.ts +++ b/docs/src/.vuepress/client.ts @@ -4,6 +4,7 @@ import 'highlight.js/styles/github.css'; import './polyfills'; import { defineClientConfig } from '@vuepress/client'; import ElementPlus from 'element-plus'; +import MagicElementPlusAdapter from '@tmagic/element-plus-adapter'; import MagicForm from '@tmagic/form'; import DemoBlock from './demo-block.vue'; @@ -11,6 +12,7 @@ export default defineClientConfig({ enhance({ app, router, siteData }) { app.use(ElementPlus); app.use(MagicForm, { + uiAdapter: MagicElementPlusAdapter, request: (options: any) => new Promise((resolve) => { if (options.url === 'select/remote') { setTimeout(() => { diff --git a/docs/src/.vuepress/config.ts b/docs/src/.vuepress/config.ts index ae4cf3d4..63f28948 100644 --- a/docs/src/.vuepress/config.ts +++ b/docs/src/.vuepress/config.ts @@ -228,6 +228,7 @@ export default defineUserConfig({ { find: /^@tmagic\/form/, replacement: path.join(__dirname, '../../../packages/form/src/index.ts') }, { find: /^@tmagic\/utils/, replacement: path.join(__dirname, '../../../packages/utils/src/index.ts') }, { find: /^@tmagic\/schema/, replacement: path.join(__dirname, '../../../packages/schema/src/index.ts') }, + { find: /^@tmagic\/element-plus-adapter/, replacement: path.join(__dirname, '../../../packages/element-plus-adapter/src/index.ts') }, ] }, // @ts-expect-error: vite 还没有给 ssr 配置项提供类型 diff --git a/docs/src/api/form-config/layout.md b/docs/src/api/form-config/layout.md index 8bdc450e..e902728b 100644 --- a/docs/src/api/form-config/layout.md +++ b/docs/src/api/form-config/layout.md @@ -19,7 +19,7 @@