LtyhShop/pc/composables/useDialog.ts
2025-04-09 14:59:26 +08:00

17 lines
318 B
TypeScript

export default function useDialog(initValue: boolean = false) {
const bool: globalThis.Ref<boolean> = ref(initValue)
const DialogOpen = () => {
bool.value = true
}
const DialogClose = () => {
bool.value = false
}
return {
bool,
DialogOpen,
DialogClose,
// /handleDialogOpen,
}
}