feat: 处理数据导入,ID更新的可控功能

This commit is contained in:
奔跑的面条
2022-08-17 16:56:58 +08:00
parent 1ee76efeb8
commit e348caaa0c
2 changed files with 30 additions and 12 deletions
@@ -34,13 +34,13 @@ export const useFile = () => {
// 新增
onPositiveCallback: async () => {
fileData = JSON.parse(fileData)
await updateComponent(fileData)
await updateComponent(fileData, false, true)
window['$message'].success('导入成功!')
},
// 覆盖
onNegativeCallback: async () => {
fileData = JSON.parse(fileData)
await updateComponent(fileData, true)
await updateComponent(fileData, true, true)
window['$message'].success('导入成功!')
}
})