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 }, negativeButtonProps: { type: 'info', ghost: false },
// 新增 // 新增
onPositiveCallback: async () => { onPositiveCallback: async () => {
fileData = JSON.parse(fileData) try {
await updateComponent(fileData, false, true) fileData = JSON.parse(fileData)
window['$message'].success('导入成功!') await updateComponent(fileData, false, true)
window['$message'].success('导入成功!')
} catch (error) {
window['$message'].error('组件导入失败,请检查文件完整性!')
}
}, },
// 覆盖 // 覆盖
onNegativeCallback: async () => { onNegativeCallback: async () => {
fileData = JSON.parse(fileData) try {
await updateComponent(fileData, true, true) fileData = JSON.parse(fileData)
window['$message'].success('导入成功!') await updateComponent(fileData, true, true)
window['$message'].success('导入成功!')
} catch (error) {
window['$message'].error('组件导入失败,请检查文件完整性!')
}
} }
}) })
}) })

View File

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