forked from opentiny/tiny-engine
fix: 隐藏画布根节点的包裹元素的操作选项 (#492)
This commit is contained in:
parent
871463f185
commit
c218724543
|
@ -229,7 +229,10 @@ export default {
|
|||
}
|
||||
|
||||
const showAction = computed(() => {
|
||||
const { parent } = getCurrent()
|
||||
const { schema, parent } = getCurrent()
|
||||
if (schema?.props?.['data-id'] === 'root-container') {
|
||||
return false
|
||||
}
|
||||
return !props.resize && parent && parent?.type !== 'JSSlot'
|
||||
})
|
||||
|
||||
|
|
|
@ -379,7 +379,8 @@ export default {
|
|||
// 渲染画布增加根节点,与出码和预览保持一致
|
||||
const rootChildrenSchema = {
|
||||
componentName: 'div',
|
||||
props: schema.props,
|
||||
// 手动添加一个唯一的属性,后续在画布选中此节点时方便处理额外的逻辑。由于没有修改schema,不会影响出码
|
||||
props: { ...schema.props, 'data-id': 'root-container' },
|
||||
children: schema.children
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue