@vue-start/element-pro 0.1.0
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/CHANGELOG.md +16 -0
- package/README.md +11 -0
- package/dist/index.d.ts +1084 -0
- package/dist/index.es.js +1884 -0
- package/dist/index.js +1933 -0
- package/package.json +36 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1084 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { VNode, ExtractPropTypes, PropType, Component } from 'vue';
|
|
3
|
+
import { FormItemProps, ButtonProps as ButtonProps$1, FormInstance, ElSelect } from 'element-plus';
|
|
4
|
+
import { DefineComponent } from '@vue/runtime-core';
|
|
5
|
+
import { FilterMethods, Filters } from 'element-plus/es/components/table/src/table-column/defaults';
|
|
6
|
+
import { FormItemRule } from 'element-plus/es/tokens/form';
|
|
7
|
+
import { Ref, UnwrapNestedRefs } from '@vue/reactivity';
|
|
8
|
+
import * as element_plus_es_components_table_src_table_defaults from 'element-plus/es/components/table/src/table/defaults';
|
|
9
|
+
import { TableProps } from 'element-plus/es/components/table/src/table/defaults';
|
|
10
|
+
import { IRequestActor } from '@vue-start/request';
|
|
11
|
+
|
|
12
|
+
declare type TOption = {
|
|
13
|
+
label?: string;
|
|
14
|
+
value: string | number;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare type TOptions = TOption[];
|
|
18
|
+
declare type TColumn = TableColumnCtx<any> & {
|
|
19
|
+
valueType?: TValueType;
|
|
20
|
+
formValueType?: TValueType;
|
|
21
|
+
showProps?: Record<string, any>;
|
|
22
|
+
formItemProps?: ProFormItemProps;
|
|
23
|
+
formFieldProps?: Record<string, any>;
|
|
24
|
+
search?: boolean;
|
|
25
|
+
hideInTable?: boolean;
|
|
26
|
+
hideInForm?: boolean;
|
|
27
|
+
hideInDetail?: boolean;
|
|
28
|
+
searchSort?: boolean;
|
|
29
|
+
tableSort?: boolean;
|
|
30
|
+
formSort?: boolean;
|
|
31
|
+
descSort?: boolean;
|
|
32
|
+
extra?: {
|
|
33
|
+
desc?: any;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
declare type TColumns = TColumn[];
|
|
37
|
+
declare type BooleanObjType = {
|
|
38
|
+
[key: string]: boolean;
|
|
39
|
+
};
|
|
40
|
+
declare type BooleanRulesObjType = {
|
|
41
|
+
[key: string]: (record: any) => boolean;
|
|
42
|
+
};
|
|
43
|
+
declare type TDefaultValueType = "text" | "textarea" | "password" | "digit" | "date" | "dateRange" | "time" | "timeRange" | "select" | "treeSelect" | "checkbox" | "radio" | "slider" | "switch" | "rate" | "cascader";
|
|
44
|
+
declare type TValueType = TDefaultValueType | string;
|
|
45
|
+
interface TableColumnCtx<T> {
|
|
46
|
+
id?: string;
|
|
47
|
+
realWidth?: number;
|
|
48
|
+
type?: string;
|
|
49
|
+
/********* title兼容 ********/
|
|
50
|
+
label?: string;
|
|
51
|
+
renderHeader?: (data: {
|
|
52
|
+
column: TableColumnCtx<T>;
|
|
53
|
+
$index: number;
|
|
54
|
+
}) => VNode;
|
|
55
|
+
title?: string | VNode;
|
|
56
|
+
/********* dataIndex兼容 ********/
|
|
57
|
+
prop?: string;
|
|
58
|
+
dataIndex?: string | number;
|
|
59
|
+
className?: string;
|
|
60
|
+
labelClassName?: string;
|
|
61
|
+
property?: string;
|
|
62
|
+
width?: string | number;
|
|
63
|
+
minWidth?: string | number;
|
|
64
|
+
sortable?: boolean | string;
|
|
65
|
+
sortMethod?: (a: T, b: T) => number;
|
|
66
|
+
sortBy?: string | ((row: T, index: number) => string) | string[];
|
|
67
|
+
resizable?: boolean;
|
|
68
|
+
columnKey?: string;
|
|
69
|
+
rawColumnKey?: string;
|
|
70
|
+
align?: string;
|
|
71
|
+
headerAlign?: string;
|
|
72
|
+
showTooltipWhenOverflow?: boolean;
|
|
73
|
+
showOverflowTooltip?: boolean;
|
|
74
|
+
fixed?: boolean | string;
|
|
75
|
+
formatter?: (row: T, column: TableColumnCtx<T>, cellValue: any, index: number) => VNode | string;
|
|
76
|
+
customRender?: (opt: {
|
|
77
|
+
value: any;
|
|
78
|
+
text: any;
|
|
79
|
+
record: T;
|
|
80
|
+
index: number;
|
|
81
|
+
column: TableColumnCtx<T>;
|
|
82
|
+
}) => VNode | string | null;
|
|
83
|
+
selectable?: (row: T, index: number) => boolean;
|
|
84
|
+
reserveSelection?: boolean;
|
|
85
|
+
filterMethod?: FilterMethods<T>;
|
|
86
|
+
filteredValue?: string[];
|
|
87
|
+
filters?: Filters;
|
|
88
|
+
filterPlacement?: string;
|
|
89
|
+
filterMultiple?: boolean;
|
|
90
|
+
index?: number | ((index: number) => number);
|
|
91
|
+
sortOrders?: ("ascending" | "descending" | null)[];
|
|
92
|
+
renderCell?: (data: any) => void;
|
|
93
|
+
colSpan?: number;
|
|
94
|
+
rowSpan?: number;
|
|
95
|
+
children?: TableColumnCtx<T>[];
|
|
96
|
+
level?: number;
|
|
97
|
+
filterable?: boolean | FilterMethods<T> | Filters;
|
|
98
|
+
order?: string;
|
|
99
|
+
isColumnGroup?: boolean;
|
|
100
|
+
isSubColumn?: boolean;
|
|
101
|
+
columns?: TableColumnCtx<T>[];
|
|
102
|
+
getColumnIndex?: () => number;
|
|
103
|
+
no?: number;
|
|
104
|
+
filterOpened?: boolean;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
declare const proFormItemProps$1: () => {
|
|
108
|
+
name: {
|
|
109
|
+
type: PropType<string | (string | number)[]>;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
declare type ProFormItemProps = Partial<ExtractPropTypes<ReturnType<typeof proFormItemProps$1>>> & FormItemProps;
|
|
113
|
+
declare const ProFormItem: DefineComponent<ProFormItemProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProFormItemProps>, {}>;
|
|
114
|
+
declare const proFormProps: () => {
|
|
115
|
+
/**
|
|
116
|
+
* 子组件是否只读样式
|
|
117
|
+
*/
|
|
118
|
+
readonly: {
|
|
119
|
+
type: BooleanConstructor;
|
|
120
|
+
default: undefined;
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* FormComponent 根据此项来确定组件是否显示
|
|
124
|
+
* rules 根据rules中方法生成showState对象
|
|
125
|
+
*/
|
|
126
|
+
showState: {
|
|
127
|
+
type: PropType<{
|
|
128
|
+
[x: string]: boolean;
|
|
129
|
+
}>;
|
|
130
|
+
};
|
|
131
|
+
showStateRules: {
|
|
132
|
+
type: PropType<BooleanRulesObjType>;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* 是否只读
|
|
136
|
+
*/
|
|
137
|
+
readonlyState: {
|
|
138
|
+
type: PropType<{
|
|
139
|
+
[x: string]: boolean;
|
|
140
|
+
}>;
|
|
141
|
+
};
|
|
142
|
+
readonlyStateRules: {
|
|
143
|
+
type: PropType<BooleanRulesObjType>;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* 是否disabled
|
|
147
|
+
*/
|
|
148
|
+
disableState: {
|
|
149
|
+
type: PropType<{
|
|
150
|
+
[x: string]: boolean;
|
|
151
|
+
}>;
|
|
152
|
+
};
|
|
153
|
+
disableStateRules: {
|
|
154
|
+
type: PropType<BooleanRulesObjType>;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* 展示控件集合,readonly模式下使用这些组件渲染
|
|
158
|
+
*/
|
|
159
|
+
elementMap: {
|
|
160
|
+
type: PropType<{
|
|
161
|
+
[key: string]: DefineComponent<{}, {}, {}, vue.ComputedOptions, vue.MethodOptions, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ExtractPropTypes<{}>>, {}>;
|
|
162
|
+
}>;
|
|
163
|
+
};
|
|
164
|
+
/**
|
|
165
|
+
* provide传递
|
|
166
|
+
*/
|
|
167
|
+
provideExtra: {
|
|
168
|
+
type: PropType<{
|
|
169
|
+
[key: string]: any;
|
|
170
|
+
}>;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
interface FormProps {
|
|
174
|
+
model?: Record<string, any>;
|
|
175
|
+
rules?: FormItemRule[];
|
|
176
|
+
labelPosition?: "left" | "right" | "top";
|
|
177
|
+
labelWidth?: string | number;
|
|
178
|
+
labelSuffix?: string;
|
|
179
|
+
inline?: boolean;
|
|
180
|
+
inlineMessage?: boolean;
|
|
181
|
+
statusIcon?: boolean;
|
|
182
|
+
showMessage?: boolean;
|
|
183
|
+
size?: "large" | "default" | "small";
|
|
184
|
+
disabled?: boolean;
|
|
185
|
+
validateOnRuleChange?: boolean;
|
|
186
|
+
hideRequiredAsterisk?: boolean;
|
|
187
|
+
scrollToError?: boolean;
|
|
188
|
+
}
|
|
189
|
+
declare type ProFormProps = Partial<ExtractPropTypes<ReturnType<typeof proFormProps>>> & FormProps & {
|
|
190
|
+
onFinish?: (showValues: Record<string, any>, values: Record<string, any>) => void;
|
|
191
|
+
onFinishFailed?: (invalidFields: Record<string, any>) => void;
|
|
192
|
+
};
|
|
193
|
+
declare const ProForm: DefineComponent<ProFormProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProFormProps>, {}>;
|
|
194
|
+
|
|
195
|
+
declare const proSchemaFormProps: () => {
|
|
196
|
+
columns: {
|
|
197
|
+
type: PropType<TColumns>;
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* 录入控件集合,通过column->valueType 查找对应的录入组件
|
|
201
|
+
*/
|
|
202
|
+
formElementMap: {
|
|
203
|
+
type: PropType<{
|
|
204
|
+
[key: string]: any;
|
|
205
|
+
}>;
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* 是否启用rules验证
|
|
209
|
+
*/
|
|
210
|
+
needRules: {
|
|
211
|
+
type: BooleanConstructor;
|
|
212
|
+
default: boolean;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
declare type ProSchemaFormProps = Partial<ExtractPropTypes<ReturnType<typeof proSchemaFormProps>>> & ProFormProps;
|
|
216
|
+
declare const ProSchemaForm: vue.DefineComponent<any, () => JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<any>, {} | {
|
|
217
|
+
[x: string]: any;
|
|
218
|
+
}>;
|
|
219
|
+
|
|
220
|
+
declare enum SearchMode {
|
|
221
|
+
AUTO = "AUTO",
|
|
222
|
+
MANUAL = "MANUAL"
|
|
223
|
+
}
|
|
224
|
+
declare type ISearchMode = keyof typeof SearchMode;
|
|
225
|
+
declare const proSearchFormProps: () => {
|
|
226
|
+
/**
|
|
227
|
+
* 初始化触发 onFinish
|
|
228
|
+
*/
|
|
229
|
+
initEmit: {
|
|
230
|
+
type: BooleanConstructor;
|
|
231
|
+
default: boolean;
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* 模式 自动触发或者手动触发 onFinish
|
|
235
|
+
*/
|
|
236
|
+
searchMode: {
|
|
237
|
+
type: PropType<"AUTO" | "MANUAL">;
|
|
238
|
+
default: SearchMode;
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* 需要debounce处理的字段
|
|
242
|
+
*/
|
|
243
|
+
debounceKeys: {
|
|
244
|
+
type: PropType<string[]>;
|
|
245
|
+
};
|
|
246
|
+
debounceTime: {
|
|
247
|
+
type: NumberConstructor;
|
|
248
|
+
default: number;
|
|
249
|
+
};
|
|
250
|
+
inline: {
|
|
251
|
+
type: BooleanConstructor;
|
|
252
|
+
default: boolean;
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
declare type ProSearchFormProps = Partial<ExtractPropTypes<ReturnType<typeof proSearchFormProps>>> & Omit<ProSchemaFormProps, "inline">;
|
|
256
|
+
declare const ProSearchForm: vue.DefineComponent<ProSearchFormProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProSearchFormProps>, {}>;
|
|
257
|
+
|
|
258
|
+
declare const proFormItemProps: () => {
|
|
259
|
+
readonly: {
|
|
260
|
+
type: BooleanConstructor;
|
|
261
|
+
default: undefined;
|
|
262
|
+
};
|
|
263
|
+
fieldProps: {
|
|
264
|
+
type: ObjectConstructor;
|
|
265
|
+
};
|
|
266
|
+
showProps: {
|
|
267
|
+
type: ObjectConstructor;
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
declare type ProCreateFormItemProps = Partial<ExtractPropTypes<ReturnType<typeof proFormItemProps>>> & ProFormItemProps & Record<string, any>;
|
|
271
|
+
declare const createFormItemComponent: ({ InputComp, valueType, name, }: {
|
|
272
|
+
InputComp: any;
|
|
273
|
+
valueType: TValueType;
|
|
274
|
+
name: string;
|
|
275
|
+
}) => vue.DefineComponent<ProCreateFormItemProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ExtractPropTypes<ProCreateFormItemProps>>, {
|
|
276
|
+
[x: string]: any;
|
|
277
|
+
}>;
|
|
278
|
+
|
|
279
|
+
declare const ProFormText: vue.DefineComponent<ProCreateFormItemProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<ProCreateFormItemProps>>, {
|
|
280
|
+
[x: string]: any;
|
|
281
|
+
}>;
|
|
282
|
+
declare const ProFormTextNumber: vue.DefineComponent<ProCreateFormItemProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<ProCreateFormItemProps>>, {
|
|
283
|
+
[x: string]: any;
|
|
284
|
+
}>;
|
|
285
|
+
declare const ProFormDatePicker: vue.DefineComponent<ProCreateFormItemProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<ProCreateFormItemProps>>, {
|
|
286
|
+
[x: string]: any;
|
|
287
|
+
}>;
|
|
288
|
+
declare const ProFormTimePicker: vue.DefineComponent<ProCreateFormItemProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<ProCreateFormItemProps>>, {
|
|
289
|
+
[x: string]: any;
|
|
290
|
+
}>;
|
|
291
|
+
declare const ProFormSelect: vue.DefineComponent<ProCreateFormItemProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<ProCreateFormItemProps>>, {
|
|
292
|
+
[x: string]: any;
|
|
293
|
+
}>;
|
|
294
|
+
declare const ProFormTreeSelect: vue.DefineComponent<ProCreateFormItemProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<ProCreateFormItemProps>>, {
|
|
295
|
+
[x: string]: any;
|
|
296
|
+
}>;
|
|
297
|
+
declare const ProFormCheckbox: vue.DefineComponent<ProCreateFormItemProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<ProCreateFormItemProps>>, {
|
|
298
|
+
[x: string]: any;
|
|
299
|
+
}>;
|
|
300
|
+
declare const ProFormRadio: vue.DefineComponent<ProCreateFormItemProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<ProCreateFormItemProps>>, {
|
|
301
|
+
[x: string]: any;
|
|
302
|
+
}>;
|
|
303
|
+
declare const ProFormSwitch: vue.DefineComponent<ProCreateFormItemProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<ProCreateFormItemProps>>, {
|
|
304
|
+
[x: string]: any;
|
|
305
|
+
}>;
|
|
306
|
+
declare const ProFormCascader: vue.DefineComponent<ProCreateFormItemProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<ProCreateFormItemProps>>, {
|
|
307
|
+
[x: string]: any;
|
|
308
|
+
}>;
|
|
309
|
+
interface ButtonProps {
|
|
310
|
+
size?: "default" | "small" | "large";
|
|
311
|
+
disabled?: boolean;
|
|
312
|
+
type?: "default" | "primary" | "success" | "warning" | "info" | "danger" | "text";
|
|
313
|
+
icon?: string | Component;
|
|
314
|
+
nativeType?: "button" | "submit" | "reset";
|
|
315
|
+
loading?: boolean;
|
|
316
|
+
loadingIcon?: string | Component;
|
|
317
|
+
plain?: boolean;
|
|
318
|
+
text?: boolean;
|
|
319
|
+
link?: boolean;
|
|
320
|
+
bg?: boolean;
|
|
321
|
+
autofocus?: boolean;
|
|
322
|
+
round?: boolean;
|
|
323
|
+
circle?: boolean;
|
|
324
|
+
color?: string;
|
|
325
|
+
dark?: boolean;
|
|
326
|
+
autoInsertSpace?: boolean;
|
|
327
|
+
}
|
|
328
|
+
declare const ProSubmitButton: vue.DefineComponent<ButtonProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ButtonProps>, {}>;
|
|
329
|
+
|
|
330
|
+
declare const proFormListProps: () => {
|
|
331
|
+
addButtonText: {
|
|
332
|
+
type: StringConstructor;
|
|
333
|
+
default: string;
|
|
334
|
+
};
|
|
335
|
+
addButtonProps: {
|
|
336
|
+
type: PropType<ButtonProps$1>;
|
|
337
|
+
};
|
|
338
|
+
rowKey: {
|
|
339
|
+
type: StringConstructor;
|
|
340
|
+
default: string;
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
declare type ProFormListProps = Partial<ExtractPropTypes<ReturnType<typeof proFormListProps>>> & ProFormItemProps;
|
|
344
|
+
declare const ProFormList: vue.DefineComponent<ProFormListProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProFormListProps>, {}>;
|
|
345
|
+
|
|
346
|
+
interface IProFormProvide extends Record<string, any> {
|
|
347
|
+
formRef: Ref<FormInstance & {
|
|
348
|
+
submit: () => void;
|
|
349
|
+
}>;
|
|
350
|
+
formState: UnwrapNestedRefs<Record<string, any>>;
|
|
351
|
+
showState: UnwrapNestedRefs<Record<string, any>>;
|
|
352
|
+
readonlyState: UnwrapNestedRefs<Record<string, any>>;
|
|
353
|
+
disableState: UnwrapNestedRefs<Record<string, any>>;
|
|
354
|
+
readonly: Ref<boolean | undefined>;
|
|
355
|
+
elementMap?: {
|
|
356
|
+
[key: string]: DefineComponent;
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
declare const useProForm: () => IProFormProvide;
|
|
360
|
+
declare const provideProForm: (ctx: IProFormProvide) => void;
|
|
361
|
+
interface IProFormListProvide {
|
|
362
|
+
pathList: (string | number)[];
|
|
363
|
+
}
|
|
364
|
+
declare const useProFormList: () => IProFormListProvide;
|
|
365
|
+
declare const provideProFormList: (ctx: IProFormListProvide) => void;
|
|
366
|
+
|
|
367
|
+
interface IOperateItem {
|
|
368
|
+
value: string | number;
|
|
369
|
+
label?: string | VNode;
|
|
370
|
+
element?: (record: Record<string, any>, item: IOperateItem) => VNode;
|
|
371
|
+
show?: boolean | ((record: Record<string, any>) => boolean);
|
|
372
|
+
disabled?: boolean | ((record: Record<string, any>) => boolean);
|
|
373
|
+
onClick?: (record: Record<string, any>) => void;
|
|
374
|
+
sort?: number;
|
|
375
|
+
}
|
|
376
|
+
interface ITableOperate {
|
|
377
|
+
column?: TableColumnCtx<any>;
|
|
378
|
+
items?: IOperateItem[];
|
|
379
|
+
itemState?: {
|
|
380
|
+
[key: string]: Omit<IOperateItem, "value">;
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
declare const proTableProps: () => {
|
|
384
|
+
operate: {
|
|
385
|
+
type: PropType<ITableOperate>;
|
|
386
|
+
};
|
|
387
|
+
columnEmptyText: {
|
|
388
|
+
type: StringConstructor;
|
|
389
|
+
};
|
|
390
|
+
/**
|
|
391
|
+
* 公共column,会merge到columns item中
|
|
392
|
+
*/
|
|
393
|
+
column: {
|
|
394
|
+
type: PropType<TableColumnCtx<any>>;
|
|
395
|
+
};
|
|
396
|
+
columns: {
|
|
397
|
+
type: PropType<TColumns>;
|
|
398
|
+
};
|
|
399
|
+
/**
|
|
400
|
+
* 展示控件集合,readonly模式下使用这些组件渲染
|
|
401
|
+
*/
|
|
402
|
+
elementMap: {
|
|
403
|
+
type: PropType<{
|
|
404
|
+
[key: string]: any;
|
|
405
|
+
}>;
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
declare type ProTableProps = Partial<ExtractPropTypes<ReturnType<typeof proTableProps>>> & Omit<TableProps<any>, "tableLayout" | "flexible" | "data"> & {
|
|
409
|
+
tableLayout?: "fixed" | "auto";
|
|
410
|
+
flexible?: boolean;
|
|
411
|
+
data?: any;
|
|
412
|
+
};
|
|
413
|
+
declare const ProTable: vue.DefineComponent<ProTableProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProTableProps>, {
|
|
414
|
+
data: any;
|
|
415
|
+
}>;
|
|
416
|
+
|
|
417
|
+
interface PaginationProps {
|
|
418
|
+
total?: number;
|
|
419
|
+
pageSize?: number;
|
|
420
|
+
defaultPageSize?: number;
|
|
421
|
+
currentPage?: number;
|
|
422
|
+
defaultCurrentPage?: number;
|
|
423
|
+
pageCount?: number;
|
|
424
|
+
pagerCount?: number;
|
|
425
|
+
layout?: string;
|
|
426
|
+
pageSizes?: number[];
|
|
427
|
+
popperClass?: string;
|
|
428
|
+
prevText?: string;
|
|
429
|
+
nextText?: string;
|
|
430
|
+
small?: boolean;
|
|
431
|
+
background?: boolean;
|
|
432
|
+
disabled?: boolean;
|
|
433
|
+
hideOnSinglePage?: boolean;
|
|
434
|
+
onSizeChange?: (val: number) => void;
|
|
435
|
+
onCurrentChange?: (val: number) => void;
|
|
436
|
+
}
|
|
437
|
+
declare type TPageState = {
|
|
438
|
+
page: number;
|
|
439
|
+
pageSize: number;
|
|
440
|
+
};
|
|
441
|
+
declare const defaultPage: TPageState;
|
|
442
|
+
declare const curdListProps: () => {
|
|
443
|
+
/**
|
|
444
|
+
* extra 是否放到SearchForm中
|
|
445
|
+
*/
|
|
446
|
+
extraInSearch: {
|
|
447
|
+
type: BooleanConstructor;
|
|
448
|
+
default: undefined;
|
|
449
|
+
};
|
|
450
|
+
searchProps: {
|
|
451
|
+
type: PropType<ProSearchFormProps>;
|
|
452
|
+
};
|
|
453
|
+
tableProps: {
|
|
454
|
+
type: PropType<Partial<ExtractPropTypes<{
|
|
455
|
+
operate: {
|
|
456
|
+
type: PropType<ITableOperate>;
|
|
457
|
+
};
|
|
458
|
+
columnEmptyText: {
|
|
459
|
+
type: StringConstructor;
|
|
460
|
+
};
|
|
461
|
+
column: {
|
|
462
|
+
type: PropType<TableColumnCtx<any>>;
|
|
463
|
+
};
|
|
464
|
+
columns: {
|
|
465
|
+
type: PropType<TColumns>;
|
|
466
|
+
};
|
|
467
|
+
elementMap: {
|
|
468
|
+
type: PropType<{
|
|
469
|
+
[key: string]: any;
|
|
470
|
+
}>;
|
|
471
|
+
};
|
|
472
|
+
}>> & Omit<element_plus_es_components_table_src_table_defaults.TableProps<any>, "data" | "tableLayout" | "flexible"> & {
|
|
473
|
+
tableLayout?: "fixed" | "auto" | undefined;
|
|
474
|
+
flexible?: boolean | undefined;
|
|
475
|
+
data?: any;
|
|
476
|
+
} & {
|
|
477
|
+
slots?: Readonly<{
|
|
478
|
+
[name: string]: vue.Slot | undefined;
|
|
479
|
+
}> | undefined;
|
|
480
|
+
}>;
|
|
481
|
+
};
|
|
482
|
+
paginationProps: {
|
|
483
|
+
type: PropType<PaginationProps>;
|
|
484
|
+
};
|
|
485
|
+
pageState: {
|
|
486
|
+
type: PropType<TPageState>;
|
|
487
|
+
};
|
|
488
|
+
};
|
|
489
|
+
declare type ProCurdListProps = Partial<ExtractPropTypes<ReturnType<typeof curdListProps>>>;
|
|
490
|
+
/**
|
|
491
|
+
* 组合列表
|
|
492
|
+
* SearchForm + Table + Pagination
|
|
493
|
+
*/
|
|
494
|
+
declare const ProCurdList: vue.DefineComponent<Partial<ExtractPropTypes<{
|
|
495
|
+
/**
|
|
496
|
+
* extra 是否放到SearchForm中
|
|
497
|
+
*/
|
|
498
|
+
extraInSearch: {
|
|
499
|
+
type: BooleanConstructor;
|
|
500
|
+
default: undefined;
|
|
501
|
+
};
|
|
502
|
+
searchProps: {
|
|
503
|
+
type: PropType<ProSearchFormProps>;
|
|
504
|
+
};
|
|
505
|
+
tableProps: {
|
|
506
|
+
type: PropType<Partial<ExtractPropTypes<{
|
|
507
|
+
operate: {
|
|
508
|
+
type: PropType<ITableOperate>;
|
|
509
|
+
};
|
|
510
|
+
columnEmptyText: {
|
|
511
|
+
type: StringConstructor;
|
|
512
|
+
};
|
|
513
|
+
column: {
|
|
514
|
+
type: PropType<TableColumnCtx<any>>;
|
|
515
|
+
};
|
|
516
|
+
columns: {
|
|
517
|
+
type: PropType<TColumns>;
|
|
518
|
+
};
|
|
519
|
+
elementMap: {
|
|
520
|
+
type: PropType<{
|
|
521
|
+
[key: string]: any;
|
|
522
|
+
}>;
|
|
523
|
+
};
|
|
524
|
+
}>> & Omit<element_plus_es_components_table_src_table_defaults.TableProps<any>, "data" | "tableLayout" | "flexible"> & {
|
|
525
|
+
tableLayout?: "fixed" | "auto" | undefined;
|
|
526
|
+
flexible?: boolean | undefined;
|
|
527
|
+
data?: any;
|
|
528
|
+
} & {
|
|
529
|
+
slots?: Readonly<{
|
|
530
|
+
[name: string]: vue.Slot | undefined;
|
|
531
|
+
}> | undefined;
|
|
532
|
+
}>;
|
|
533
|
+
};
|
|
534
|
+
paginationProps: {
|
|
535
|
+
type: PropType<PaginationProps>;
|
|
536
|
+
};
|
|
537
|
+
pageState: {
|
|
538
|
+
type: PropType<TPageState>;
|
|
539
|
+
};
|
|
540
|
+
}>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
|
|
541
|
+
/**
|
|
542
|
+
* extra 是否放到SearchForm中
|
|
543
|
+
*/
|
|
544
|
+
extraInSearch: {
|
|
545
|
+
type: BooleanConstructor;
|
|
546
|
+
default: undefined;
|
|
547
|
+
};
|
|
548
|
+
searchProps: {
|
|
549
|
+
type: PropType<ProSearchFormProps>;
|
|
550
|
+
};
|
|
551
|
+
tableProps: {
|
|
552
|
+
type: PropType<Partial<ExtractPropTypes<{
|
|
553
|
+
operate: {
|
|
554
|
+
type: PropType<ITableOperate>;
|
|
555
|
+
};
|
|
556
|
+
columnEmptyText: {
|
|
557
|
+
type: StringConstructor;
|
|
558
|
+
};
|
|
559
|
+
column: {
|
|
560
|
+
type: PropType<TableColumnCtx<any>>;
|
|
561
|
+
};
|
|
562
|
+
columns: {
|
|
563
|
+
type: PropType<TColumns>;
|
|
564
|
+
};
|
|
565
|
+
elementMap: {
|
|
566
|
+
type: PropType<{
|
|
567
|
+
[key: string]: any;
|
|
568
|
+
}>;
|
|
569
|
+
};
|
|
570
|
+
}>> & Omit<element_plus_es_components_table_src_table_defaults.TableProps<any>, "data" | "tableLayout" | "flexible"> & {
|
|
571
|
+
tableLayout?: "fixed" | "auto" | undefined;
|
|
572
|
+
flexible?: boolean | undefined;
|
|
573
|
+
data?: any;
|
|
574
|
+
} & {
|
|
575
|
+
slots?: Readonly<{
|
|
576
|
+
[name: string]: vue.Slot | undefined;
|
|
577
|
+
}> | undefined;
|
|
578
|
+
}>;
|
|
579
|
+
};
|
|
580
|
+
paginationProps: {
|
|
581
|
+
type: PropType<PaginationProps>;
|
|
582
|
+
};
|
|
583
|
+
pageState: {
|
|
584
|
+
type: PropType<TPageState>;
|
|
585
|
+
};
|
|
586
|
+
}>>>, {}>;
|
|
587
|
+
declare const ProCurdListConnect: vue.DefineComponent<{}, () => JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ExtractPropTypes<{}>>, {}>;
|
|
588
|
+
|
|
589
|
+
interface IProModuleProvide {
|
|
590
|
+
columns: Ref<TColumns>;
|
|
591
|
+
getFormItemVNode: (column: TColumn, needRules: boolean | undefined) => VNode | null;
|
|
592
|
+
getItemVNode: (column: TColumn, value: any) => VNode | null;
|
|
593
|
+
elementMap: {
|
|
594
|
+
[key: string]: any;
|
|
595
|
+
};
|
|
596
|
+
formElementMap: {
|
|
597
|
+
[key: string]: any;
|
|
598
|
+
};
|
|
599
|
+
}
|
|
600
|
+
declare const useProModule: () => IProModuleProvide;
|
|
601
|
+
declare const provideProModule: (ctx: IProModuleProvide) => void;
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* 获取Column的valueType,默认"text"
|
|
605
|
+
* @param column
|
|
606
|
+
*/
|
|
607
|
+
declare const getColumnValueType: (column: TColumn) => TValueType;
|
|
608
|
+
/**
|
|
609
|
+
*获取Column的FormItem name
|
|
610
|
+
* @param column
|
|
611
|
+
*/
|
|
612
|
+
declare const getColumnFormItemName: (column: TColumn) => string | number | undefined;
|
|
613
|
+
/**
|
|
614
|
+
* 根据Column生成FormItem VNode
|
|
615
|
+
* formFieldProps中的slots参数会以v-slots的形式传递到FormItem的录入组件(子组件)中
|
|
616
|
+
* @param formElementMap
|
|
617
|
+
* @param column
|
|
618
|
+
* @param needRules
|
|
619
|
+
*/
|
|
620
|
+
declare const getFormItemEl: (formElementMap: any, column: TColumn, needRules?: boolean | undefined) => VNode | null;
|
|
621
|
+
/**
|
|
622
|
+
* 根据Column生成Item VNode
|
|
623
|
+
* @param elementMap
|
|
624
|
+
* @param column
|
|
625
|
+
* @param value
|
|
626
|
+
*/
|
|
627
|
+
declare const getItemEl: (elementMap: any, column: TColumn, value: any) => VNode | null;
|
|
628
|
+
declare const proModuleProps: () => {
|
|
629
|
+
/**
|
|
630
|
+
* 配置(静态)
|
|
631
|
+
*/
|
|
632
|
+
columns: {
|
|
633
|
+
type: PropType<TColumns>;
|
|
634
|
+
};
|
|
635
|
+
/**
|
|
636
|
+
* 配置(动态)
|
|
637
|
+
* columns动态属性兼容
|
|
638
|
+
*/
|
|
639
|
+
columnState: {
|
|
640
|
+
type: PropType<Record<string, any>>;
|
|
641
|
+
};
|
|
642
|
+
/**
|
|
643
|
+
* 展示组件集
|
|
644
|
+
*/
|
|
645
|
+
elementMap: {
|
|
646
|
+
type: PropType<{
|
|
647
|
+
[key: string]: any;
|
|
648
|
+
}>;
|
|
649
|
+
};
|
|
650
|
+
/**
|
|
651
|
+
* 录入组件集
|
|
652
|
+
*/
|
|
653
|
+
formElementMap: {
|
|
654
|
+
type: PropType<{
|
|
655
|
+
[key: string]: any;
|
|
656
|
+
}>;
|
|
657
|
+
};
|
|
658
|
+
};
|
|
659
|
+
declare type ProModuleProps = Partial<ExtractPropTypes<ReturnType<typeof proModuleProps>>>;
|
|
660
|
+
declare const ProModule: vue.DefineComponent<Partial<ExtractPropTypes<{
|
|
661
|
+
/**
|
|
662
|
+
* 配置(静态)
|
|
663
|
+
*/
|
|
664
|
+
columns: {
|
|
665
|
+
type: PropType<TColumns>;
|
|
666
|
+
};
|
|
667
|
+
/**
|
|
668
|
+
* 配置(动态)
|
|
669
|
+
* columns动态属性兼容
|
|
670
|
+
*/
|
|
671
|
+
columnState: {
|
|
672
|
+
type: PropType<Record<string, any>>;
|
|
673
|
+
};
|
|
674
|
+
/**
|
|
675
|
+
* 展示组件集
|
|
676
|
+
*/
|
|
677
|
+
elementMap: {
|
|
678
|
+
type: PropType<{
|
|
679
|
+
[key: string]: any;
|
|
680
|
+
}>;
|
|
681
|
+
};
|
|
682
|
+
/**
|
|
683
|
+
* 录入组件集
|
|
684
|
+
*/
|
|
685
|
+
formElementMap: {
|
|
686
|
+
type: PropType<{
|
|
687
|
+
[key: string]: any;
|
|
688
|
+
}>;
|
|
689
|
+
};
|
|
690
|
+
}>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
|
|
691
|
+
/**
|
|
692
|
+
* 配置(静态)
|
|
693
|
+
*/
|
|
694
|
+
columns: {
|
|
695
|
+
type: PropType<TColumns>;
|
|
696
|
+
};
|
|
697
|
+
/**
|
|
698
|
+
* 配置(动态)
|
|
699
|
+
* columns动态属性兼容
|
|
700
|
+
*/
|
|
701
|
+
columnState: {
|
|
702
|
+
type: PropType<Record<string, any>>;
|
|
703
|
+
};
|
|
704
|
+
/**
|
|
705
|
+
* 展示组件集
|
|
706
|
+
*/
|
|
707
|
+
elementMap: {
|
|
708
|
+
type: PropType<{
|
|
709
|
+
[key: string]: any;
|
|
710
|
+
}>;
|
|
711
|
+
};
|
|
712
|
+
/**
|
|
713
|
+
* 录入组件集
|
|
714
|
+
*/
|
|
715
|
+
formElementMap: {
|
|
716
|
+
type: PropType<{
|
|
717
|
+
[key: string]: any;
|
|
718
|
+
}>;
|
|
719
|
+
};
|
|
720
|
+
}>>>, {}>;
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* 添加 和 修改 时候的确定按钮
|
|
724
|
+
*/
|
|
725
|
+
declare const OkButton: vue.DefineComponent<ButtonProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ButtonProps>, {}>;
|
|
726
|
+
/**
|
|
727
|
+
* 添加 时候的 确定并继续添加按钮
|
|
728
|
+
*/
|
|
729
|
+
declare const ContinueAddButton: vue.DefineComponent<ButtonProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ButtonProps>, {}>;
|
|
730
|
+
declare const proOperateButtonProps: () => {
|
|
731
|
+
showContinueAdd: {
|
|
732
|
+
type: BooleanConstructor;
|
|
733
|
+
default: boolean;
|
|
734
|
+
};
|
|
735
|
+
okText: {
|
|
736
|
+
type: StringConstructor;
|
|
737
|
+
default: string;
|
|
738
|
+
};
|
|
739
|
+
okButtonProps: {
|
|
740
|
+
type: PropType<ButtonProps>;
|
|
741
|
+
};
|
|
742
|
+
continueText: {
|
|
743
|
+
type: StringConstructor;
|
|
744
|
+
default: string;
|
|
745
|
+
};
|
|
746
|
+
continueButtonProps: {
|
|
747
|
+
type: PropType<ButtonProps>;
|
|
748
|
+
};
|
|
749
|
+
};
|
|
750
|
+
declare type ProOperateButtonProps = Partial<ExtractPropTypes<ReturnType<typeof proOperateButtonProps>>>;
|
|
751
|
+
declare const ProOperateButton: vue.DefineComponent<Partial<ExtractPropTypes<{
|
|
752
|
+
showContinueAdd: {
|
|
753
|
+
type: BooleanConstructor;
|
|
754
|
+
default: boolean;
|
|
755
|
+
};
|
|
756
|
+
okText: {
|
|
757
|
+
type: StringConstructor;
|
|
758
|
+
default: string;
|
|
759
|
+
};
|
|
760
|
+
okButtonProps: {
|
|
761
|
+
type: PropType<ButtonProps>;
|
|
762
|
+
};
|
|
763
|
+
continueText: {
|
|
764
|
+
type: StringConstructor;
|
|
765
|
+
default: string;
|
|
766
|
+
};
|
|
767
|
+
continueButtonProps: {
|
|
768
|
+
type: PropType<ButtonProps>;
|
|
769
|
+
};
|
|
770
|
+
}>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
|
|
771
|
+
showContinueAdd: {
|
|
772
|
+
type: BooleanConstructor;
|
|
773
|
+
default: boolean;
|
|
774
|
+
};
|
|
775
|
+
okText: {
|
|
776
|
+
type: StringConstructor;
|
|
777
|
+
default: string;
|
|
778
|
+
};
|
|
779
|
+
okButtonProps: {
|
|
780
|
+
type: PropType<ButtonProps>;
|
|
781
|
+
};
|
|
782
|
+
continueText: {
|
|
783
|
+
type: StringConstructor;
|
|
784
|
+
default: string;
|
|
785
|
+
};
|
|
786
|
+
continueButtonProps: {
|
|
787
|
+
type: PropType<ButtonProps>;
|
|
788
|
+
};
|
|
789
|
+
}>>>, {}>;
|
|
790
|
+
declare const proCurdFormProps: () => {
|
|
791
|
+
operateButtonProps: {
|
|
792
|
+
type: PropType<Partial<ExtractPropTypes<{
|
|
793
|
+
showContinueAdd: {
|
|
794
|
+
type: BooleanConstructor;
|
|
795
|
+
default: boolean;
|
|
796
|
+
};
|
|
797
|
+
okText: {
|
|
798
|
+
type: StringConstructor;
|
|
799
|
+
default: string;
|
|
800
|
+
};
|
|
801
|
+
okButtonProps: {
|
|
802
|
+
type: PropType<ButtonProps>;
|
|
803
|
+
};
|
|
804
|
+
continueText: {
|
|
805
|
+
type: StringConstructor;
|
|
806
|
+
default: string;
|
|
807
|
+
};
|
|
808
|
+
continueButtonProps: {
|
|
809
|
+
type: PropType<ButtonProps>;
|
|
810
|
+
};
|
|
811
|
+
}>>>;
|
|
812
|
+
};
|
|
813
|
+
};
|
|
814
|
+
declare type ProCurdFormProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdFormProps>>> & ProFormProps;
|
|
815
|
+
declare const ProCurdForm: vue.DefineComponent<ProCurdFormProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProCurdFormProps>, {}>;
|
|
816
|
+
declare const ProCurdFormConnect: vue.DefineComponent<{}, () => JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ExtractPropTypes<{}>>, {}>;
|
|
817
|
+
|
|
818
|
+
interface ModalProps {
|
|
819
|
+
appendToBody?: boolean;
|
|
820
|
+
beforeClose?: (done: () => void) => void;
|
|
821
|
+
destroyOnClose?: boolean;
|
|
822
|
+
closeOnClickModal?: boolean;
|
|
823
|
+
closeOnPressEscape?: boolean;
|
|
824
|
+
lockScroll?: boolean;
|
|
825
|
+
modal?: boolean;
|
|
826
|
+
openDelay?: number;
|
|
827
|
+
closeDelay?: number;
|
|
828
|
+
top?: string;
|
|
829
|
+
modelValue?: boolean;
|
|
830
|
+
modalClass?: string;
|
|
831
|
+
width?: string | number;
|
|
832
|
+
zIndex?: number;
|
|
833
|
+
trapFocus?: boolean;
|
|
834
|
+
center?: boolean;
|
|
835
|
+
customClass?: string;
|
|
836
|
+
draggable?: boolean;
|
|
837
|
+
fullscreen?: boolean;
|
|
838
|
+
showClose?: boolean;
|
|
839
|
+
title?: string;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
interface DescriptionsProps {
|
|
843
|
+
border?: boolean;
|
|
844
|
+
column?: number;
|
|
845
|
+
direction?: "vertical" | "horizontal";
|
|
846
|
+
size?: "default" | "small" | "large";
|
|
847
|
+
title?: string;
|
|
848
|
+
extra?: string;
|
|
849
|
+
}
|
|
850
|
+
declare const ProCurdDesc: vue.DefineComponent<DescriptionsProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<DescriptionsProps>, {}>;
|
|
851
|
+
declare const ProCurdDescConnect: vue.DefineComponent<{}, () => JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{}>>, {}>;
|
|
852
|
+
|
|
853
|
+
/**
|
|
854
|
+
* curd 操作模式
|
|
855
|
+
*/
|
|
856
|
+
declare enum CurdCurrentMode {
|
|
857
|
+
ADD = "ADD",
|
|
858
|
+
EDIT = "EDIT",
|
|
859
|
+
DETAIL = "DETAIL"
|
|
860
|
+
}
|
|
861
|
+
declare type ICurdCurrentMode = keyof typeof CurdCurrentMode;
|
|
862
|
+
/**
|
|
863
|
+
* curd add 模式下 标记 "确定" "确定并继续" 触发
|
|
864
|
+
*/
|
|
865
|
+
declare enum CurdAddAction {
|
|
866
|
+
NORMAL = "NORMAL",
|
|
867
|
+
CONTINUE = "CONTINUE"
|
|
868
|
+
}
|
|
869
|
+
declare type ICurdAddAction = keyof typeof CurdAddAction;
|
|
870
|
+
interface IListData extends Record<string, any> {
|
|
871
|
+
total: number;
|
|
872
|
+
dataSource: Record<string, any>[];
|
|
873
|
+
}
|
|
874
|
+
interface ICurdState extends Record<string, any> {
|
|
875
|
+
listLoading?: boolean;
|
|
876
|
+
listData?: IListData;
|
|
877
|
+
mode?: ICurdCurrentMode;
|
|
878
|
+
detailLoading?: boolean;
|
|
879
|
+
detailData?: Record<string, any>;
|
|
880
|
+
operateLoading?: boolean;
|
|
881
|
+
addAction?: ICurdAddAction;
|
|
882
|
+
}
|
|
883
|
+
declare type BooleanOrFun = boolean | ((record: Record<string, any>) => boolean);
|
|
884
|
+
/**
|
|
885
|
+
* `on${Action}Bobble`: 冒泡
|
|
886
|
+
*/
|
|
887
|
+
interface IOperate {
|
|
888
|
+
onList?: (values: Record<string, any>) => void;
|
|
889
|
+
detail?: BooleanOrFun;
|
|
890
|
+
detailLabel?: string | VNode;
|
|
891
|
+
onDetail?: (record: Record<string, any>) => void;
|
|
892
|
+
edit?: BooleanOrFun;
|
|
893
|
+
editLabel?: string | VNode;
|
|
894
|
+
onEdit?: (record: Record<string, any>) => void;
|
|
895
|
+
onEditExecute?: (values: Record<string, any>) => void;
|
|
896
|
+
add?: BooleanOrFun;
|
|
897
|
+
addLabel?: string | VNode;
|
|
898
|
+
onAdd?: () => void;
|
|
899
|
+
onAddExecute?: (values: Record<string, any>) => void;
|
|
900
|
+
delete?: BooleanOrFun;
|
|
901
|
+
deleteLabel?: string | VNode;
|
|
902
|
+
onDelete?: (record: Record<string, any>) => void;
|
|
903
|
+
tableOperate?: ITableOperate;
|
|
904
|
+
}
|
|
905
|
+
declare const proCurdModuleProps: () => {
|
|
906
|
+
/**
|
|
907
|
+
* 状态
|
|
908
|
+
*/
|
|
909
|
+
curdState: {
|
|
910
|
+
type: PropType<{
|
|
911
|
+
[x: string]: any;
|
|
912
|
+
listLoading?: boolean | undefined;
|
|
913
|
+
listData?: {
|
|
914
|
+
[x: string]: any;
|
|
915
|
+
total: number;
|
|
916
|
+
dataSource: {
|
|
917
|
+
[x: string]: any;
|
|
918
|
+
}[];
|
|
919
|
+
} | undefined;
|
|
920
|
+
mode?: "ADD" | "EDIT" | "DETAIL" | undefined;
|
|
921
|
+
detailLoading?: boolean | undefined;
|
|
922
|
+
detailData?: {
|
|
923
|
+
[x: string]: any;
|
|
924
|
+
} | undefined;
|
|
925
|
+
operateLoading?: boolean | undefined;
|
|
926
|
+
addAction?: "NORMAL" | "CONTINUE" | undefined;
|
|
927
|
+
}>;
|
|
928
|
+
};
|
|
929
|
+
/**
|
|
930
|
+
* 操作配置
|
|
931
|
+
*/
|
|
932
|
+
operate: {
|
|
933
|
+
type: PropType<IOperate>;
|
|
934
|
+
};
|
|
935
|
+
/**
|
|
936
|
+
* 列表 或 详情 的唯一标识
|
|
937
|
+
*/
|
|
938
|
+
rowKey: {
|
|
939
|
+
type: StringConstructor;
|
|
940
|
+
default: string;
|
|
941
|
+
};
|
|
942
|
+
/************************* 子组件props *******************************/
|
|
943
|
+
listProps: {
|
|
944
|
+
type: PropType<Partial<ExtractPropTypes<{
|
|
945
|
+
extraInSearch: {
|
|
946
|
+
type: BooleanConstructor;
|
|
947
|
+
default: undefined;
|
|
948
|
+
};
|
|
949
|
+
searchProps: {
|
|
950
|
+
type: PropType<ProSearchFormProps>;
|
|
951
|
+
};
|
|
952
|
+
tableProps: {
|
|
953
|
+
type: PropType<Partial<ExtractPropTypes<{
|
|
954
|
+
operate: {
|
|
955
|
+
type: PropType<ITableOperate>;
|
|
956
|
+
};
|
|
957
|
+
columnEmptyText: {
|
|
958
|
+
type: StringConstructor;
|
|
959
|
+
};
|
|
960
|
+
column: {
|
|
961
|
+
type: PropType<TableColumnCtx<any>>;
|
|
962
|
+
};
|
|
963
|
+
columns: {
|
|
964
|
+
type: PropType<TColumns>;
|
|
965
|
+
};
|
|
966
|
+
elementMap: {
|
|
967
|
+
type: PropType<{
|
|
968
|
+
[key: string]: any;
|
|
969
|
+
}>;
|
|
970
|
+
};
|
|
971
|
+
}>> & Omit<element_plus_es_components_table_src_table_defaults.TableProps<any>, "data" | "tableLayout" | "flexible"> & {
|
|
972
|
+
tableLayout?: "fixed" | "auto" | undefined;
|
|
973
|
+
flexible?: boolean | undefined;
|
|
974
|
+
data?: any;
|
|
975
|
+
} & {
|
|
976
|
+
slots?: Readonly<{
|
|
977
|
+
[name: string]: vue.Slot | undefined;
|
|
978
|
+
}> | undefined;
|
|
979
|
+
}>;
|
|
980
|
+
};
|
|
981
|
+
paginationProps: {
|
|
982
|
+
type: PropType<PaginationProps>;
|
|
983
|
+
};
|
|
984
|
+
pageState: {
|
|
985
|
+
type: PropType<TPageState>;
|
|
986
|
+
};
|
|
987
|
+
}>>>;
|
|
988
|
+
};
|
|
989
|
+
formProps: {
|
|
990
|
+
type: PropType<ProCurdFormProps>;
|
|
991
|
+
};
|
|
992
|
+
descProps: {
|
|
993
|
+
type: PropType<DescriptionsProps>;
|
|
994
|
+
};
|
|
995
|
+
modalProps: {
|
|
996
|
+
type: PropType<ModalProps>;
|
|
997
|
+
};
|
|
998
|
+
};
|
|
999
|
+
declare type CurdModuleProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdModuleProps>>>;
|
|
1000
|
+
declare type ProCurdModuleProps = CurdModuleProps & ProModuleProps;
|
|
1001
|
+
declare const ProCurd: vue.DefineComponent<ProCurdModuleProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProCurdModuleProps>, {}>;
|
|
1002
|
+
|
|
1003
|
+
interface IProCurdModuleProvide {
|
|
1004
|
+
rowKey: string;
|
|
1005
|
+
curdState: UnwrapNestedRefs<ICurdState>;
|
|
1006
|
+
formColumns: Ref<TColumns>;
|
|
1007
|
+
descColumns: Ref<TColumns>;
|
|
1008
|
+
tableColumns: Ref<TColumns>;
|
|
1009
|
+
searchColumns: Ref<TColumns>;
|
|
1010
|
+
operate: IOperate;
|
|
1011
|
+
/******************子组件参数*******************/
|
|
1012
|
+
listProps?: ProCurdListProps;
|
|
1013
|
+
formProps?: ProCurdFormProps;
|
|
1014
|
+
descProps?: DescriptionsProps;
|
|
1015
|
+
modalProps?: ModalProps;
|
|
1016
|
+
}
|
|
1017
|
+
declare const useProCurdModule: () => IProCurdModuleProvide;
|
|
1018
|
+
declare const provideProCurdModule: (ctx: IProCurdModuleProvide) => void;
|
|
1019
|
+
|
|
1020
|
+
interface ICurdNetConvert {
|
|
1021
|
+
convertAddParams?: (values: Record<string, any>, record: Record<string, any>) => Record<string, any>;
|
|
1022
|
+
convertEditParams?: (values: Record<string, any>, record: Record<string, any>) => Record<string, any>;
|
|
1023
|
+
convertListParams?: (values: Record<string, any>) => Record<string, any>;
|
|
1024
|
+
convertListData?: (actor: IRequestActor) => IListData;
|
|
1025
|
+
convertDetailParams?: (record: Record<string, any>, rowKey: string) => Record<string, any>;
|
|
1026
|
+
convertDetailData?: (actor: IRequestActor) => Record<string, any>;
|
|
1027
|
+
convertDeleteParams?: (record: Record<string, any>, rowKey: string) => Record<string, any>;
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* `on{Action}Bubble`
|
|
1031
|
+
* 各个回调中都会调用该方法
|
|
1032
|
+
* 场景:不改变原有方法逻辑,但是需要在对应的节点添加其他处理
|
|
1033
|
+
* 如果直接重写`on{Action}...`,将不会再调用对应的bubble方法
|
|
1034
|
+
*/
|
|
1035
|
+
interface INetOperate extends IOperate {
|
|
1036
|
+
onListDone?: (actor: IRequestActor) => void;
|
|
1037
|
+
onListFail?: (actor: IRequestActor) => void;
|
|
1038
|
+
onListBubble?: (type: "emit" | "done" | "fail", ...rest: any[]) => void;
|
|
1039
|
+
onDetailDone?: (actor: IRequestActor) => void;
|
|
1040
|
+
onDetailFail?: (actor: IRequestActor) => void;
|
|
1041
|
+
onDetailBubble?: (type: "emit" | "done" | "fail", ...rest: any[]) => void;
|
|
1042
|
+
onEditDone?: (actor: IRequestActor) => void;
|
|
1043
|
+
onEditFail?: (actor: IRequestActor) => void;
|
|
1044
|
+
onEditBubble?: (type: "emit" | "execute" | "done" | "fail", ...rest: any[]) => void;
|
|
1045
|
+
onAddDone?: (actor: IRequestActor) => void;
|
|
1046
|
+
onAddFail?: (actor: IRequestActor) => void;
|
|
1047
|
+
onAddBubble?: (type: "emit" | "execute" | "done" | "fail", ...rest: any[]) => void;
|
|
1048
|
+
onDeleteDone?: (actor: IRequestActor) => void;
|
|
1049
|
+
onDeleteFail?: (actor: IRequestActor) => void;
|
|
1050
|
+
onDeleteBubble?: (type: "emit" | "done" | "fail", ...rest: any[]) => void;
|
|
1051
|
+
}
|
|
1052
|
+
declare const proCurdNetProps: () => {
|
|
1053
|
+
converts: {
|
|
1054
|
+
type: PropType<ICurdNetConvert>;
|
|
1055
|
+
};
|
|
1056
|
+
operate: {
|
|
1057
|
+
type: PropType<INetOperate>;
|
|
1058
|
+
};
|
|
1059
|
+
};
|
|
1060
|
+
declare type ProCurdNetProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdNetProps>>> & Omit<ProCurdModuleProps, "operate">;
|
|
1061
|
+
declare const ProCurdNet: vue.DefineComponent<ProCurdNetProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProCurdNetProps>, {}>;
|
|
1062
|
+
|
|
1063
|
+
declare const proSelectProps: () => {
|
|
1064
|
+
options: PropType<TOptions>;
|
|
1065
|
+
};
|
|
1066
|
+
declare type ProSelectProps = Partial<ExtractPropTypes<ReturnType<typeof proSelectProps>>> & typeof ElSelect.props;
|
|
1067
|
+
declare const ProSelect: vue.DefineComponent<any, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<any>, {} | {
|
|
1068
|
+
[x: string]: any;
|
|
1069
|
+
}>;
|
|
1070
|
+
|
|
1071
|
+
/**
|
|
1072
|
+
* 剔除showState或showStateRules规则为!true的值
|
|
1073
|
+
* @param values
|
|
1074
|
+
* @param showState
|
|
1075
|
+
* @param showStateRules
|
|
1076
|
+
*/
|
|
1077
|
+
declare const getValidValues: (values: Record<string, any>, showState?: BooleanObjType | undefined, showStateRules?: BooleanRulesObjType | undefined) => Record<string, any>;
|
|
1078
|
+
/**
|
|
1079
|
+
* string类型的path转为arr
|
|
1080
|
+
* @param path
|
|
1081
|
+
*/
|
|
1082
|
+
declare const convertPathToList: (path: undefined | string | number | (string | number)[]) => undefined | (string | number)[];
|
|
1083
|
+
|
|
1084
|
+
export { ButtonProps, ContinueAddButton, CurdAddAction, CurdCurrentMode, DescriptionsProps, ICurdAddAction, ICurdCurrentMode, ICurdNetConvert, ICurdState, IListData, INetOperate, IOperate, IOperateItem, IProCurdModuleProvide, IProModuleProvide, ISearchMode, ITableOperate, OkButton, PaginationProps, ProCreateFormItemProps, ProCurd, ProCurdDesc, ProCurdDescConnect, ProCurdForm, ProCurdFormConnect, ProCurdFormProps, ProCurdList, ProCurdListConnect, ProCurdListProps, ProCurdModuleProps, ProCurdNet, ProCurdNetProps, ProForm, ProFormCascader, ProFormCheckbox, ProFormDatePicker, ProFormItem, ProFormItemProps, ProFormList, ProFormListProps, ProFormProps, ProFormRadio, ProFormSelect, ProFormSwitch, ProFormText, ProFormTextNumber, ProFormTimePicker, ProFormTreeSelect, ProModule, ProModuleProps, ProOperateButton, ProOperateButtonProps, ProSchemaForm, ProSchemaFormProps, ProSearchForm, ProSearchFormProps, ProSelect, ProSelectProps, ProSubmitButton, ProTable, ProTableProps, SearchMode, TPageState, convertPathToList, createFormItemComponent, defaultPage, getColumnFormItemName, getColumnValueType, getFormItemEl, getItemEl, getValidValues, provideProCurdModule, provideProForm, provideProFormList, provideProModule, useProCurdModule, useProForm, useProFormList, useProModule };
|