mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-11-29 22:12:11 +08:00
fix(element-plus-adapter): 构建时将vue源码构建入目标代码中,导致页面存在多个版本vue
This commit is contained in:
parent
849b4dc319
commit
bb7ec0aa1b
@ -37,6 +37,7 @@
|
||||
"peerDependencies": {
|
||||
"@tmagic/design": "workspace:*",
|
||||
"element-plus": ">=2.9.0",
|
||||
"vue": "catalog:",
|
||||
"typescript": "catalog:"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
|
||||
@ -50,19 +50,19 @@ globalThis.MonacoEnvironment = {
|
||||
},
|
||||
};
|
||||
|
||||
const adpter = sessionStorage.getItem('tmagic-playground-ui-adapter') || 'element-plus';
|
||||
const adapter = sessionStorage.getItem('tmagic-playground-ui-adapter') || 'element-plus';
|
||||
|
||||
let adpterModule;
|
||||
let adapterModule;
|
||||
|
||||
if (adpter === 'tdesign-vue-next') {
|
||||
if (adapter === 'tdesign-vue-next') {
|
||||
import('tdesign-vue-next/es/style/index.css');
|
||||
adpterModule = import('@tmagic/tdesign-vue-next-adapter');
|
||||
adapterModule = import('@tmagic/tdesign-vue-next-adapter');
|
||||
} else {
|
||||
import('element-plus/dist/index.css');
|
||||
adpterModule = import('@tmagic/element-plus-adapter');
|
||||
adapterModule = import('@tmagic/element-plus-adapter');
|
||||
}
|
||||
|
||||
adpterModule.then((module: any) => {
|
||||
adapterModule.then((module: any) => {
|
||||
const app = createApp(App);
|
||||
app.use(router);
|
||||
app.use(editorPlugin, module.default);
|
||||
|
||||
3
pnpm-lock.yaml
generated
3
pnpm-lock.yaml
generated
@ -390,6 +390,9 @@ importers:
|
||||
typescript:
|
||||
specifier: 'catalog:'
|
||||
version: 5.9.3
|
||||
vue:
|
||||
specifier: 'catalog:'
|
||||
version: 3.5.24(typescript@5.9.3)
|
||||
|
||||
packages/form:
|
||||
dependencies:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user