@xn-lib/component 0.1.30 → 0.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.iife.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/index.umd.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/cascader/index.vue.d.ts +2 -2
- package/dist/types/editable-textarea/index.vue.d.ts +1 -1
- package/dist/types/form-list/index.vue.d.ts +4 -4
- package/dist/types/index.d.ts +4 -1
- package/dist/types/modal/index.d.ts +5 -0
- package/dist/types/modal/index.vue.d.ts +567 -0
- package/dist/types/modal/props.d.ts +75 -0
- package/dist/types/table/components/TableMain.vue.d.ts +70 -0
- package/dist/types/table/components/TablePagination.vue.d.ts +24 -0
- package/dist/types/table/components/TableToolbar.vue.d.ts +18 -0
- package/dist/types/table/components/ToolbarButtonGroup.vue.d.ts +23 -0
- package/dist/types/table/composables/index.d.ts +2 -0
- package/dist/types/table/composables/store.d.ts +399 -0
- package/dist/types/table/index.d.ts +6 -0
- package/dist/types/table/index.vue.d.ts +262 -0
- package/dist/types/table/props.d.ts +100 -0
- package/dist/types/time-range-picker/props.d.ts +1 -0
- package/dist/types/time-range-picker/utils.d.ts +1 -1
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/table.d.ts +322 -0
- package/package.json +1 -1
|
@@ -0,0 +1,567 @@
|
|
|
1
|
+
import type { ModalFormConfig } from '../types';
|
|
2
|
+
/** 打开 */
|
|
3
|
+
declare function open(openData?: any): void;
|
|
4
|
+
/** 关闭 */
|
|
5
|
+
declare function close(): void;
|
|
6
|
+
/** 确定按钮点击 */
|
|
7
|
+
declare function handleOk(): Promise<void>;
|
|
8
|
+
/** 取消按钮点击 */
|
|
9
|
+
declare function handleCancel(): Promise<void>;
|
|
10
|
+
/** 手动确认(供外部调用,同确定按钮逻辑) */
|
|
11
|
+
declare function confirm(confirmData?: any): Promise<void>;
|
|
12
|
+
/** 重置表单 */
|
|
13
|
+
declare function resetFields(): void;
|
|
14
|
+
/** 清除校验 */
|
|
15
|
+
declare function clearValidate(props?: string | string[]): void;
|
|
16
|
+
declare var __VLS_22: {
|
|
17
|
+
data: any;
|
|
18
|
+
close: typeof close;
|
|
19
|
+
confirm: typeof handleOk;
|
|
20
|
+
}, __VLS_24: {
|
|
21
|
+
data: any;
|
|
22
|
+
close: typeof close;
|
|
23
|
+
confirm: typeof handleOk;
|
|
24
|
+
}, __VLS_27: {
|
|
25
|
+
data: any;
|
|
26
|
+
close: typeof handleCancel;
|
|
27
|
+
confirm: typeof handleOk;
|
|
28
|
+
}, __VLS_46: {
|
|
29
|
+
data: any;
|
|
30
|
+
close: typeof close;
|
|
31
|
+
};
|
|
32
|
+
type __VLS_Slots = {} & {
|
|
33
|
+
default?: (props: typeof __VLS_22) => any;
|
|
34
|
+
} & {
|
|
35
|
+
default?: (props: typeof __VLS_24) => any;
|
|
36
|
+
} & {
|
|
37
|
+
footer?: (props: typeof __VLS_27) => any;
|
|
38
|
+
} & {
|
|
39
|
+
header?: (props: typeof __VLS_46) => any;
|
|
40
|
+
};
|
|
41
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
42
|
+
readonly type: {
|
|
43
|
+
readonly type: import("vue").PropType<"dialog" | "drawer">;
|
|
44
|
+
readonly default: "dialog";
|
|
45
|
+
};
|
|
46
|
+
readonly title: {
|
|
47
|
+
readonly type: import("vue").PropType<string | ((data?: any) => string)>;
|
|
48
|
+
readonly default: "";
|
|
49
|
+
};
|
|
50
|
+
readonly width: {
|
|
51
|
+
readonly type: import("vue").PropType<string | number>;
|
|
52
|
+
readonly default: "500px";
|
|
53
|
+
};
|
|
54
|
+
readonly destroyOnClose: {
|
|
55
|
+
readonly type: BooleanConstructor;
|
|
56
|
+
readonly default: true;
|
|
57
|
+
};
|
|
58
|
+
readonly closeOnClickModal: {
|
|
59
|
+
readonly type: BooleanConstructor;
|
|
60
|
+
readonly default: true;
|
|
61
|
+
};
|
|
62
|
+
readonly closeOnPressEscape: {
|
|
63
|
+
readonly type: BooleanConstructor;
|
|
64
|
+
readonly default: true;
|
|
65
|
+
};
|
|
66
|
+
readonly appendToBody: {
|
|
67
|
+
readonly type: BooleanConstructor;
|
|
68
|
+
readonly default: true;
|
|
69
|
+
};
|
|
70
|
+
readonly placement: {
|
|
71
|
+
readonly type: import("vue").PropType<"left" | "right" | "top" | "bottom">;
|
|
72
|
+
readonly default: "right";
|
|
73
|
+
};
|
|
74
|
+
readonly showFooter: {
|
|
75
|
+
readonly type: BooleanConstructor;
|
|
76
|
+
readonly default: true;
|
|
77
|
+
};
|
|
78
|
+
readonly cancelText: {
|
|
79
|
+
readonly type: StringConstructor;
|
|
80
|
+
readonly default: "取消";
|
|
81
|
+
};
|
|
82
|
+
readonly confirmText: {
|
|
83
|
+
readonly type: StringConstructor;
|
|
84
|
+
readonly default: "确定";
|
|
85
|
+
};
|
|
86
|
+
readonly form: {
|
|
87
|
+
readonly type: import("vue").PropType<ModalFormConfig>;
|
|
88
|
+
readonly default: undefined;
|
|
89
|
+
};
|
|
90
|
+
readonly onOk: {
|
|
91
|
+
readonly type: import("vue").PropType<(data?: any) => boolean | Promise<boolean | void> | void>;
|
|
92
|
+
readonly default: undefined;
|
|
93
|
+
};
|
|
94
|
+
readonly onCancel: {
|
|
95
|
+
readonly type: import("vue").PropType<(data?: any) => boolean | Promise<boolean | void> | void>;
|
|
96
|
+
readonly default: undefined;
|
|
97
|
+
};
|
|
98
|
+
}>, {
|
|
99
|
+
open: typeof open;
|
|
100
|
+
close: typeof close;
|
|
101
|
+
confirm: typeof confirm;
|
|
102
|
+
visible: import("vue").Ref<boolean, boolean>;
|
|
103
|
+
data: import("vue").Ref<any, any>;
|
|
104
|
+
formRef: import("vue").Ref<({
|
|
105
|
+
$: import("vue").ComponentInternalInstance;
|
|
106
|
+
$data: {};
|
|
107
|
+
$props: Partial<{
|
|
108
|
+
readonly inline: boolean;
|
|
109
|
+
readonly disabled: boolean;
|
|
110
|
+
readonly labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
111
|
+
readonly labelPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "top" | "left" | "right", unknown>;
|
|
112
|
+
readonly inlineMessage: boolean;
|
|
113
|
+
readonly showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
114
|
+
readonly requireAsteriskPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "left" | "right", unknown>;
|
|
115
|
+
readonly labelSuffix: string;
|
|
116
|
+
readonly validateOnRuleChange: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
117
|
+
readonly statusIcon: boolean;
|
|
118
|
+
readonly hideRequiredAsterisk: boolean;
|
|
119
|
+
readonly scrollToError: boolean;
|
|
120
|
+
}> & Omit<{
|
|
121
|
+
readonly disabled: boolean;
|
|
122
|
+
readonly labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
123
|
+
readonly labelPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "top" | "right" | "left", unknown>;
|
|
124
|
+
readonly inline: boolean;
|
|
125
|
+
readonly validateOnRuleChange: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
126
|
+
readonly hideRequiredAsterisk: boolean;
|
|
127
|
+
readonly showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
128
|
+
readonly inlineMessage: boolean;
|
|
129
|
+
readonly statusIcon: boolean;
|
|
130
|
+
readonly scrollToError: boolean;
|
|
131
|
+
readonly requireAsteriskPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "right" | "left", unknown>;
|
|
132
|
+
readonly labelSuffix: string;
|
|
133
|
+
readonly size?: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown> | undefined;
|
|
134
|
+
readonly rules?: Partial<Record<string, import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>>> | undefined;
|
|
135
|
+
readonly model?: Record<string, any> | undefined;
|
|
136
|
+
readonly scrollIntoViewOptions?: import("element-plus/es/utils").EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown> | undefined;
|
|
137
|
+
onValidate?: ((prop: import("element-plus").FormItemProp, isValid: boolean, message: string) => any) | undefined | undefined;
|
|
138
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "labelWidth" | "labelPosition" | "inline" | "validateOnRuleChange" | "hideRequiredAsterisk" | "showMessage" | "inlineMessage" | "statusIcon" | "scrollToError" | "requireAsteriskPosition" | "labelSuffix">;
|
|
139
|
+
$attrs: {
|
|
140
|
+
[x: string]: unknown;
|
|
141
|
+
};
|
|
142
|
+
$refs: {
|
|
143
|
+
[x: string]: unknown;
|
|
144
|
+
};
|
|
145
|
+
$slots: Readonly<{
|
|
146
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
147
|
+
}>;
|
|
148
|
+
$root: import("vue").ComponentPublicInstance | null;
|
|
149
|
+
$parent: import("vue").ComponentPublicInstance | null;
|
|
150
|
+
$host: Element | null;
|
|
151
|
+
$emit: (event: "validate", prop: import("element-plus").FormItemProp, isValid: boolean, message: string) => void;
|
|
152
|
+
$el: any;
|
|
153
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
154
|
+
readonly model: ObjectConstructor;
|
|
155
|
+
readonly rules: {
|
|
156
|
+
readonly type: import("vue").PropType<Partial<Record<string, import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>>>>;
|
|
157
|
+
readonly required: false;
|
|
158
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
159
|
+
__epPropKey: true;
|
|
160
|
+
};
|
|
161
|
+
readonly labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "top" | "left" | "right", unknown, "right", boolean>;
|
|
162
|
+
readonly requireAsteriskPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "left" | "right", unknown, "left", boolean>;
|
|
163
|
+
readonly labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
164
|
+
readonly labelSuffix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
165
|
+
readonly inline: BooleanConstructor;
|
|
166
|
+
readonly inlineMessage: BooleanConstructor;
|
|
167
|
+
readonly statusIcon: BooleanConstructor;
|
|
168
|
+
readonly showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
169
|
+
readonly validateOnRuleChange: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
170
|
+
readonly hideRequiredAsterisk: BooleanConstructor;
|
|
171
|
+
readonly scrollToError: BooleanConstructor;
|
|
172
|
+
readonly scrollIntoViewOptions: {
|
|
173
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown>>;
|
|
174
|
+
readonly required: false;
|
|
175
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
176
|
+
__epPropKey: true;
|
|
177
|
+
};
|
|
178
|
+
readonly size: {
|
|
179
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown>>;
|
|
180
|
+
readonly required: false;
|
|
181
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
182
|
+
__epPropKey: true;
|
|
183
|
+
};
|
|
184
|
+
readonly disabled: BooleanConstructor;
|
|
185
|
+
}>> & {
|
|
186
|
+
onValidate?: ((prop: import("element-plus").FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
187
|
+
}, {
|
|
188
|
+
validate: (callback?: import("element-plus").FormValidateCallback | undefined) => import("element-plus").FormValidationResult;
|
|
189
|
+
validateField: (props?: import("element-plus/es/utils").Arrayable<import("element-plus").FormItemProp> | undefined, callback?: import("element-plus").FormValidateCallback | undefined) => import("element-plus").FormValidationResult;
|
|
190
|
+
resetFields: (props?: import("element-plus/es/utils").Arrayable<import("element-plus").FormItemProp> | undefined) => void;
|
|
191
|
+
clearValidate: (props?: import("element-plus/es/utils").Arrayable<import("element-plus").FormItemProp> | undefined) => void;
|
|
192
|
+
scrollToField: (prop: import("element-plus").FormItemProp) => void;
|
|
193
|
+
fields: import("element-plus").FormItemContext[];
|
|
194
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
195
|
+
validate: (prop: import("element-plus").FormItemProp, isValid: boolean, message: string) => void;
|
|
196
|
+
}, string, {
|
|
197
|
+
readonly inline: boolean;
|
|
198
|
+
readonly disabled: boolean;
|
|
199
|
+
readonly labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
200
|
+
readonly labelPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "top" | "left" | "right", unknown>;
|
|
201
|
+
readonly inlineMessage: boolean;
|
|
202
|
+
readonly showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
203
|
+
readonly requireAsteriskPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "left" | "right", unknown>;
|
|
204
|
+
readonly labelSuffix: string;
|
|
205
|
+
readonly validateOnRuleChange: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
206
|
+
readonly statusIcon: boolean;
|
|
207
|
+
readonly hideRequiredAsterisk: boolean;
|
|
208
|
+
readonly scrollToError: boolean;
|
|
209
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
210
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
211
|
+
created?: (() => void) | (() => void)[];
|
|
212
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
213
|
+
mounted?: (() => void) | (() => void)[];
|
|
214
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
215
|
+
updated?: (() => void) | (() => void)[];
|
|
216
|
+
activated?: (() => void) | (() => void)[];
|
|
217
|
+
deactivated?: (() => void) | (() => void)[];
|
|
218
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
219
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
220
|
+
destroyed?: (() => void) | (() => void)[];
|
|
221
|
+
unmounted?: (() => void) | (() => void)[];
|
|
222
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
223
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
224
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
225
|
+
};
|
|
226
|
+
$forceUpdate: () => void;
|
|
227
|
+
$nextTick: typeof import("vue").nextTick;
|
|
228
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
229
|
+
} & Readonly<{
|
|
230
|
+
readonly inline: boolean;
|
|
231
|
+
readonly disabled: boolean;
|
|
232
|
+
readonly labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
233
|
+
readonly labelPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "top" | "left" | "right", unknown>;
|
|
234
|
+
readonly inlineMessage: boolean;
|
|
235
|
+
readonly showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
236
|
+
readonly requireAsteriskPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "left" | "right", unknown>;
|
|
237
|
+
readonly labelSuffix: string;
|
|
238
|
+
readonly validateOnRuleChange: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
239
|
+
readonly statusIcon: boolean;
|
|
240
|
+
readonly hideRequiredAsterisk: boolean;
|
|
241
|
+
readonly scrollToError: boolean;
|
|
242
|
+
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
243
|
+
readonly model: ObjectConstructor;
|
|
244
|
+
readonly rules: {
|
|
245
|
+
readonly type: import("vue").PropType<Partial<Record<string, import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>>>>;
|
|
246
|
+
readonly required: false;
|
|
247
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
248
|
+
__epPropKey: true;
|
|
249
|
+
};
|
|
250
|
+
readonly labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "top" | "left" | "right", unknown, "right", boolean>;
|
|
251
|
+
readonly requireAsteriskPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "left" | "right", unknown, "left", boolean>;
|
|
252
|
+
readonly labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
253
|
+
readonly labelSuffix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
254
|
+
readonly inline: BooleanConstructor;
|
|
255
|
+
readonly inlineMessage: BooleanConstructor;
|
|
256
|
+
readonly statusIcon: BooleanConstructor;
|
|
257
|
+
readonly showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
258
|
+
readonly validateOnRuleChange: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
259
|
+
readonly hideRequiredAsterisk: BooleanConstructor;
|
|
260
|
+
readonly scrollToError: BooleanConstructor;
|
|
261
|
+
readonly scrollIntoViewOptions: {
|
|
262
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown>>;
|
|
263
|
+
readonly required: false;
|
|
264
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
265
|
+
__epPropKey: true;
|
|
266
|
+
};
|
|
267
|
+
readonly size: {
|
|
268
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown>>;
|
|
269
|
+
readonly required: false;
|
|
270
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
271
|
+
__epPropKey: true;
|
|
272
|
+
};
|
|
273
|
+
readonly disabled: BooleanConstructor;
|
|
274
|
+
}>> & {
|
|
275
|
+
onValidate?: ((prop: import("element-plus").FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
276
|
+
}, "disabled" | "labelWidth" | "labelPosition" | "fields" | "inline" | "validateOnRuleChange" | "hideRequiredAsterisk" | "showMessage" | "inlineMessage" | "statusIcon" | "scrollToError" | "requireAsteriskPosition" | "labelSuffix" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField"> & import("vue").ShallowUnwrapRef<{
|
|
277
|
+
validate: (callback?: import("element-plus").FormValidateCallback | undefined) => import("element-plus").FormValidationResult;
|
|
278
|
+
validateField: (props?: import("element-plus/es/utils").Arrayable<import("element-plus").FormItemProp> | undefined, callback?: import("element-plus").FormValidateCallback | undefined) => import("element-plus").FormValidationResult;
|
|
279
|
+
resetFields: (props?: import("element-plus/es/utils").Arrayable<import("element-plus").FormItemProp> | undefined) => void;
|
|
280
|
+
clearValidate: (props?: import("element-plus/es/utils").Arrayable<import("element-plus").FormItemProp> | undefined) => void;
|
|
281
|
+
scrollToField: (prop: import("element-plus").FormItemProp) => void;
|
|
282
|
+
fields: import("element-plus").FormItemContext[];
|
|
283
|
+
}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
284
|
+
$slots: {
|
|
285
|
+
default?(_: {}): any;
|
|
286
|
+
};
|
|
287
|
+
}) | undefined, ({
|
|
288
|
+
$: import("vue").ComponentInternalInstance;
|
|
289
|
+
$data: {};
|
|
290
|
+
$props: Partial<{
|
|
291
|
+
readonly inline: boolean;
|
|
292
|
+
readonly disabled: boolean;
|
|
293
|
+
readonly labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
294
|
+
readonly labelPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "top" | "left" | "right", unknown>;
|
|
295
|
+
readonly inlineMessage: boolean;
|
|
296
|
+
readonly showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
297
|
+
readonly requireAsteriskPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "left" | "right", unknown>;
|
|
298
|
+
readonly labelSuffix: string;
|
|
299
|
+
readonly validateOnRuleChange: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
300
|
+
readonly statusIcon: boolean;
|
|
301
|
+
readonly hideRequiredAsterisk: boolean;
|
|
302
|
+
readonly scrollToError: boolean;
|
|
303
|
+
}> & Omit<{
|
|
304
|
+
readonly disabled: boolean;
|
|
305
|
+
readonly labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
306
|
+
readonly labelPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "top" | "right" | "left", unknown>;
|
|
307
|
+
readonly inline: boolean;
|
|
308
|
+
readonly validateOnRuleChange: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
309
|
+
readonly hideRequiredAsterisk: boolean;
|
|
310
|
+
readonly showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
311
|
+
readonly inlineMessage: boolean;
|
|
312
|
+
readonly statusIcon: boolean;
|
|
313
|
+
readonly scrollToError: boolean;
|
|
314
|
+
readonly requireAsteriskPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "right" | "left", unknown>;
|
|
315
|
+
readonly labelSuffix: string;
|
|
316
|
+
readonly size?: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown> | undefined;
|
|
317
|
+
readonly rules?: Partial<Record<string, import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>>> | undefined;
|
|
318
|
+
readonly model?: Record<string, any> | undefined;
|
|
319
|
+
readonly scrollIntoViewOptions?: import("element-plus/es/utils").EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown> | undefined;
|
|
320
|
+
onValidate?: ((prop: import("element-plus").FormItemProp, isValid: boolean, message: string) => any) | undefined | undefined;
|
|
321
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "labelWidth" | "labelPosition" | "inline" | "validateOnRuleChange" | "hideRequiredAsterisk" | "showMessage" | "inlineMessage" | "statusIcon" | "scrollToError" | "requireAsteriskPosition" | "labelSuffix">;
|
|
322
|
+
$attrs: {
|
|
323
|
+
[x: string]: unknown;
|
|
324
|
+
};
|
|
325
|
+
$refs: {
|
|
326
|
+
[x: string]: unknown;
|
|
327
|
+
};
|
|
328
|
+
$slots: Readonly<{
|
|
329
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
330
|
+
}>;
|
|
331
|
+
$root: import("vue").ComponentPublicInstance | null;
|
|
332
|
+
$parent: import("vue").ComponentPublicInstance | null;
|
|
333
|
+
$host: Element | null;
|
|
334
|
+
$emit: (event: "validate", prop: import("element-plus").FormItemProp, isValid: boolean, message: string) => void;
|
|
335
|
+
$el: any;
|
|
336
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
337
|
+
readonly model: ObjectConstructor;
|
|
338
|
+
readonly rules: {
|
|
339
|
+
readonly type: import("vue").PropType<Partial<Record<string, import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>>>>;
|
|
340
|
+
readonly required: false;
|
|
341
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
342
|
+
__epPropKey: true;
|
|
343
|
+
};
|
|
344
|
+
readonly labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "top" | "left" | "right", unknown, "right", boolean>;
|
|
345
|
+
readonly requireAsteriskPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "left" | "right", unknown, "left", boolean>;
|
|
346
|
+
readonly labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
347
|
+
readonly labelSuffix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
348
|
+
readonly inline: BooleanConstructor;
|
|
349
|
+
readonly inlineMessage: BooleanConstructor;
|
|
350
|
+
readonly statusIcon: BooleanConstructor;
|
|
351
|
+
readonly showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
352
|
+
readonly validateOnRuleChange: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
353
|
+
readonly hideRequiredAsterisk: BooleanConstructor;
|
|
354
|
+
readonly scrollToError: BooleanConstructor;
|
|
355
|
+
readonly scrollIntoViewOptions: {
|
|
356
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown>>;
|
|
357
|
+
readonly required: false;
|
|
358
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
359
|
+
__epPropKey: true;
|
|
360
|
+
};
|
|
361
|
+
readonly size: {
|
|
362
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown>>;
|
|
363
|
+
readonly required: false;
|
|
364
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
365
|
+
__epPropKey: true;
|
|
366
|
+
};
|
|
367
|
+
readonly disabled: BooleanConstructor;
|
|
368
|
+
}>> & {
|
|
369
|
+
onValidate?: ((prop: import("element-plus").FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
370
|
+
}, {
|
|
371
|
+
validate: (callback?: import("element-plus").FormValidateCallback | undefined) => import("element-plus").FormValidationResult;
|
|
372
|
+
validateField: (props?: import("element-plus/es/utils").Arrayable<import("element-plus").FormItemProp> | undefined, callback?: import("element-plus").FormValidateCallback | undefined) => import("element-plus").FormValidationResult;
|
|
373
|
+
resetFields: (props?: import("element-plus/es/utils").Arrayable<import("element-plus").FormItemProp> | undefined) => void;
|
|
374
|
+
clearValidate: (props?: import("element-plus/es/utils").Arrayable<import("element-plus").FormItemProp> | undefined) => void;
|
|
375
|
+
scrollToField: (prop: import("element-plus").FormItemProp) => void;
|
|
376
|
+
fields: import("element-plus").FormItemContext[];
|
|
377
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
378
|
+
validate: (prop: import("element-plus").FormItemProp, isValid: boolean, message: string) => void;
|
|
379
|
+
}, string, {
|
|
380
|
+
readonly inline: boolean;
|
|
381
|
+
readonly disabled: boolean;
|
|
382
|
+
readonly labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
383
|
+
readonly labelPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "top" | "left" | "right", unknown>;
|
|
384
|
+
readonly inlineMessage: boolean;
|
|
385
|
+
readonly showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
386
|
+
readonly requireAsteriskPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "left" | "right", unknown>;
|
|
387
|
+
readonly labelSuffix: string;
|
|
388
|
+
readonly validateOnRuleChange: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
389
|
+
readonly statusIcon: boolean;
|
|
390
|
+
readonly hideRequiredAsterisk: boolean;
|
|
391
|
+
readonly scrollToError: boolean;
|
|
392
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
393
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
394
|
+
created?: (() => void) | (() => void)[];
|
|
395
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
396
|
+
mounted?: (() => void) | (() => void)[];
|
|
397
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
398
|
+
updated?: (() => void) | (() => void)[];
|
|
399
|
+
activated?: (() => void) | (() => void)[];
|
|
400
|
+
deactivated?: (() => void) | (() => void)[];
|
|
401
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
402
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
403
|
+
destroyed?: (() => void) | (() => void)[];
|
|
404
|
+
unmounted?: (() => void) | (() => void)[];
|
|
405
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
406
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
407
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
408
|
+
};
|
|
409
|
+
$forceUpdate: () => void;
|
|
410
|
+
$nextTick: typeof import("vue").nextTick;
|
|
411
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
412
|
+
} & Readonly<{
|
|
413
|
+
readonly inline: boolean;
|
|
414
|
+
readonly disabled: boolean;
|
|
415
|
+
readonly labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
416
|
+
readonly labelPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "top" | "left" | "right", unknown>;
|
|
417
|
+
readonly inlineMessage: boolean;
|
|
418
|
+
readonly showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
419
|
+
readonly requireAsteriskPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "left" | "right", unknown>;
|
|
420
|
+
readonly labelSuffix: string;
|
|
421
|
+
readonly validateOnRuleChange: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
422
|
+
readonly statusIcon: boolean;
|
|
423
|
+
readonly hideRequiredAsterisk: boolean;
|
|
424
|
+
readonly scrollToError: boolean;
|
|
425
|
+
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
426
|
+
readonly model: ObjectConstructor;
|
|
427
|
+
readonly rules: {
|
|
428
|
+
readonly type: import("vue").PropType<Partial<Record<string, import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>>>>;
|
|
429
|
+
readonly required: false;
|
|
430
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
431
|
+
__epPropKey: true;
|
|
432
|
+
};
|
|
433
|
+
readonly labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "top" | "left" | "right", unknown, "right", boolean>;
|
|
434
|
+
readonly requireAsteriskPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "left" | "right", unknown, "left", boolean>;
|
|
435
|
+
readonly labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
436
|
+
readonly labelSuffix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
437
|
+
readonly inline: BooleanConstructor;
|
|
438
|
+
readonly inlineMessage: BooleanConstructor;
|
|
439
|
+
readonly statusIcon: BooleanConstructor;
|
|
440
|
+
readonly showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
441
|
+
readonly validateOnRuleChange: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
442
|
+
readonly hideRequiredAsterisk: BooleanConstructor;
|
|
443
|
+
readonly scrollToError: BooleanConstructor;
|
|
444
|
+
readonly scrollIntoViewOptions: {
|
|
445
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown>>;
|
|
446
|
+
readonly required: false;
|
|
447
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
448
|
+
__epPropKey: true;
|
|
449
|
+
};
|
|
450
|
+
readonly size: {
|
|
451
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown>>;
|
|
452
|
+
readonly required: false;
|
|
453
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
454
|
+
__epPropKey: true;
|
|
455
|
+
};
|
|
456
|
+
readonly disabled: BooleanConstructor;
|
|
457
|
+
}>> & {
|
|
458
|
+
onValidate?: ((prop: import("element-plus").FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
459
|
+
}, "disabled" | "labelWidth" | "labelPosition" | "fields" | "inline" | "validateOnRuleChange" | "hideRequiredAsterisk" | "showMessage" | "inlineMessage" | "statusIcon" | "scrollToError" | "requireAsteriskPosition" | "labelSuffix" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField"> & import("vue").ShallowUnwrapRef<{
|
|
460
|
+
validate: (callback?: import("element-plus").FormValidateCallback | undefined) => import("element-plus").FormValidationResult;
|
|
461
|
+
validateField: (props?: import("element-plus/es/utils").Arrayable<import("element-plus").FormItemProp> | undefined, callback?: import("element-plus").FormValidateCallback | undefined) => import("element-plus").FormValidationResult;
|
|
462
|
+
resetFields: (props?: import("element-plus/es/utils").Arrayable<import("element-plus").FormItemProp> | undefined) => void;
|
|
463
|
+
clearValidate: (props?: import("element-plus/es/utils").Arrayable<import("element-plus").FormItemProp> | undefined) => void;
|
|
464
|
+
scrollToField: (prop: import("element-plus").FormItemProp) => void;
|
|
465
|
+
fields: import("element-plus").FormItemContext[];
|
|
466
|
+
}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
467
|
+
$slots: {
|
|
468
|
+
default?(_: {}): any;
|
|
469
|
+
};
|
|
470
|
+
}) | undefined>;
|
|
471
|
+
resetFields: typeof resetFields;
|
|
472
|
+
clearValidate: typeof clearValidate;
|
|
473
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
474
|
+
cancel: () => any;
|
|
475
|
+
close: () => any;
|
|
476
|
+
open: (data?: any) => any;
|
|
477
|
+
confirm: (data?: any) => any;
|
|
478
|
+
opened: () => any;
|
|
479
|
+
closed: () => any;
|
|
480
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
481
|
+
readonly type: {
|
|
482
|
+
readonly type: import("vue").PropType<"dialog" | "drawer">;
|
|
483
|
+
readonly default: "dialog";
|
|
484
|
+
};
|
|
485
|
+
readonly title: {
|
|
486
|
+
readonly type: import("vue").PropType<string | ((data?: any) => string)>;
|
|
487
|
+
readonly default: "";
|
|
488
|
+
};
|
|
489
|
+
readonly width: {
|
|
490
|
+
readonly type: import("vue").PropType<string | number>;
|
|
491
|
+
readonly default: "500px";
|
|
492
|
+
};
|
|
493
|
+
readonly destroyOnClose: {
|
|
494
|
+
readonly type: BooleanConstructor;
|
|
495
|
+
readonly default: true;
|
|
496
|
+
};
|
|
497
|
+
readonly closeOnClickModal: {
|
|
498
|
+
readonly type: BooleanConstructor;
|
|
499
|
+
readonly default: true;
|
|
500
|
+
};
|
|
501
|
+
readonly closeOnPressEscape: {
|
|
502
|
+
readonly type: BooleanConstructor;
|
|
503
|
+
readonly default: true;
|
|
504
|
+
};
|
|
505
|
+
readonly appendToBody: {
|
|
506
|
+
readonly type: BooleanConstructor;
|
|
507
|
+
readonly default: true;
|
|
508
|
+
};
|
|
509
|
+
readonly placement: {
|
|
510
|
+
readonly type: import("vue").PropType<"left" | "right" | "top" | "bottom">;
|
|
511
|
+
readonly default: "right";
|
|
512
|
+
};
|
|
513
|
+
readonly showFooter: {
|
|
514
|
+
readonly type: BooleanConstructor;
|
|
515
|
+
readonly default: true;
|
|
516
|
+
};
|
|
517
|
+
readonly cancelText: {
|
|
518
|
+
readonly type: StringConstructor;
|
|
519
|
+
readonly default: "取消";
|
|
520
|
+
};
|
|
521
|
+
readonly confirmText: {
|
|
522
|
+
readonly type: StringConstructor;
|
|
523
|
+
readonly default: "确定";
|
|
524
|
+
};
|
|
525
|
+
readonly form: {
|
|
526
|
+
readonly type: import("vue").PropType<ModalFormConfig>;
|
|
527
|
+
readonly default: undefined;
|
|
528
|
+
};
|
|
529
|
+
readonly onOk: {
|
|
530
|
+
readonly type: import("vue").PropType<(data?: any) => boolean | Promise<boolean | void> | void>;
|
|
531
|
+
readonly default: undefined;
|
|
532
|
+
};
|
|
533
|
+
readonly onCancel: {
|
|
534
|
+
readonly type: import("vue").PropType<(data?: any) => boolean | Promise<boolean | void> | void>;
|
|
535
|
+
readonly default: undefined;
|
|
536
|
+
};
|
|
537
|
+
}>> & Readonly<{
|
|
538
|
+
onCancel?: (() => any) | undefined;
|
|
539
|
+
onClose?: (() => any) | undefined;
|
|
540
|
+
onOpen?: ((data?: any) => any) | undefined;
|
|
541
|
+
onConfirm?: ((data?: any) => any) | undefined;
|
|
542
|
+
onOpened?: (() => any) | undefined;
|
|
543
|
+
onClosed?: (() => any) | undefined;
|
|
544
|
+
}>, {
|
|
545
|
+
readonly form: ModalFormConfig;
|
|
546
|
+
readonly title: string | ((data?: any) => string);
|
|
547
|
+
readonly type: "dialog" | "drawer";
|
|
548
|
+
readonly width: string | number;
|
|
549
|
+
readonly placement: "top" | "bottom" | "right" | "left";
|
|
550
|
+
readonly destroyOnClose: boolean;
|
|
551
|
+
readonly closeOnClickModal: boolean;
|
|
552
|
+
readonly closeOnPressEscape: boolean;
|
|
553
|
+
readonly appendToBody: boolean;
|
|
554
|
+
readonly showFooter: boolean;
|
|
555
|
+
readonly cancelText: string;
|
|
556
|
+
readonly confirmText: string;
|
|
557
|
+
readonly onOk: (data?: any) => boolean | Promise<boolean | void> | void;
|
|
558
|
+
readonly onCancel: (data?: any) => boolean | Promise<boolean | void> | void;
|
|
559
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
560
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
561
|
+
declare const _default: typeof __VLS_export;
|
|
562
|
+
export default _default;
|
|
563
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
564
|
+
new (): {
|
|
565
|
+
$slots: S;
|
|
566
|
+
};
|
|
567
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
import type { ModalFormConfig } from '../types';
|
|
3
|
+
export declare const modalProps: {
|
|
4
|
+
/** 交互类型 */
|
|
5
|
+
readonly type: {
|
|
6
|
+
readonly type: PropType<"dialog" | "drawer">;
|
|
7
|
+
readonly default: "dialog";
|
|
8
|
+
};
|
|
9
|
+
/** 标题,支持字符串或函数返回 */
|
|
10
|
+
readonly title: {
|
|
11
|
+
readonly type: PropType<string | ((data?: any) => string)>;
|
|
12
|
+
readonly default: "";
|
|
13
|
+
};
|
|
14
|
+
/** 宽度 */
|
|
15
|
+
readonly width: {
|
|
16
|
+
readonly type: PropType<string | number>;
|
|
17
|
+
readonly default: "500px";
|
|
18
|
+
};
|
|
19
|
+
/** 是否在关闭时销毁 */
|
|
20
|
+
readonly destroyOnClose: {
|
|
21
|
+
readonly type: BooleanConstructor;
|
|
22
|
+
readonly default: true;
|
|
23
|
+
};
|
|
24
|
+
/** 点击遮罩关闭 */
|
|
25
|
+
readonly closeOnClickModal: {
|
|
26
|
+
readonly type: BooleanConstructor;
|
|
27
|
+
readonly default: true;
|
|
28
|
+
};
|
|
29
|
+
/** ESC 关闭 */
|
|
30
|
+
readonly closeOnPressEscape: {
|
|
31
|
+
readonly type: BooleanConstructor;
|
|
32
|
+
readonly default: true;
|
|
33
|
+
};
|
|
34
|
+
/** 是否追加到 body */
|
|
35
|
+
readonly appendToBody: {
|
|
36
|
+
readonly type: BooleanConstructor;
|
|
37
|
+
readonly default: true;
|
|
38
|
+
};
|
|
39
|
+
/** drawer 方向 */
|
|
40
|
+
readonly placement: {
|
|
41
|
+
readonly type: PropType<"left" | "right" | "top" | "bottom">;
|
|
42
|
+
readonly default: "right";
|
|
43
|
+
};
|
|
44
|
+
/** 是否显示底部按钮 */
|
|
45
|
+
readonly showFooter: {
|
|
46
|
+
readonly type: BooleanConstructor;
|
|
47
|
+
readonly default: true;
|
|
48
|
+
};
|
|
49
|
+
/** 取消按钮文本 */
|
|
50
|
+
readonly cancelText: {
|
|
51
|
+
readonly type: StringConstructor;
|
|
52
|
+
readonly default: "取消";
|
|
53
|
+
};
|
|
54
|
+
/** 确定按钮文本 */
|
|
55
|
+
readonly confirmText: {
|
|
56
|
+
readonly type: StringConstructor;
|
|
57
|
+
readonly default: "确定";
|
|
58
|
+
};
|
|
59
|
+
/** 表单配置,有值时自动包裹 el-form 并校验 */
|
|
60
|
+
readonly form: {
|
|
61
|
+
readonly type: PropType<ModalFormConfig>;
|
|
62
|
+
readonly default: undefined;
|
|
63
|
+
};
|
|
64
|
+
/** 确定回调,返回 false 阻止关闭,支持 Promise */
|
|
65
|
+
readonly onOk: {
|
|
66
|
+
readonly type: PropType<(data?: any) => boolean | Promise<boolean | void> | void>;
|
|
67
|
+
readonly default: undefined;
|
|
68
|
+
};
|
|
69
|
+
/** 取消回调,返回 false 阻止关闭,支持 Promise */
|
|
70
|
+
readonly onCancel: {
|
|
71
|
+
readonly type: PropType<(data?: any) => boolean | Promise<boolean | void> | void>;
|
|
72
|
+
readonly default: undefined;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
export type ModalProps = ExtractPropTypes<typeof modalProps>;
|