Skip to content

Commit

Permalink
fix: remove material pkg dependency in canvas (opentiny#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
hexqi authored Jul 11, 2024
1 parent 8197462 commit d7504a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
9 changes: 5 additions & 4 deletions packages/canvas/DesignCanvas/src/DesignCanvas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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') || ''
Expand All @@ -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
Expand Down Expand Up @@ -166,7 +167,7 @@ export default {
canvasUrl,
nodeSelected,
footData,
materialsPanel: materials.entry,
materialsPanel,
showMask,
controller: {
// 需要在canvas/render或内置组件里使用的方法
Expand Down
1 change: 0 additions & 1 deletion packages/canvas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit d7504a9

Please sign in to comment.