update 增加useDialog类型

This commit is contained in:
LiuHao 2024-01-26 16:46:26 +08:00
parent 19cd1fc54c
commit 43e2fa5372

View File

@ -1,7 +1,17 @@
import { Ref } from 'vue';
interface Options {
title?: string;
}
export default (ops?: Options) => {
interface Return {
title: Ref<string>;
visible: Ref<boolean>;
openDialog: () => void;
closeDialog: () => void;
}
export default (ops?: Options): Return => {
const visible = ref(false);
const title = ref(ops.title || '');