diff options
| author | 刘洪洪 <[email protected]> | 2024-11-21 10:34:55 +0800 |
|---|---|---|
| committer | 刘洪洪 <[email protected]> | 2024-11-21 10:34:55 +0800 |
| commit | 087d2c26fb5c0f5a5feef8699fee02c9168b0b98 (patch) | |
| tree | 237a4cd0455283c6d3689d7bd87ad5dde225b65a | |
| parent | 5043663e2479329d2d3d5ec7c2b50d44cfb8168e (diff) | |
fix: 添加source被引用不能删除的处理
| -rw-r--r-- | src/components/table/setting/ProfilesTable.vue | 2 | ||||
| -rw-r--r-- | src/mixins/data-list.js | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/components/table/setting/ProfilesTable.vue b/src/components/table/setting/ProfilesTable.vue index 6b4e324b..e2dc6bb1 100644 --- a/src/components/table/setting/ProfilesTable.vue +++ b/src/components/table/setting/ProfilesTable.vue @@ -41,7 +41,7 @@ <template v-else><span>-</span></template> </template> <template v-if="item.prop === 'entitySource'"> - {{ scope.row[item.prop].name || '-' }} + {{ scope.row[item.prop]?.name || '-' }} </template> <template v-if="item.prop === 'entities' || item.prop === 'relations'"> {{ handleListTypes(scope.row[item.prop]) }} diff --git a/src/mixins/data-list.js b/src/mixins/data-list.js index 03723873..9e534ed5 100644 --- a/src/mixins/data-list.js +++ b/src/mixins/data-list.js @@ -94,6 +94,10 @@ export default { this.disableEdit = true } else this.disableEdit = objs[0]?.usage > 0 this.disableDelete = this.batchDeleteObjs.length < 1 + const obj = objs.find(d => d.usage > 0) + if (obj) { + this.disableDelete = true + } }, getTableData (params, isAll, isClearType) { if (isAll) { |
