Appearance
useDialog
▸ useDialog(ref?, instance?): Object
使用 mp-dialog 组件(dialog 模式)
参数
| Name | Type | Default value | Description |
|---|---|---|---|
ref | string | '$dialog' | dialog 组件 ref 名称,必须以 $ 开头 |
instance? | ComponentInternalInstance | undefined |
返回值
Object
| Name | Type |
|---|---|
showDialog | (options: dialogOptions, mode?: string) => Promise<void> |
showDialog: (options: dialogOptions, mode?: string) => Promise<void>
-
示例
ts
const {showDialog} = useDialog('ref')
showDialog()