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