Merge branch 'dev' into dev-commet

This commit is contained in:
tnt group 2022-10-14 14:18:18 +08:00
commit fbfac4b82c
2 changed files with 16 additions and 8 deletions

View File

@ -33,15 +33,23 @@ export const useFile = () => {
negativeButtonProps: { type: 'info', ghost: false },
// 新增
onPositiveCallback: async () => {
try {
fileData = JSON.parse(fileData)
await updateComponent(fileData, false, true)
window['$message'].success('导入成功!')
} catch (error) {
window['$message'].error('组件导入失败,请检查文件完整性!')
}
},
// 覆盖
onNegativeCallback: async () => {
try {
fileData = JSON.parse(fileData)
await updateComponent(fileData, true, true)
window['$message'].success('导入成功!')
} catch (error) {
window['$message'].error('组件导入失败,请检查文件完整性!')
}
}
})
})

View File

@ -9,9 +9,9 @@
:fallback-src="requireErrorImg()"
></n-image>
<n-ellipsis style="margin-right: auto">
<n-text class="list-text" :depth="2">
<span class="list-text">
{{ props.componentData.chartConfig.title }}
</n-text>
</span>
</n-ellipsis>
<layers-status :isGroup="isGroup" :hover="hover" :status="status"></layers-status>
</div>