From 7a85c714cb54f60bcb5518191e7960399261cb57 Mon Sep 17 00:00:00 2001 From: liulinboyi <814921718@qq.com> Date: Fri, 8 Apr 2022 16:32:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20$dialog=E5=AF=B9=E8=AF=9D=E6=A1=86?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E5=BC=82=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AppProvider/DialogContent.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/AppProvider/DialogContent.vue b/src/components/AppProvider/DialogContent.vue index 1f32e83..3d3280f 100644 --- a/src/components/AppProvider/DialogContent.vue +++ b/src/components/AppProvider/DialogContent.vue @@ -8,15 +8,15 @@ const NDialog = useDialog() class Dialog { success(title, option) { - this.showDialog('success', { title, ...option }) + return this.showDialog('success', { title, ...option }) } warning(title, option) { - this.showDialog('warning', { title, ...option }) + return this.showDialog('warning', { title, ...option }) } error(title, option) { - this.showDialog('error', { title, ...option }) + return this.showDialog('error', { title, ...option }) } showDialog(type = 'success', option) { @@ -24,7 +24,7 @@ class Dialog { // ! 没有title的情况 option.showIcon = false } - NDialog[type]({ + return NDialog[type]({ positiveText: 'OK', closable: false, ...option, @@ -32,7 +32,7 @@ class Dialog { } confirm(option = {}) { - this.showDialog(option.type || 'error', { + return this.showDialog(option.type || 'error', { positiveText: '确定', negativeText: '取消', onPositiveClick: option.confirm,