From 09d2a03b9e4a70f813b2b1ef77f70daee8d33001 Mon Sep 17 00:00:00 2001 From: yyy <2605810609@qq.com> Date: Thu, 17 Jul 2025 09:26:07 +0800 Subject: [PATCH] =?UTF-8?q?loading=E6=9C=AA=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/board/device/index.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/board/device/index.vue b/src/views/board/device/index.vue index 0c4af912..32b40f4e 100644 --- a/src/views/board/device/index.vue +++ b/src/views/board/device/index.vue @@ -184,7 +184,6 @@ const queryParams = reactive({ const activeName = ref('-1') const handleClick = (tab, event) => { - loading.value = true // 切换标签时显示loading queryParams.deviceType = tab.props.name != -1 ? tab.props.name : undefined getCarList() } @@ -278,6 +277,9 @@ const clockDevice = (item) => { }) }) .catch(() => {}) + .finally(() => { + loading.value = false // 操作后关闭loading + }) } //新建编辑车辆 const openForm = (type, id) => { @@ -298,6 +300,9 @@ const deleteCar = (id) => { }) }) .catch(() => {}) + .finally(() => { + loading.value = false // 操作后关闭loading + }) } //前往地图定位