Skip to content
Merged
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: 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