diff options
| author | 刘洪洪 <[email protected]> | 2024-11-20 17:02:33 +0800 |
|---|---|---|
| committer | 刘洪洪 <[email protected]> | 2024-11-20 17:02:33 +0800 |
| commit | 1b2dda123c14f4e3b74fbb0f3465fb3153d3e928 (patch) | |
| tree | 008f40690028427b84334c185d02edfb8d1355e8 /src | |
| parent | 62272f5432664fe6ccc322455134328728da9b91 (diff) | |
fix: 添加被引用的source不能编辑的功能
Diffstat (limited to 'src')
| -rw-r--r-- | src/mixins/data-list.js | 6 | ||||
| -rw-r--r-- | src/views/setting/sources/SourcesForm.vue | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mixins/data-list.js b/src/mixins/data-list.js index b1ff5194..03723873 100644 --- a/src/mixins/data-list.js +++ b/src/mixins/data-list.js @@ -90,9 +90,9 @@ export default { this.batchDeleteObjs.push(obj) } }) - this.disableEdit = this.batchDeleteObjs.length !== 1 - // todo 该字段后续会修改 - this.disableEdit = !!objs.flag + if (this.batchDeleteObjs.length > 1) { + this.disableEdit = true + } else this.disableEdit = objs[0]?.usage > 0 this.disableDelete = this.batchDeleteObjs.length < 1 }, getTableData (params, isAll, isClearType) { diff --git a/src/views/setting/sources/SourcesForm.vue b/src/views/setting/sources/SourcesForm.vue index 227a866c..8ceff534 100644 --- a/src/views/setting/sources/SourcesForm.vue +++ b/src/views/setting/sources/SourcesForm.vue @@ -154,7 +154,7 @@ <span>{{ $t('overall.cancel') }}</span> </button> <button style="position: relative;" :class="{'disabled': blockOperation.save}" - :disabled="sourceObj.flag" class="business-button tag__btn" @click="saveSource"> + :disabled="sourceObj.usage>0" class="business-button tag__btn" @click="saveSource"> <loading :loading="blockOperation.save"></loading> <span>{{ $t('overall.save') }}</span> </button> |
