refactor: 新建保存时,设置默认父级目录为最高层级

This commit is contained in:
wangjiahao
2024-11-29 16:34:00 +08:00
parent 19b1651323
commit b0055b61ed
2 changed files with 4 additions and 4 deletions

View File

@@ -199,11 +199,10 @@ const saveCanvasWithCheck = () => {
appData: appData.value
}
nextTick(() => {
console.log('===test333')
resourceAppOpt.value.init(params)
})
} else {
const params = { name: dvInfo.value.name, leaf: true, id: dvInfo.value.pid }
const params = { name: dvInfo.value.name, leaf: true, id: dvInfo.value.pid || '0' }
resourceGroupOpt.value.optInit('leaf', params, 'newLeaf', true)
return
}
@@ -316,6 +315,7 @@ onBeforeUnmount(() => {
eventBus.off('preview', previewInner)
eventBus.off('save', saveCanvasWithCheck)
eventBus.off('clearCanvas', clearCanvas)
dvMainStore.setAppDataInfo(null)
})
const openDataBoardSetting = () => {
dvMainStore.setCurComponent({ component: null, index: null })

View File

@@ -146,11 +146,10 @@ const saveCanvasWithCheck = () => {
appData: appData.value
}
nextTick(() => {
console.log('===test444')
resourceAppOpt.value.init(params)
})
} else {
const params = { name: dvInfo.value.name, leaf: true, id: dvInfo.value.pid }
const params = { name: dvInfo.value.name, leaf: true, id: dvInfo.value.pid || '0' }
resourceGroupOpt.value.optInit('leaf', params, 'newLeaf', true)
}
return
@@ -278,6 +277,7 @@ onBeforeUnmount(() => {
eventBus.off('preview', preview)
eventBus.off('save', saveCanvasWithCheck)
eventBus.off('clearCanvas', clearCanvas)
dvMainStore.setAppDataInfo(null)
})
const openOuterParamsSet = () => {