From d7504a95fcde8cdca1754177efdbd3ada05474c5 Mon Sep 17 00:00:00 2001 From: Hexqi Date: Thu, 11 Jul 2024 21:25:51 +0800 Subject: [PATCH] fix: remove material pkg dependency in canvas (#635) --- packages/canvas/DesignCanvas/src/DesignCanvas.vue | 9 +++++---- packages/canvas/package.json | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/canvas/DesignCanvas/src/DesignCanvas.vue b/packages/canvas/DesignCanvas/src/DesignCanvas.vue index 5cd3adab4..5c4f8415a 100644 --- a/packages/canvas/DesignCanvas/src/DesignCanvas.vue +++ b/packages/canvas/DesignCanvas/src/DesignCanvas.vue @@ -24,14 +24,14 @@ import { useLayout, useMaterial, useHistory, - useModal + useModal, + getMergeRegistry, + getMergeMeta } from '@opentiny/tiny-engine-meta-register' -import materials from '@opentiny/tiny-engine-plugin-materials' import { useHttp } from '@opentiny/tiny-engine-http' import { constants } from '@opentiny/tiny-engine-utils' import { isVsCodeEnv, isDevelopEnv } from '@opentiny/tiny-engine-common/js/environments' import * as ast from '@opentiny/tiny-engine-common/js/ast' -import { getMergeRegistry } from '@opentiny/tiny-engine-meta-register' const { PAGE_STATUS } = constants const tenant = new URLSearchParams(location.search).get('tenant') || '' @@ -48,6 +48,7 @@ const componentType = { export default { setup() { const registry = getMergeRegistry('canvas') + const materialsPanel = getMergeMeta('engine.plugins.materials')?.entry const { CanvasBreadcrumb } = registry.components const CanvasLayout = registry.layout.entry const [CanvasContainer] = registry.metas @@ -166,7 +167,7 @@ export default { canvasUrl, nodeSelected, footData, - materialsPanel: materials.entry, + materialsPanel, showMask, controller: { // 需要在canvas/render或内置组件里使用的方法 diff --git a/packages/canvas/package.json b/packages/canvas/package.json index 9d6694f02..4f1424e5b 100644 --- a/packages/canvas/package.json +++ b/packages/canvas/package.json @@ -33,7 +33,6 @@ "@opentiny/tiny-engine-i18n-host": "workspace:*", "@opentiny/tiny-engine-utils": "workspace:*", "@opentiny/tiny-engine-webcomponent-core": "workspace:*", - "@opentiny/tiny-engine-plugin-materials": "workspace:*", "@opentiny/tiny-engine-http": "workspace:*", "@vue/babel-plugin-jsx": "1.1.1", "@vue/shared": "^3.3.4",