Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove material pkg dependency in canvas #635

Merged
merged 2 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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')
hexqi marked this conversation as resolved.
Show resolved Hide resolved
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