Merge pull request #7481 from dataease/pr@dev-v2@refactor_copy

refactor: 优化资源复制
This commit is contained in:
王嘉豪 2023-12-29 18:16:05 +08:00 committed by GitHub
commit 6732a476ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -883,7 +883,9 @@ export const dvMainStore = defineStore('dataVisualization', {
if (this.dvInfo) {
this.dvInfo.dataState = 'ready'
this.dvInfo.optType = null
this.dvInfo.id = newId
if (newId) {
this.dvInfo.id = newId
}
}
},
createInit(dvType, resourceId?, pid?) {

View File

@ -168,9 +168,7 @@ export function canvasSave(callBack) {
const method = dvInfo.value.id ? updateCanvas : saveCanvas
method(canvasInfo).then(res => {
if (res && res.data) {
dvMainStore.updateDvInfoId(res.data)
}
dvMainStore.updateDvInfoId(res.data)
snapshotStore.resetStyleChangeTimes()
callBack(res)
})