提交 | 用户 | age
|
d98d05
|
1 |
/// <reference types="miniprogram-api-typings" /> |
53cc6f
|
2 |
export declare type Action = 'confirm' | 'cancel' | 'overlay'; |
S |
3 |
interface DialogOptions { |
|
4 |
lang?: string; |
|
5 |
show?: boolean; |
|
6 |
title?: string; |
|
7 |
width?: string | number | null; |
|
8 |
zIndex?: number; |
|
9 |
theme?: string; |
|
10 |
context?: |
|
11 |
| WechatMiniprogram.Page.TrivialInstance |
|
12 |
| WechatMiniprogram.Component.TrivialInstance; |
|
13 |
message?: string; |
|
14 |
overlay?: boolean; |
|
15 |
selector?: string; |
|
16 |
ariaLabel?: string; |
|
17 |
className?: string; |
|
18 |
customStyle?: string; |
|
19 |
transition?: string; |
|
20 |
/** |
|
21 |
* @deprecated use beforeClose instead |
|
22 |
*/ |
|
23 |
asyncClose?: boolean; |
|
24 |
beforeClose?: null | (() => Promise<void> | void); |
|
25 |
businessId?: number; |
|
26 |
sessionFrom?: string; |
|
27 |
overlayStyle?: string; |
|
28 |
appParameter?: string; |
|
29 |
messageAlign?: string; |
|
30 |
sendMessageImg?: string; |
|
31 |
showMessageCard?: boolean; |
|
32 |
sendMessagePath?: string; |
|
33 |
sendMessageTitle?: string; |
|
34 |
confirmButtonText?: string; |
|
35 |
cancelButtonText?: string; |
|
36 |
showConfirmButton?: boolean; |
|
37 |
showCancelButton?: boolean; |
|
38 |
closeOnClickOverlay?: boolean; |
|
39 |
confirmButtonOpenType?: string; |
d98d05
|
40 |
} |
53cc6f
|
41 |
declare const Dialog: { |
S |
42 |
(options: DialogOptions): Promise< |
|
43 |
WechatMiniprogram.Component.Instance< |
|
44 |
Record<string, any>, |
|
45 |
Record<string, any>, |
|
46 |
Record<string, any>, |
|
47 |
Record<string, any>, |
|
48 |
false |
|
49 |
> |
|
50 |
>; |
|
51 |
alert( |
|
52 |
options: DialogOptions |
|
53 |
): Promise< |
|
54 |
WechatMiniprogram.Component.Instance< |
|
55 |
Record<string, any>, |
|
56 |
Record<string, any>, |
|
57 |
Record<string, any>, |
|
58 |
Record<string, any>, |
|
59 |
false |
|
60 |
> |
|
61 |
>; |
|
62 |
confirm( |
|
63 |
options: DialogOptions |
|
64 |
): Promise< |
|
65 |
WechatMiniprogram.Component.Instance< |
|
66 |
Record<string, any>, |
|
67 |
Record<string, any>, |
|
68 |
Record<string, any>, |
|
69 |
Record<string, any>, |
|
70 |
false |
|
71 |
> |
|
72 |
>; |
|
73 |
close(): void; |
|
74 |
stopLoading(): void; |
|
75 |
currentOptions: DialogOptions; |
|
76 |
defaultOptions: DialogOptions; |
|
77 |
setDefaultOptions(options: DialogOptions): void; |
|
78 |
resetDefaultOptions(): void; |
|
79 |
}; |
d98d05
|
80 |
export default Dialog; |