LtyhShop/pc/composables/useDialog.ts

17 lines
318 B
TypeScript
Raw Normal View History

2025-04-09 14:59:26 +08:00
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,
}
}