feat: 数据源数据集删除时,提示优化

This commit is contained in:
taojinlong 2022-04-21 16:30:27 +08:00
parent ea091b6808
commit e20c1a375d
4 changed files with 10 additions and 1 deletions

View File

@ -1103,6 +1103,7 @@ export default {
rename: 'Rename',
tips: 'Tips',
confirm_delete: 'confirm_delete',
confirm_delete_msg: 'Deleting a dataset will affect its related user-defined dataset, associated dataset and dashboard. Confirm the delete',
delete_success: 'delete_success',
confirm: 'confirm',
cancel: 'cancel',

View File

@ -1103,6 +1103,7 @@ export default {
rename: '重命名',
tips: '提示',
confirm_delete: '確認刪除',
confirm_delete_msg: '刪除數據機,會影響與其相關的自定義數據機、 關聯數據機、儀表板,確認刪除',
delete_success: '刪除成功',
confirm: '確認',
cancel: '取消',

View File

@ -1106,6 +1106,7 @@ export default {
rename: '重命名',
tips: '提示',
confirm_delete: '确认删除',
confirm_delete_msg: '数据集删除,会影响与其相关的自定义数据集、关联数据集、仪表板,确认删除?',
delete_success: '删除成功',
confirm: '确认',
cancel: '取消',

View File

@ -475,7 +475,13 @@ export default {
},
deleteTable(data) {
this.$confirm(this.$t('dataset.confirm_delete'), this.$t('dataset.tips'), {
let confirm_delete_msg = ''
if(data.modelInnerType === 'union' || data.modelInnerType === 'custom'){
confirm_delete_msg = this.$t('dataset.confirm_delete')
}else {
confirm_delete_msg = this.$t('dataset.confirm_delete_msg')
}
this.$confirm(confirm_delete_msg, this.$t('dataset.tips'), {
confirmButtonText: this.$t('dataset.confirm'),
cancelButtonText: this.$t('dataset.cancel'),
type: 'warning'