From 2cb7569cb0b1360be92a143568181fa346b1ad25 Mon Sep 17 00:00:00 2001 From: zhaojisen <1301338853@qq.com> Date: Thu, 8 Aug 2024 15:00:11 +0800 Subject: [PATCH] perf: add button loading status --- src/components/Apps/AssetSelect/dialog.vue | 5 +++-- src/components/Dialog/index.vue | 8 ++------ src/components/Form/FormFields/TransferSelect.vue | 10 +++++----- src/components/Libs/Krry/paging/index.vue | 2 -- src/components/Table/DataTable/index.vue | 3 +-- 5 files changed, 11 insertions(+), 17 deletions(-) diff --git a/src/components/Apps/AssetSelect/dialog.vue b/src/components/Apps/AssetSelect/dialog.vue index 323066387..41a0f51d6 100644 --- a/src/components/Apps/AssetSelect/dialog.vue +++ b/src/components/Apps/AssetSelect/dialog.vue @@ -1,7 +1,7 @@ @@ -79,13 +79,16 @@ export default { if (keyword) { params['search'] = keyword } + this.isLoaded = false const data = await this.$axios.get(url, { params }) + this.isLoaded = true return data['results'].map(item => { const n = transformOption(item) return { id: n.value, label: n.label } }) } return { + isLoaded: false, showTransfer: false, selectInitialized: false, select2: { @@ -164,9 +167,6 @@ export default { this.select2.options = options this.emit(options.map(item => item.value)) this.showTransfer = false - }, - handleLoaded() { - this.$refs.customDialog.loaded() } } } diff --git a/src/components/Libs/Krry/paging/index.vue b/src/components/Libs/Krry/paging/index.vue index 51283b638..a28c1fdb2 100644 --- a/src/components/Libs/Krry/paging/index.vue +++ b/src/components/Libs/Krry/paging/index.vue @@ -233,8 +233,6 @@ export default { ele => !checkDataId.includes(ele.id) ) } - - this.$emit('loaded') }, searchWord(keyword, titleId) { // 过滤掉数据,保留搜索的数据 diff --git a/src/components/Table/DataTable/index.vue b/src/components/Table/DataTable/index.vue index b6a46e43a..3cf848086 100644 --- a/src/components/Table/DataTable/index.vue +++ b/src/components/Table/DataTable/index.vue @@ -12,7 +12,6 @@