From 6c4a3c78304fdef6cdf8c7319a2f4351170584e5 Mon Sep 17 00:00:00 2001 From: BTMuli Date: Tue, 29 Aug 2023 16:14:21 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E6=88=90=E5=8A=9F=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=20confirm=20=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/func/confirm.ts | 6 +-- src/components/func/confirm.vue | 63 ++++++++++++-------------------- src/types/Component/Confirm.d.ts | 5 --- 3 files changed, 27 insertions(+), 47 deletions(-) diff --git a/src/components/func/confirm.ts b/src/components/func/confirm.ts index 1f6b194c..d0a9b1f3 100644 --- a/src/components/func/confirm.ts +++ b/src/components/func/confirm.ts @@ -23,13 +23,13 @@ const renderBox = (props: TGApp.Component.Confirm.Params): VNode => { let confirmInstance: any; -const showConfirm = (props: TGApp.Component.Confirm.Params): void => { +const showConfirm = async (props: TGApp.Component.Confirm.Params): Promise => { if (confirmInstance) { const boxVue = confirmInstance.component; - boxVue.exposeProxy.displayBox(props); + return boxVue.exposeProxy.displayBox(props); } else { confirmInstance = renderBox(props); - showConfirm(props); + return await showConfirm(props); } }; diff --git a/src/components/func/confirm.vue b/src/components/func/confirm.vue index 228173ec..24912c9b 100644 --- a/src/components/func/confirm.vue +++ b/src/components/func/confirm.vue @@ -16,11 +16,11 @@
- - @@ -33,27 +33,19 @@