Skip to content

Commit

Permalink
fix: title content lost when dragging from outline tree (#1149)
Browse files Browse the repository at this point in the history
修复拖拽Header组件会导致内容消失的 bug
  • Loading branch information
gene9831 authored Feb 26, 2025
1 parent cc2e062 commit 2860d1c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/plugins/tree/src/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import { PluginPanel, SvgButton } from '@opentiny/tiny-engine-common'
import { constants } from '@opentiny/tiny-engine-utils'
import { useCanvas, useMaterial, useLayout, useMessage } from '@opentiny/tiny-engine-meta-register'
import { extend } from '@opentiny/vue-renderless/common/object'
import { typeOf } from '@opentiny/vue-renderless/common/type'
import DraggableTree from './DraggableTree.vue'
const { PAGE_STATUS } = constants
Expand Down Expand Up @@ -72,12 +71,8 @@ export default {
item.show = pageState.nodesStatus[item.id] !== false
item.showEye = !item.show
const child = item.children
if (typeOf(child) !== 'array') {
delete item.children
} else {
if (item.children.length) {
translateChild(item.children)
}
if (Array.isArray(child)) {
translateChild(item.children)
}
})
Expand Down

0 comments on commit 2860d1c

Please sign in to comment.