From 43e2fa5372734993b23fc583909eb4c1ae47d307 Mon Sep 17 00:00:00 2001 From: LiuHao Date: Fri, 26 Jan 2024 16:46:26 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=A2=9E=E5=8A=A0useDialog=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useDialog.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/hooks/useDialog.ts b/src/hooks/useDialog.ts index eb2bb4f..a617183 100644 --- a/src/hooks/useDialog.ts +++ b/src/hooks/useDialog.ts @@ -1,7 +1,17 @@ +import { Ref } from 'vue'; + interface Options { title?: string; } -export default (ops?: Options) => { + +interface Return { + title: Ref; + visible: Ref; + + openDialog: () => void; + closeDialog: () => void; +} +export default (ops?: Options): Return => { const visible = ref(false); const title = ref(ops.title || '');