Merge branch 'dev' of https://gitee.com/MTrun/go-view into master-fetch-dev

This commit is contained in:
奔跑的面条
2022-10-15 17:20:05 +08:00
93 changed files with 2443 additions and 672 deletions
@@ -32,15 +32,23 @@ export const useFile = () => {
negativeButtonProps: { type: 'info', ghost: false },
// 新增
onPositiveCallback: async () => {
fileData = JSON.parse(fileData)
await updateComponent(fileData, false, true)
window['$message'].success('导入成功!')
try {
fileData = JSON.parse(fileData)
await updateComponent(fileData, false, true)
window['$message'].success('导入成功!')
} catch (error) {
window['$message'].error('组件导入失败,请检查文件完整性!')
}
},
// 覆盖
onNegativeCallback: async () => {
fileData = JSON.parse(fileData)
await updateComponent(fileData, true, true)
window['$message'].success('导入成功!')
try {
fileData = JSON.parse(fileData)
await updateComponent(fileData, true, true)
window['$message'].success('导入成功!')
} catch (error) {
window['$message'].error('组件导入失败,请检查文件完整性!')
}
}
})
})