Skip to content

Commit

Permalink
optimize: 绑定插件根据固定状态判断点击画布时是否关闭代码逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
STATICHIT committed Oct 23, 2024
1 parent 0c24a9f commit f388a91
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/design-core/src/DesignCanvas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,15 @@ export default {
)
const nodeSelected = (node, parent, type) => {
const { toolbars } = useLayout().layoutState
if (type !== 'clickTree') {
useLayout().closePlugin()
const { toolbars, plugins, settings } = useLayout().layoutState
const leftPanels = localStorage.getItem('leftPanels')
const rightPanels = localStorage.getItem('rightPanels')
if (type !== 'clickTree' && plugins.render && !leftPanels.includes(plugins.render)) {
useLayout().closePlugin(true)
}
if (settings.render && !rightPanels.includes(settings.render)) {
useLayout().closeSetting(true)
}
const { getSchema, getNodePath } = useCanvas().canvasApi.value
const schema = getSchema()
Expand Down

0 comments on commit f388a91

Please sign in to comment.