confirmasync
v1.0.3
Published
async the confirm modal action
Downloads
1
Readme
This tool is for async confirm action. Env is like vue3 and some UI reposity.
How to use:
import { useConfirmAsync } from 'confirmasync'
const getConfirm: Promise<boolean> = useConfirmAsync(show: boolean, result:boolean)
const ret = await getConfirm() as boolean
if (ret) { ... }
About params : show、result:
these 2 params should be vue3 ref type or computed type.
normally, show will be some UI reposity's modal show param. result should be assigned by 'confirm' button as true, and 'cancel' button as false.