From 38538db4681d64e8b88b7edb88bcbb6832f5c974 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=B8=80=E5=98=89?= Date: Mon, 21 Jul 2025 16:19:55 +0800 Subject: [PATCH] update --- src/components/SelectTimeAsync.vue | 8 +++++++- src/pages/accountManagement/index.vue | 8 ++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/components/SelectTimeAsync.vue b/src/components/SelectTimeAsync.vue index d4c48fa..1b4a010 100644 --- a/src/components/SelectTimeAsync.vue +++ b/src/components/SelectTimeAsync.vue @@ -8,11 +8,17 @@ const {type} = defineProps({ } }); -const {promise, resolve, reject} = Promise.withResolvers(); +let promise, resolve, reject; const value = ref(); const DateTimeRef = ref(); const open = () => { + const {promise: _promise, resolve: _resolve, reject: _reject} = Promise.withResolvers(); + + promise = _promise; + resolve = _resolve; + reject = _reject; + DateTimeRef.value.show(); return promise; } diff --git a/src/pages/accountManagement/index.vue b/src/pages/accountManagement/index.vue index 5e4e684..55a214b 100644 --- a/src/pages/accountManagement/index.vue +++ b/src/pages/accountManagement/index.vue @@ -89,11 +89,11 @@ const deleteItem = async (id) => { } const changeStatus = async (value, item) => { - let abnormaltime = null; - if (value === 2) { - abnormaltime = await SelectTimeAsyncRef.value.open(); - } try { + let abnormaltime = null; + if (value === 2) { + abnormaltime = await SelectTimeAsyncRef.value.open(); + } const {msg} = await Api.system.setAccountStatus({ ...item, status: value,