From bd77ae441003091e3bc8f59679bcb3d03a19ce4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Fri, 13 Dec 2024 17:36:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=BC=B9=E5=87=BA?= =?UTF-8?q?=E6=A1=86=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model-custom/components/custom-dialog/index.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/model-custom/components/custom-dialog/index.vue b/src/components/model-custom/components/custom-dialog/index.vue index c816bf93..32f82481 100644 --- a/src/components/model-custom/components/custom-dialog/index.vue +++ b/src/components/model-custom/components/custom-dialog/index.vue @@ -174,15 +174,19 @@ const get_table_list = (val: any) => { method: 'post', // 请求方式 data // 请求数据 }).then((res) => { + loading.value = false; if (res.data) { // 列表数据改变时,清空报错的内容 tableRowClassList.value = []; tableData.value = res.data.data_list; pagination_data.value.data_total = res.data.data_total; } - }).finally(() => { - loading.value = false; - }); + }).catch((error) => { + // 接口取消的时候,不处理loading + if (error != 'canceled') { + loading.value = false; + } + }) } } watch(() => default_data.value, (val) => {