x-next 0.0.0-alpha.1 → 0.0.0-alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +21 -21
- package/README.md +93 -2
- package/dist/favicon.ico +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/types/_hooks/use-overflow.d.ts +5 -0
- package/dist/types/_hooks/use-popup-manager.d.ts +11 -0
- package/dist/types/_props/css.d.ts +13 -0
- package/dist/types/_props/global.d.ts +1 -0
- package/dist/types/_utils/config.d.ts +9 -0
- package/dist/types/_utils/convert-case.d.ts +3 -0
- package/dist/types/_utils/dom.d.ts +10 -0
- package/dist/types/_utils/helpers.d.ts +12 -0
- package/dist/types/_utils/icon.d.ts +59 -0
- package/dist/types/_utils/is.d.ts +25 -0
- package/dist/types/_utils/keyboard.d.ts +24 -0
- package/dist/types/_utils/number.d.ts +0 -0
- package/dist/types/_utils/vue-eco.d.ts +32 -0
- package/dist/types/componets/button/index.vue.d.ts +107 -0
- package/dist/types/componets/button/props.d.ts +45 -0
- package/dist/types/componets/dialog/index.vue.d.ts +221 -0
- package/dist/types/componets/dialog/props.d.ts +83 -0
- package/dist/types/componets/dialog/use-props.d.ts +33 -0
- package/dist/types/componets/dialog/use.d.ts +3 -0
- package/dist/types/componets/dialog/warp.d.ts +2 -0
- package/dist/types/componets/message/index.vue.d.ts +116 -0
- package/dist/types/componets/message/props.d.ts +31 -0
- package/dist/types/componets/message/warp.d.ts +3 -0
- package/dist/types/componets/message-box/index.d.ts +3 -0
- package/dist/types/componets/message-box/props.d.ts +52 -0
- package/dist/types/componets/message-box/warp.d.ts +2 -0
- package/dist/types/componets/notification/index.vue.d.ts +160 -0
- package/dist/types/componets/notification/props.d.ts +54 -0
- package/dist/types/componets/notification/warp.d.ts +3 -0
- package/dist/types/componets/space/index.d.ts +42 -0
- package/dist/types/componets/tag-cloud/index.d.ts +0 -0
- package/dist/types/componets/trend-chart/components/trend-chart-curve.d.ts +114 -0
- package/dist/types/componets/trend-chart/components/trend-chart-grid.d.ts +55 -0
- package/dist/types/componets/trend-chart/components/trend-chart-labels.d.ts +22 -0
- package/dist/types/componets/trend-chart/components/trend-chart.d.ts +270 -0
- package/dist/types/componets/trend-chart/helpers/genPath.d.ts +8 -0
- package/dist/types/componets/trend-chart/helpers/genPoints.d.ts +3 -0
- package/dist/types/componets/trend-chart/helpers/getPadding.d.ts +7 -0
- package/dist/types/componets/trend-chart/helpers/validatePadding.d.ts +2 -0
- package/dist/types/componets/trend-chart/index.d.ts +2 -0
- package/dist/types/componets/trend-chart/props.d.ts +206 -0
- package/dist/types/icons/animation/animation-loading.vue.d.ts +55 -0
- package/dist/types/icons/default/check-circle-fill.vue.d.ts +55 -0
- package/dist/types/icons/default/close-circle-fill.vue.d.ts +55 -0
- package/dist/types/icons/default/exclamation-circle-fill.vue.d.ts +55 -0
- package/dist/types/icons/default/info-circle-fill.vue.d.ts +55 -0
- package/dist/types/icons/default/minus-circle-fill.vue.d.ts +55 -0
- package/dist/types/icons/index.d.ts +7 -0
- package/dist/types/ui.d.ts +5 -0
- package/dist/ui.cjs.js +2 -0
- package/dist/ui.es.js +1395 -0
- package/dist/ui.umd.js +3 -0
- package/package.json +64 -63
- package/framework/es/client.io.js +0 -2
- package/framework/es/client.io.js.map +0 -1
- package/framework/es/exception.d.ts +0 -25
- package/framework/es/index.d.ts +0 -2
- package/framework/es/types.d.ts +0 -33
- package/framework/es/util.d.ts +0 -36
- package/framework/es/websocket.d.ts +0 -118
- package/framework/umd/client.io.js +0 -2
- package/framework/umd/client.io.js.map +0 -1
- package/framework/umd/exception.d.ts +0 -25
- package/framework/umd/index.d.ts +0 -2
- package/framework/umd/types.d.ts +0 -33
- package/framework/umd/util.d.ts +0 -36
- package/framework/umd/websocket.d.ts +0 -118
- package/index.d.ts +0 -159
@@ -0,0 +1,221 @@
|
|
1
|
+
declare const _sfc_main: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
2
|
+
renderTo: {
|
3
|
+
type: import("vue").PropType<string | HTMLElement>;
|
4
|
+
default: string;
|
5
|
+
};
|
6
|
+
disabled: {
|
7
|
+
type: BooleanConstructor;
|
8
|
+
default: boolean;
|
9
|
+
};
|
10
|
+
modelValue: {
|
11
|
+
type: BooleanConstructor;
|
12
|
+
default: boolean;
|
13
|
+
};
|
14
|
+
top: {
|
15
|
+
type: (NumberConstructor | StringConstructor)[];
|
16
|
+
default: string;
|
17
|
+
};
|
18
|
+
center: {
|
19
|
+
type: BooleanConstructor;
|
20
|
+
default: boolean;
|
21
|
+
};
|
22
|
+
width: {
|
23
|
+
type: (NumberConstructor | StringConstructor)[];
|
24
|
+
default: number;
|
25
|
+
};
|
26
|
+
height: {
|
27
|
+
type: (NumberConstructor | StringConstructor)[];
|
28
|
+
default: number;
|
29
|
+
};
|
30
|
+
minWidth: {
|
31
|
+
type: (NumberConstructor | StringConstructor)[];
|
32
|
+
default: number;
|
33
|
+
};
|
34
|
+
minHeight: {
|
35
|
+
type: (NumberConstructor | StringConstructor)[];
|
36
|
+
default: number;
|
37
|
+
};
|
38
|
+
title: {
|
39
|
+
type: StringConstructor;
|
40
|
+
default: string;
|
41
|
+
};
|
42
|
+
mask: {
|
43
|
+
type: BooleanConstructor;
|
44
|
+
default: boolean;
|
45
|
+
};
|
46
|
+
destroyOnClosed: {
|
47
|
+
type: BooleanConstructor;
|
48
|
+
default: boolean;
|
49
|
+
};
|
50
|
+
onBeforeCancel: {
|
51
|
+
type: FunctionConstructor;
|
52
|
+
};
|
53
|
+
maskToClose: {
|
54
|
+
type: BooleanConstructor;
|
55
|
+
default: boolean;
|
56
|
+
};
|
57
|
+
escToClose: {
|
58
|
+
type: BooleanConstructor;
|
59
|
+
default: boolean;
|
60
|
+
};
|
61
|
+
fullscreen: {
|
62
|
+
type: BooleanConstructor;
|
63
|
+
default: boolean;
|
64
|
+
};
|
65
|
+
messageBox: {
|
66
|
+
type: BooleanConstructor;
|
67
|
+
default: boolean;
|
68
|
+
};
|
69
|
+
popupClass: {
|
70
|
+
type: StringConstructor;
|
71
|
+
default: undefined;
|
72
|
+
};
|
73
|
+
showClose: {
|
74
|
+
type: BooleanConstructor;
|
75
|
+
default: boolean;
|
76
|
+
};
|
77
|
+
showHeaderBottomLine: {
|
78
|
+
type: BooleanConstructor;
|
79
|
+
default: boolean;
|
80
|
+
};
|
81
|
+
}>, {
|
82
|
+
cls: import("vue").ComputedRef<(string | false | undefined)[]>;
|
83
|
+
ns: string;
|
84
|
+
cn: {
|
85
|
+
block: string;
|
86
|
+
element: (className: string) => string;
|
87
|
+
modifier: (className: string) => string;
|
88
|
+
is: (className: string) => string;
|
89
|
+
};
|
90
|
+
cnOMB: {
|
91
|
+
block: string;
|
92
|
+
element: (className: string) => string;
|
93
|
+
modifier: (className: string) => string;
|
94
|
+
is: (className: string) => string;
|
95
|
+
};
|
96
|
+
messageBoxNs: string;
|
97
|
+
containerStyle: import("vue").ComputedRef<import("vue").CSSProperties>;
|
98
|
+
dialogStyle: import("vue").ComputedRef<import("vue").CSSProperties>;
|
99
|
+
dialogRef: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
100
|
+
teleportContainer: import("vue").ComputedRef<HTMLElement | undefined>;
|
101
|
+
teleportDisabled: import("vue").ComputedRef<boolean>;
|
102
|
+
modelVisible: import("vue").ComputedRef<boolean>;
|
103
|
+
mergeVisible: import("vue").ComputedRef<boolean>;
|
104
|
+
interceptClose: (action: 'cancel' | 'ok', e?: Event) => void;
|
105
|
+
afterLeave: () => void;
|
106
|
+
afterEnter: () => void;
|
107
|
+
handleMaskClick: () => void;
|
108
|
+
handleCancel: (e: Event) => void;
|
109
|
+
handleOk: (e: Event) => void;
|
110
|
+
loadingObj: {
|
111
|
+
ok: boolean;
|
112
|
+
cancel: boolean;
|
113
|
+
};
|
114
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("open" | "close" | "closed" | "opened" | "update:modelValue")[], "open" | "close" | "closed" | "opened" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
115
|
+
renderTo: {
|
116
|
+
type: import("vue").PropType<string | HTMLElement>;
|
117
|
+
default: string;
|
118
|
+
};
|
119
|
+
disabled: {
|
120
|
+
type: BooleanConstructor;
|
121
|
+
default: boolean;
|
122
|
+
};
|
123
|
+
modelValue: {
|
124
|
+
type: BooleanConstructor;
|
125
|
+
default: boolean;
|
126
|
+
};
|
127
|
+
top: {
|
128
|
+
type: (NumberConstructor | StringConstructor)[];
|
129
|
+
default: string;
|
130
|
+
};
|
131
|
+
center: {
|
132
|
+
type: BooleanConstructor;
|
133
|
+
default: boolean;
|
134
|
+
};
|
135
|
+
width: {
|
136
|
+
type: (NumberConstructor | StringConstructor)[];
|
137
|
+
default: number;
|
138
|
+
};
|
139
|
+
height: {
|
140
|
+
type: (NumberConstructor | StringConstructor)[];
|
141
|
+
default: number;
|
142
|
+
};
|
143
|
+
minWidth: {
|
144
|
+
type: (NumberConstructor | StringConstructor)[];
|
145
|
+
default: number;
|
146
|
+
};
|
147
|
+
minHeight: {
|
148
|
+
type: (NumberConstructor | StringConstructor)[];
|
149
|
+
default: number;
|
150
|
+
};
|
151
|
+
title: {
|
152
|
+
type: StringConstructor;
|
153
|
+
default: string;
|
154
|
+
};
|
155
|
+
mask: {
|
156
|
+
type: BooleanConstructor;
|
157
|
+
default: boolean;
|
158
|
+
};
|
159
|
+
destroyOnClosed: {
|
160
|
+
type: BooleanConstructor;
|
161
|
+
default: boolean;
|
162
|
+
};
|
163
|
+
onBeforeCancel: {
|
164
|
+
type: FunctionConstructor;
|
165
|
+
};
|
166
|
+
maskToClose: {
|
167
|
+
type: BooleanConstructor;
|
168
|
+
default: boolean;
|
169
|
+
};
|
170
|
+
escToClose: {
|
171
|
+
type: BooleanConstructor;
|
172
|
+
default: boolean;
|
173
|
+
};
|
174
|
+
fullscreen: {
|
175
|
+
type: BooleanConstructor;
|
176
|
+
default: boolean;
|
177
|
+
};
|
178
|
+
messageBox: {
|
179
|
+
type: BooleanConstructor;
|
180
|
+
default: boolean;
|
181
|
+
};
|
182
|
+
popupClass: {
|
183
|
+
type: StringConstructor;
|
184
|
+
default: undefined;
|
185
|
+
};
|
186
|
+
showClose: {
|
187
|
+
type: BooleanConstructor;
|
188
|
+
default: boolean;
|
189
|
+
};
|
190
|
+
showHeaderBottomLine: {
|
191
|
+
type: BooleanConstructor;
|
192
|
+
default: boolean;
|
193
|
+
};
|
194
|
+
}>> & Readonly<{
|
195
|
+
onOpen?: ((...args: any[]) => any) | undefined;
|
196
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
197
|
+
onClosed?: ((...args: any[]) => any) | undefined;
|
198
|
+
onOpened?: ((...args: any[]) => any) | undefined;
|
199
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
200
|
+
}>, {
|
201
|
+
height: string | number;
|
202
|
+
minHeight: string | number;
|
203
|
+
minWidth: string | number;
|
204
|
+
top: string | number;
|
205
|
+
width: string | number;
|
206
|
+
mask: boolean;
|
207
|
+
center: boolean;
|
208
|
+
disabled: boolean;
|
209
|
+
title: string;
|
210
|
+
renderTo: string | HTMLElement;
|
211
|
+
modelValue: boolean;
|
212
|
+
destroyOnClosed: boolean;
|
213
|
+
maskToClose: boolean;
|
214
|
+
escToClose: boolean;
|
215
|
+
fullscreen: boolean;
|
216
|
+
messageBox: boolean;
|
217
|
+
popupClass: string;
|
218
|
+
showClose: boolean;
|
219
|
+
showHeaderBottomLine: boolean;
|
220
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
221
|
+
export default _sfc_main;
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
2
|
+
export declare const dialogProps: {
|
3
|
+
renderTo: {
|
4
|
+
type: import("vue").PropType<string | HTMLElement>;
|
5
|
+
default: string;
|
6
|
+
};
|
7
|
+
disabled: {
|
8
|
+
type: BooleanConstructor;
|
9
|
+
default: boolean;
|
10
|
+
};
|
11
|
+
modelValue: {
|
12
|
+
type: BooleanConstructor;
|
13
|
+
default: boolean;
|
14
|
+
};
|
15
|
+
top: {
|
16
|
+
type: (StringConstructor | NumberConstructor)[];
|
17
|
+
default: string;
|
18
|
+
};
|
19
|
+
center: {
|
20
|
+
type: BooleanConstructor;
|
21
|
+
default: boolean;
|
22
|
+
};
|
23
|
+
width: {
|
24
|
+
type: (StringConstructor | NumberConstructor)[];
|
25
|
+
default: number;
|
26
|
+
};
|
27
|
+
height: {
|
28
|
+
type: (StringConstructor | NumberConstructor)[];
|
29
|
+
default: number;
|
30
|
+
};
|
31
|
+
minWidth: {
|
32
|
+
type: (StringConstructor | NumberConstructor)[];
|
33
|
+
default: number;
|
34
|
+
};
|
35
|
+
minHeight: {
|
36
|
+
type: (StringConstructor | NumberConstructor)[];
|
37
|
+
default: number;
|
38
|
+
};
|
39
|
+
title: {
|
40
|
+
type: StringConstructor;
|
41
|
+
default: string;
|
42
|
+
};
|
43
|
+
mask: {
|
44
|
+
type: BooleanConstructor;
|
45
|
+
default: boolean;
|
46
|
+
};
|
47
|
+
destroyOnClosed: {
|
48
|
+
type: BooleanConstructor;
|
49
|
+
default: boolean;
|
50
|
+
};
|
51
|
+
onBeforeCancel: {
|
52
|
+
type: FunctionConstructor;
|
53
|
+
};
|
54
|
+
maskToClose: {
|
55
|
+
type: BooleanConstructor;
|
56
|
+
default: boolean;
|
57
|
+
};
|
58
|
+
escToClose: {
|
59
|
+
type: BooleanConstructor;
|
60
|
+
default: boolean;
|
61
|
+
};
|
62
|
+
fullscreen: {
|
63
|
+
type: BooleanConstructor;
|
64
|
+
default: boolean;
|
65
|
+
};
|
66
|
+
messageBox: {
|
67
|
+
type: BooleanConstructor;
|
68
|
+
default: boolean;
|
69
|
+
};
|
70
|
+
popupClass: {
|
71
|
+
type: StringConstructor;
|
72
|
+
default: undefined;
|
73
|
+
};
|
74
|
+
showClose: {
|
75
|
+
type: BooleanConstructor;
|
76
|
+
default: boolean;
|
77
|
+
};
|
78
|
+
showHeaderBottomLine: {
|
79
|
+
type: BooleanConstructor;
|
80
|
+
default: boolean;
|
81
|
+
};
|
82
|
+
};
|
83
|
+
export type DialogProps = ExtractPropTypes<typeof dialogProps>;
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import type { RenderFunction, VNode } from 'vue';
|
2
|
+
export type DialogBeforeAction = () => boolean | Promise<boolean>;
|
3
|
+
export type DialogContent = string | number | VNode | RenderFunction;
|
4
|
+
export interface DialogOptions {
|
5
|
+
title?: DialogContent;
|
6
|
+
content?: DialogContent;
|
7
|
+
footer?: boolean | ((scoped: DialogFooterScoped) => VNode);
|
8
|
+
okText?: string;
|
9
|
+
cancelText?: string;
|
10
|
+
mask?: boolean;
|
11
|
+
maskToClose?: boolean;
|
12
|
+
onOk?: (e: Event) => void;
|
13
|
+
beforeOnOk?: DialogBeforeAction;
|
14
|
+
onCancel?: (e: Event) => void;
|
15
|
+
beforeOnCancel?: DialogBeforeAction;
|
16
|
+
width?: number | string;
|
17
|
+
height?: number | string;
|
18
|
+
top?: number | string;
|
19
|
+
center?: boolean;
|
20
|
+
renderTo?: string | HTMLElement;
|
21
|
+
hideCancel?: boolean;
|
22
|
+
hideOk?: boolean;
|
23
|
+
popupClass?: string;
|
24
|
+
}
|
25
|
+
export type DialogFooterAction = 'cancel' | 'ok';
|
26
|
+
export interface DialogFooterScoped {
|
27
|
+
cancel(): void;
|
28
|
+
ok(): void;
|
29
|
+
loadingObj?: {
|
30
|
+
ok: boolean;
|
31
|
+
cancel: boolean;
|
32
|
+
};
|
33
|
+
}
|
@@ -0,0 +1,116 @@
|
|
1
|
+
import type { PropType } from 'vue';
|
2
|
+
import type { IMessage } from './props';
|
3
|
+
declare const _sfc_main: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
4
|
+
id: {
|
5
|
+
type: StringConstructor;
|
6
|
+
default: string;
|
7
|
+
};
|
8
|
+
message: {
|
9
|
+
type: PropType<IMessage>;
|
10
|
+
default: string;
|
11
|
+
};
|
12
|
+
type: {
|
13
|
+
type: PropType<"success" | "error" | "warning" | "strong" | "info">;
|
14
|
+
default: string;
|
15
|
+
};
|
16
|
+
duration: {
|
17
|
+
type: NumberConstructor;
|
18
|
+
default: number;
|
19
|
+
};
|
20
|
+
center: {
|
21
|
+
type: BooleanConstructor;
|
22
|
+
default: boolean;
|
23
|
+
};
|
24
|
+
onClose: {
|
25
|
+
type: PropType<() => void>;
|
26
|
+
default: () => void;
|
27
|
+
};
|
28
|
+
offset: {
|
29
|
+
type: NumberConstructor;
|
30
|
+
default: number;
|
31
|
+
};
|
32
|
+
zIndex: {
|
33
|
+
type: NumberConstructor;
|
34
|
+
default: number;
|
35
|
+
};
|
36
|
+
showClose: {
|
37
|
+
type: BooleanConstructor;
|
38
|
+
default: boolean;
|
39
|
+
};
|
40
|
+
useHTML: BooleanConstructor;
|
41
|
+
popupClass: {
|
42
|
+
type: StringConstructor;
|
43
|
+
default: undefined;
|
44
|
+
};
|
45
|
+
}>, {
|
46
|
+
cn: {
|
47
|
+
block: string;
|
48
|
+
element: (className: string) => string;
|
49
|
+
modifier: (className: string) => string;
|
50
|
+
is: (className: string) => string;
|
51
|
+
};
|
52
|
+
cls: import("vue").ComputedRef<(string | false | undefined)[]>;
|
53
|
+
styles: import("vue").ComputedRef<{
|
54
|
+
top: string;
|
55
|
+
zIndex: number;
|
56
|
+
}>;
|
57
|
+
visible: import("vue").Ref<boolean, boolean>;
|
58
|
+
handleClose: () => void;
|
59
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "destroy"[], "destroy", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
60
|
+
id: {
|
61
|
+
type: StringConstructor;
|
62
|
+
default: string;
|
63
|
+
};
|
64
|
+
message: {
|
65
|
+
type: PropType<IMessage>;
|
66
|
+
default: string;
|
67
|
+
};
|
68
|
+
type: {
|
69
|
+
type: PropType<"success" | "error" | "warning" | "strong" | "info">;
|
70
|
+
default: string;
|
71
|
+
};
|
72
|
+
duration: {
|
73
|
+
type: NumberConstructor;
|
74
|
+
default: number;
|
75
|
+
};
|
76
|
+
center: {
|
77
|
+
type: BooleanConstructor;
|
78
|
+
default: boolean;
|
79
|
+
};
|
80
|
+
onClose: {
|
81
|
+
type: PropType<() => void>;
|
82
|
+
default: () => void;
|
83
|
+
};
|
84
|
+
offset: {
|
85
|
+
type: NumberConstructor;
|
86
|
+
default: number;
|
87
|
+
};
|
88
|
+
zIndex: {
|
89
|
+
type: NumberConstructor;
|
90
|
+
default: number;
|
91
|
+
};
|
92
|
+
showClose: {
|
93
|
+
type: BooleanConstructor;
|
94
|
+
default: boolean;
|
95
|
+
};
|
96
|
+
useHTML: BooleanConstructor;
|
97
|
+
popupClass: {
|
98
|
+
type: StringConstructor;
|
99
|
+
default: undefined;
|
100
|
+
};
|
101
|
+
}>> & Readonly<{
|
102
|
+
onDestroy?: ((...args: any[]) => any) | undefined;
|
103
|
+
}>, {
|
104
|
+
zIndex: number;
|
105
|
+
offset: number;
|
106
|
+
center: boolean;
|
107
|
+
message: IMessage;
|
108
|
+
type: "success" | "error" | "warning" | "strong" | "info";
|
109
|
+
popupClass: string;
|
110
|
+
showClose: boolean;
|
111
|
+
onClose: () => void;
|
112
|
+
useHTML: boolean;
|
113
|
+
id: string;
|
114
|
+
duration: number;
|
115
|
+
}, {}, Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>>, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
116
|
+
export default _sfc_main;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import type { RenderFunction, VNode } from 'vue';
|
2
|
+
export declare const messageTypes: readonly ["success", "warning", "error", "strong", "info"];
|
3
|
+
export type IMessageType = (typeof messageTypes)[number];
|
4
|
+
export type IMessage = string | number | VNode | RenderFunction;
|
5
|
+
export interface IMessageOptions {
|
6
|
+
id?: string;
|
7
|
+
message?: IMessage;
|
8
|
+
type?: IMessageType;
|
9
|
+
duration?: number;
|
10
|
+
center?: boolean;
|
11
|
+
onClose?: (vm?: VNode) => void;
|
12
|
+
offset?: number;
|
13
|
+
renderTo?: string | HTMLElement;
|
14
|
+
showClose?: Boolean;
|
15
|
+
useHTML?: Boolean;
|
16
|
+
popupClass?: string;
|
17
|
+
}
|
18
|
+
export interface IMessageHandler {
|
19
|
+
close: () => void;
|
20
|
+
}
|
21
|
+
export interface IMessageCaller {
|
22
|
+
(options: IMessageParams): IMessageHandler;
|
23
|
+
}
|
24
|
+
export interface IMessageMethods extends IMessageCaller {
|
25
|
+
success(message: IMessage | IMessageOptions): IMessageHandler;
|
26
|
+
error(message: IMessage | IMessageOptions): IMessageHandler;
|
27
|
+
warning(message: IMessage | IMessageOptions): IMessageHandler;
|
28
|
+
strong(message: IMessage | IMessageOptions): IMessageHandler;
|
29
|
+
info(message: IMessage | IMessageOptions): IMessageHandler;
|
30
|
+
}
|
31
|
+
export type IMessageParams = IMessageOptions | string;
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import type { RenderFunction, VNode } from 'vue';
|
2
|
+
export declare const messageBoxStaticMethods: readonly ["info", "success", "warning", "strong", "error"];
|
3
|
+
export type MessageBoxStaticMethod = (typeof messageBoxStaticMethods)[number];
|
4
|
+
export type MessageBoxBeforeAction = () => boolean | Promise<boolean>;
|
5
|
+
export type MessageBoxContent = string | number | VNode | RenderFunction;
|
6
|
+
export interface MessageBoxOptions {
|
7
|
+
title?: MessageBoxContent;
|
8
|
+
type?: MessageBoxStaticMethod;
|
9
|
+
content?: MessageBoxContent;
|
10
|
+
footer?: boolean | ((scoped: MessageBoxFooterScoped) => VNode);
|
11
|
+
okText?: string;
|
12
|
+
cancelText?: string;
|
13
|
+
mask?: boolean;
|
14
|
+
maskToClose?: boolean;
|
15
|
+
onOk?: (e: Event) => void;
|
16
|
+
beforeOnOk?: MessageBoxBeforeAction;
|
17
|
+
onCancel?: (e: Event) => void;
|
18
|
+
beforeOnCancel?: MessageBoxBeforeAction;
|
19
|
+
width?: number | string;
|
20
|
+
height?: number | string;
|
21
|
+
top?: number | string;
|
22
|
+
center?: boolean;
|
23
|
+
renderTo?: string | HTMLElement;
|
24
|
+
hideCancel?: boolean;
|
25
|
+
hideOk?: boolean;
|
26
|
+
popupClass?: string;
|
27
|
+
}
|
28
|
+
export type MessageBoxFooterAction = 'cancel' | 'ok';
|
29
|
+
export interface MessageBoxFooterScoped {
|
30
|
+
cancel(): void;
|
31
|
+
ok(): void;
|
32
|
+
loadingObj?: {
|
33
|
+
ok: boolean;
|
34
|
+
cancel: boolean;
|
35
|
+
};
|
36
|
+
}
|
37
|
+
export interface MessageBoxCaller {
|
38
|
+
(options: MessageBoxOptions): void;
|
39
|
+
}
|
40
|
+
export type MessageBoxChainArgs = [() => boolean | Promise<boolean>, () => void] | [() => void];
|
41
|
+
export interface MessageBoxMethodReturn {
|
42
|
+
ok(...args: MessageBoxChainArgs): any;
|
43
|
+
cancel(...args: MessageBoxChainArgs): any;
|
44
|
+
}
|
45
|
+
export interface MessageBoxMethods extends MessageBoxCaller {
|
46
|
+
info(title: MessageBoxContent, content?: MessageBoxContent): MessageBoxMethodReturn;
|
47
|
+
success(title: MessageBoxContent, content?: MessageBoxContent): MessageBoxMethodReturn;
|
48
|
+
warning(title: MessageBoxContent, content?: MessageBoxContent): MessageBoxMethodReturn;
|
49
|
+
strong(title: MessageBoxContent, content?: MessageBoxContent): MessageBoxMethodReturn;
|
50
|
+
error(title: MessageBoxContent, content?: MessageBoxContent): MessageBoxMethodReturn;
|
51
|
+
}
|
52
|
+
export type MessageBoxMethodOption = string | MessageBoxOptions;
|