@wyfex/ivue 0.11.0 → 0.13.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/dist/index.es.js +23 -11
- package/dist/index.umd.cjs +23 -11
- package/dist/ivue.css +1 -1
- package/dist/types/UseElButton/hook.d.ts +3 -7
- package/dist/types/UseElButton/index.vue.d.ts +2 -2
- package/dist/types/UseElButton/types.d.ts +1 -1
- package/dist/types/UseElForm/components/QueryForm.vue.d.ts +134 -0
- package/dist/types/UseElForm/components/RowForm.vue.d.ts +140 -0
- package/dist/types/UseElForm/components/controls/Cascader.vue.d.ts +14 -0
- package/dist/types/UseElForm/components/controls/DatePicker.vue.d.ts +15 -0
- package/dist/types/UseElForm/components/controls/Input.vue.d.ts +11 -0
- package/dist/types/UseElForm/components/controls/InputNumber.vue.d.ts +10 -0
- package/dist/types/UseElForm/components/controls/InputRange.vue.d.ts +11 -0
- package/dist/types/UseElForm/components/controls/Radio.vue.d.ts +11 -0
- package/dist/types/UseElForm/components/controls/Select.vue.d.ts +18 -0
- package/dist/types/UseElForm/components/controls/Switch.vue.d.ts +8 -0
- package/dist/types/UseElForm/components/controls/TimePicker.vue.d.ts +10 -0
- package/dist/types/UseElForm/components/controls/TimeSelect.vue.d.ts +10 -0
- package/dist/types/UseElForm/components/controls/TreeSelect.vue.d.ts +12 -0
- package/dist/types/UseElForm/components/useQueryColSpan.d.ts +6 -0
- package/dist/types/UseElForm/hook.d.ts +14 -0
- package/dist/types/UseElForm/index.vue.d.ts +139 -0
- package/dist/types/UseElForm/props.d.ts +60 -0
- package/dist/types/UseElForm/types.d.ts +194 -0
- package/dist/types/UseElSwitch/index.vue.d.ts +51 -0
- package/dist/types/UseElSwitch/props.d.ts +23 -0
- package/dist/types/UseElTable/hooks/useElTable.d.ts +3 -8
- package/dist/types/UseElTable/hooks/useTableColumnMinWidth.d.ts +5 -0
- package/dist/types/UseElTable/hooks/useTableHeightAdaptive.d.ts +4 -0
- package/dist/types/UseElTable/utils.d.ts +1 -3
- package/dist/types/index.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/UseElButton/types.ts +4 -4
- package/src/components/UseElDialog/props.ts +2 -2
- package/src/components/UseElForm/props.ts +102 -0
- package/src/components/UseElForm/types.ts +371 -0
- package/src/components/UseElSwitch/props.ts +40 -0
- package/src/components/UseElTable/props.ts +2 -0
- package/src/types/index.ts +1 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { FormColumn, QueryConfig } from './types';
|
|
3
|
+
import { DictMap, DictProps, RenderConfig } from '../../../types';
|
|
4
|
+
declare const _default: {
|
|
5
|
+
formColumns: {
|
|
6
|
+
type: PropType<FormColumn[]>;
|
|
7
|
+
required: boolean;
|
|
8
|
+
};
|
|
9
|
+
formModel: {
|
|
10
|
+
type: PropType<Record<string, any>>;
|
|
11
|
+
required: boolean;
|
|
12
|
+
};
|
|
13
|
+
useRender: {
|
|
14
|
+
type: PropType<boolean | RenderConfig>;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
dictMap: {
|
|
18
|
+
type: PropType<DictMap>;
|
|
19
|
+
default: () => {};
|
|
20
|
+
};
|
|
21
|
+
dictProps: {
|
|
22
|
+
type: PropType<DictProps>;
|
|
23
|
+
default: () => {};
|
|
24
|
+
};
|
|
25
|
+
formItemWidth: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
labelSuffix: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
labelWidth: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
labelPosition: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
default: string;
|
|
40
|
+
validator: (val: string) => boolean;
|
|
41
|
+
};
|
|
42
|
+
rowGutter: {
|
|
43
|
+
type: NumberConstructor;
|
|
44
|
+
default: number;
|
|
45
|
+
};
|
|
46
|
+
colSpan: {
|
|
47
|
+
type: NumberConstructor;
|
|
48
|
+
default: number;
|
|
49
|
+
validator: (val: number) => boolean;
|
|
50
|
+
};
|
|
51
|
+
disabled: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
55
|
+
queryConfig: {
|
|
56
|
+
type: PropType<QueryConfig>;
|
|
57
|
+
default: () => {};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export default _default;
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
|
2
|
+
import { default as componentProps } from './props';
|
|
3
|
+
import { RenderConfig, UseDict } from '../../../types';
|
|
4
|
+
export type Props = ExtractPropTypes<typeof componentProps>;
|
|
5
|
+
export interface Emits {
|
|
6
|
+
(e: 'onDictKeys', value?: string[]): void;
|
|
7
|
+
(e: 'update:formModel', value: Record<string, any>): void;
|
|
8
|
+
}
|
|
9
|
+
export interface QueryConfig {
|
|
10
|
+
mode?: 'ROW' | 'INLINE';
|
|
11
|
+
colSpan?: 24 | 12 | 8 | 6 | 4 | 3 | 2 | 1 | 0;
|
|
12
|
+
formItemWidth?: string;
|
|
13
|
+
showBottomBorber?: boolean;
|
|
14
|
+
openQueryBtnLoading?: boolean;
|
|
15
|
+
onQuery?: Function;
|
|
16
|
+
}
|
|
17
|
+
export interface InputConfig {
|
|
18
|
+
useRender: boolean | RenderConfig;
|
|
19
|
+
type?: 'text' | 'textarea' | 'number' | 'password' | 'email' | 'search' | 'tel' | 'url';
|
|
20
|
+
prefixIcon?: string;
|
|
21
|
+
suffixIcon?: string;
|
|
22
|
+
clearable?: boolean;
|
|
23
|
+
maxlength?: string;
|
|
24
|
+
formatter?: string;
|
|
25
|
+
parser?: string;
|
|
26
|
+
autosize?: boolean | {
|
|
27
|
+
minRows?: number;
|
|
28
|
+
maxRows?: number;
|
|
29
|
+
};
|
|
30
|
+
rows?: number;
|
|
31
|
+
resize?: string;
|
|
32
|
+
showPassword?: boolean;
|
|
33
|
+
placeholder?: string;
|
|
34
|
+
width?: string;
|
|
35
|
+
autoFocus?: boolean;
|
|
36
|
+
prefixContent?: string | object;
|
|
37
|
+
suffixContent?: string | object;
|
|
38
|
+
prependContent?: string | object;
|
|
39
|
+
appendContent?: string | object;
|
|
40
|
+
unit?: string | object;
|
|
41
|
+
onClear?: (...args: any) => any;
|
|
42
|
+
inputEvent?: Function;
|
|
43
|
+
onKeyupEnter?: (...args: any) => any;
|
|
44
|
+
}
|
|
45
|
+
export interface InputNumberConfig {
|
|
46
|
+
useRender: boolean | RenderConfig;
|
|
47
|
+
min?: number;
|
|
48
|
+
max?: number;
|
|
49
|
+
step?: number;
|
|
50
|
+
precision?: number;
|
|
51
|
+
placeholder?: string;
|
|
52
|
+
disabledScientific?: boolean;
|
|
53
|
+
unit?: string | object;
|
|
54
|
+
}
|
|
55
|
+
export interface RadioConfig {
|
|
56
|
+
useRender: boolean | RenderConfig;
|
|
57
|
+
options?: Array<{
|
|
58
|
+
label: string;
|
|
59
|
+
value: string | number;
|
|
60
|
+
}>;
|
|
61
|
+
props?: {
|
|
62
|
+
value: string;
|
|
63
|
+
label?: string;
|
|
64
|
+
};
|
|
65
|
+
reverse?: boolean;
|
|
66
|
+
onChange?: (...args: any) => any;
|
|
67
|
+
}
|
|
68
|
+
export interface SelectConfig {
|
|
69
|
+
useRender: boolean | RenderConfig;
|
|
70
|
+
multiple?: boolean;
|
|
71
|
+
clearable?: boolean;
|
|
72
|
+
placeholder?: string;
|
|
73
|
+
options?: Array<{
|
|
74
|
+
label: string;
|
|
75
|
+
value: string | number;
|
|
76
|
+
}>;
|
|
77
|
+
props?: {
|
|
78
|
+
value: string;
|
|
79
|
+
label?: string;
|
|
80
|
+
};
|
|
81
|
+
useV2: boolean;
|
|
82
|
+
reverse?: boolean;
|
|
83
|
+
toJoin?: boolean;
|
|
84
|
+
width?: string;
|
|
85
|
+
onChange?: (...args: any) => any;
|
|
86
|
+
}
|
|
87
|
+
export interface CascaderConfig {
|
|
88
|
+
useRender: boolean | RenderConfig;
|
|
89
|
+
clearable?: boolean;
|
|
90
|
+
options?: Array<{
|
|
91
|
+
label: string;
|
|
92
|
+
value: string | number;
|
|
93
|
+
}>;
|
|
94
|
+
props?: {
|
|
95
|
+
value: string;
|
|
96
|
+
label?: string;
|
|
97
|
+
};
|
|
98
|
+
width?: string;
|
|
99
|
+
onChange?: (...args: any) => any;
|
|
100
|
+
}
|
|
101
|
+
export interface DatePickerConfig {
|
|
102
|
+
useRender: boolean | RenderConfig;
|
|
103
|
+
type?: 'year' | 'years' | 'month' | 'months' | 'date' | 'dates' | 'datetime' | 'week' | 'datetimerange' | 'daterange' | 'monthrange' | 'yearrange';
|
|
104
|
+
clearable?: boolean;
|
|
105
|
+
disabledDate?: Function;
|
|
106
|
+
placeholder?: string;
|
|
107
|
+
format?: string;
|
|
108
|
+
valueFormat?: string;
|
|
109
|
+
startPlaceholder?: string;
|
|
110
|
+
endPlaceholder?: string;
|
|
111
|
+
rangeSeparator?: string;
|
|
112
|
+
width?: string;
|
|
113
|
+
onCalendarChange?: Function;
|
|
114
|
+
onClear?: Function;
|
|
115
|
+
onChange?: Function;
|
|
116
|
+
}
|
|
117
|
+
export interface TimePickerConfig {
|
|
118
|
+
useRender: boolean | RenderConfig;
|
|
119
|
+
startPlaceholder?: string;
|
|
120
|
+
endPlaceholder?: string;
|
|
121
|
+
rangeSeparator?: string;
|
|
122
|
+
isRange?: boolean;
|
|
123
|
+
editable?: boolean;
|
|
124
|
+
format?: string;
|
|
125
|
+
valueFormat?: string;
|
|
126
|
+
onChange?: (...args: any) => any;
|
|
127
|
+
}
|
|
128
|
+
export interface TimeSelectConfig {
|
|
129
|
+
useRender: boolean | RenderConfig;
|
|
130
|
+
startProp: string;
|
|
131
|
+
endProp: string;
|
|
132
|
+
}
|
|
133
|
+
export interface SwitchConfig {
|
|
134
|
+
useRender: boolean | RenderConfig;
|
|
135
|
+
activeValue?: string | number | boolean;
|
|
136
|
+
inactiveValue?: string | number | boolean;
|
|
137
|
+
onChange?: (...args: any) => any;
|
|
138
|
+
}
|
|
139
|
+
export interface InputRangeConfig {
|
|
140
|
+
startProp: string;
|
|
141
|
+
endProp: string;
|
|
142
|
+
startPlaceholder?: string;
|
|
143
|
+
endPlaceholder?: string;
|
|
144
|
+
rangeSeparator?: string;
|
|
145
|
+
onClear?: (...args: any) => any;
|
|
146
|
+
}
|
|
147
|
+
export interface TreeSelectConfig {
|
|
148
|
+
useRender?: boolean | RenderConfig;
|
|
149
|
+
data: Record<string, unknown>[];
|
|
150
|
+
reverse?: boolean;
|
|
151
|
+
width?: string;
|
|
152
|
+
placeholder?: string;
|
|
153
|
+
props?: {
|
|
154
|
+
value: string;
|
|
155
|
+
label?: string;
|
|
156
|
+
};
|
|
157
|
+
checkStrictly?: boolean;
|
|
158
|
+
filterable?: boolean;
|
|
159
|
+
clearable?: boolean;
|
|
160
|
+
defaultExpandedKeys?: Array<string | number>;
|
|
161
|
+
}
|
|
162
|
+
export interface IRequired {
|
|
163
|
+
isRequired?: boolean;
|
|
164
|
+
validator: 'mobile' | 'nonNegativeDecimal';
|
|
165
|
+
parmas?: any;
|
|
166
|
+
}
|
|
167
|
+
export interface FormColumn {
|
|
168
|
+
label?: string;
|
|
169
|
+
prop: string;
|
|
170
|
+
queryProp?: string | string[];
|
|
171
|
+
required: boolean | IRequired;
|
|
172
|
+
errorMessage?: string;
|
|
173
|
+
disabled?: boolean;
|
|
174
|
+
useDict?: boolean | string | UseDict;
|
|
175
|
+
span?: number;
|
|
176
|
+
labelWidth?: string;
|
|
177
|
+
labelPosition?: 'left' | 'right' | 'top';
|
|
178
|
+
show?: boolean;
|
|
179
|
+
filter?: boolean;
|
|
180
|
+
formItemClass?: string;
|
|
181
|
+
slot?: string | boolean;
|
|
182
|
+
renderConfig?: RenderConfig;
|
|
183
|
+
inputConfig?: InputConfig;
|
|
184
|
+
inputNumberConfig?: InputNumberConfig;
|
|
185
|
+
selectConfig?: SelectConfig;
|
|
186
|
+
treeSelectConfig?: TreeSelectConfig;
|
|
187
|
+
cascaderConfig?: CascaderConfig;
|
|
188
|
+
datePickerConfig?: DatePickerConfig;
|
|
189
|
+
timePickerConfig?: TimePickerConfig;
|
|
190
|
+
timeSelectConfig?: TimeSelectConfig;
|
|
191
|
+
radioConfig?: RadioConfig;
|
|
192
|
+
switchConfig?: SwitchConfig;
|
|
193
|
+
inputRangeConfig?: InputRangeConfig;
|
|
194
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
activeValue: {
|
|
3
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
4
|
+
default: number;
|
|
5
|
+
};
|
|
6
|
+
inactiveValue: {
|
|
7
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
8
|
+
default: number;
|
|
9
|
+
};
|
|
10
|
+
activeText: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
inactiveText: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
inlinePrompt: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
23
|
+
activeValue: {
|
|
24
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
25
|
+
default: number;
|
|
26
|
+
};
|
|
27
|
+
inactiveValue: {
|
|
28
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
29
|
+
default: number;
|
|
30
|
+
};
|
|
31
|
+
activeText: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
inactiveText: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
39
|
+
inlinePrompt: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
43
|
+
}>> & Readonly<{}>, {
|
|
44
|
+
activeValue: string | number | boolean;
|
|
45
|
+
inactiveValue: string | number | boolean;
|
|
46
|
+
activeText: string;
|
|
47
|
+
inactiveText: string;
|
|
48
|
+
inlinePrompt: boolean;
|
|
49
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
50
|
+
declare const _default: typeof __VLS_export;
|
|
51
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
activeValue: {
|
|
3
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
4
|
+
default: number;
|
|
5
|
+
};
|
|
6
|
+
inactiveValue: {
|
|
7
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
8
|
+
default: number;
|
|
9
|
+
};
|
|
10
|
+
activeText: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
inactiveText: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
inlinePrompt: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import { ComputedRef
|
|
2
|
-
import { TableInstance } from 'element-plus';
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
3
2
|
import { Emits, Props, TableColumn } from '../types';
|
|
4
3
|
import { GlobalConfig } from '../../../../types';
|
|
5
|
-
export declare const useElTable: ({ mergedProps, emits, globalConfig
|
|
4
|
+
export declare const useElTable: ({ mergedProps, emits, globalConfig }: {
|
|
6
5
|
mergedProps: ComputedRef<Props>;
|
|
7
6
|
emits: Emits;
|
|
8
7
|
globalConfig: ComputedRef<GlobalConfig>;
|
|
9
|
-
rootRef: Ref<HTMLDivElement | null>;
|
|
10
|
-
tableWrapperRef: Ref<HTMLDivElement | null>;
|
|
11
|
-
etRef: Ref<TableInstance | null>;
|
|
12
8
|
}) => {
|
|
13
|
-
tableRealHeight: Ref<string, string>;
|
|
14
9
|
processHeaderCellClassName: ({ column }: any) => "" | "hideAllSelection";
|
|
15
10
|
tableColumnsComputed: ComputedRef<TableColumn[]>;
|
|
16
|
-
processDictData: (item: TableColumn) => Record<string,
|
|
11
|
+
processDictData: (item: TableColumn) => Record<string, any>[];
|
|
17
12
|
validateRequired: (row: Record<string, any>) => boolean;
|
|
18
13
|
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { TableInstance } from 'element-plus';
|
|
3
|
+
import { Props } from '../types';
|
|
4
|
+
import { GlobalConfig } from '../../../../types';
|
|
5
|
+
export declare const useTableColumnMinWidth: (etRef: Ref<TableInstance | null>, mergedProps: ComputedRef<Props>, globalConfig: ComputedRef<GlobalConfig>) => void;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TableColumn, Props } from './types';
|
|
1
|
+
import { TableColumn } from './types';
|
|
3
2
|
import { GlobalConfig } from '../../../types';
|
|
4
3
|
export declare const processFieldProp: (row: Record<string, unknown>, item: TableColumn, globalConfig: GlobalConfig) => {
|
|
5
4
|
class: string;
|
|
6
5
|
style: string;
|
|
7
6
|
data: unknown;
|
|
8
7
|
};
|
|
9
|
-
export declare const handleMinWidth: (columns: TableColumn[], data: any, mergedProps: ComputedRef<Props>, globalConfig: GlobalConfig) => void;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,8 +4,10 @@ export { default as UseElDatePicker } from './UseElDatePicker/index.vue';
|
|
|
4
4
|
export { default as UseElDescriptions } from './UseElDescriptions/index.vue';
|
|
5
5
|
export { default as UseElDialog } from './UseElDialog/index.vue';
|
|
6
6
|
export { default as UseElDrawer } from './UseElDrawer/index.vue';
|
|
7
|
+
export { default as UseElForm } from './UseElForm/index.vue';
|
|
7
8
|
export { default as UseElInput } from './UseElInput/index.vue';
|
|
8
9
|
export { default as UseElSelect } from './UseElSelect/index.vue';
|
|
10
|
+
export { default as UseElSwitch } from './UseElSwitch/index.vue';
|
|
9
11
|
export { default as UseElTable } from './UseElTable/index.vue';
|
|
10
12
|
export { default as UseRender } from './UseRender/index.vue';
|
|
11
13
|
export { default as UseSvgIcon } from './UseSvgIcon/index.vue';
|
package/package.json
CHANGED
|
@@ -11,9 +11,9 @@ export type Props = ExtractPropTypes<typeof componentProps>
|
|
|
11
11
|
*/
|
|
12
12
|
export interface Emits {
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* 点击事件 默认自带防抖
|
|
15
15
|
*/
|
|
16
|
-
(e: '
|
|
16
|
+
(e: 'click', value?: string | number | Record<string, unknown>): void
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -22,7 +22,7 @@ export interface Emits {
|
|
|
22
22
|
export interface ExtConfig {
|
|
23
23
|
/**
|
|
24
24
|
* 防抖配置项
|
|
25
|
-
*
|
|
25
|
+
* 无需防抖将delay设置为0即可
|
|
26
26
|
*/
|
|
27
27
|
debounce?: {
|
|
28
28
|
/**
|
|
@@ -40,7 +40,7 @@ export interface ExtConfig {
|
|
|
40
40
|
confirm?: {
|
|
41
41
|
/**
|
|
42
42
|
* 二次确认数据 显式设置则开启二次确认
|
|
43
|
-
* 可为String、Number、Object、Array,无需传递数据则显式设置为null
|
|
43
|
+
* 可为String、Number、Object、Array,无需传递数据则显式设置为null
|
|
44
44
|
*/
|
|
45
45
|
data?: string | number | Record<string, unknown> | unknown[] | null
|
|
46
46
|
/**
|
|
@@ -73,11 +73,11 @@ export default {
|
|
|
73
73
|
default: false
|
|
74
74
|
},
|
|
75
75
|
/**
|
|
76
|
-
* 底部定位 默认
|
|
76
|
+
* 底部定位 默认left
|
|
77
77
|
*/
|
|
78
78
|
footerPosition: {
|
|
79
79
|
type: String,
|
|
80
|
-
default: '
|
|
80
|
+
default: 'left',
|
|
81
81
|
validator: (val: string) => ['left', 'center', 'right'].includes(val)
|
|
82
82
|
},
|
|
83
83
|
/**
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { PropType } from 'vue'
|
|
2
|
+
import type { FormColumn, QueryConfig } from './types'
|
|
3
|
+
import type { DictMap, DictProps, RenderConfig } from '@/types'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 组件props
|
|
7
|
+
*/
|
|
8
|
+
export default {
|
|
9
|
+
/**
|
|
10
|
+
* 表单列 必传
|
|
11
|
+
*/
|
|
12
|
+
formColumns: {
|
|
13
|
+
type: Array as PropType<FormColumn[]>,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
/**
|
|
17
|
+
* 表单模型 必传
|
|
18
|
+
*/
|
|
19
|
+
formModel: {
|
|
20
|
+
type: Object as PropType<Record<string, any>>,
|
|
21
|
+
required: true
|
|
22
|
+
},
|
|
23
|
+
/**
|
|
24
|
+
* 是否使用渲染器 默认否
|
|
25
|
+
*/
|
|
26
|
+
useRender: {
|
|
27
|
+
type: [Boolean, Object] as PropType<boolean | RenderConfig>,
|
|
28
|
+
default: false
|
|
29
|
+
},
|
|
30
|
+
/**
|
|
31
|
+
* 字典映射 数据结构为{ formColumns[][label | useDict | useDict.data]: Array<{ label: string, value: any }> }
|
|
32
|
+
*/
|
|
33
|
+
dictMap: {
|
|
34
|
+
type: Object as PropType<DictMap>,
|
|
35
|
+
default: () => ({})
|
|
36
|
+
},
|
|
37
|
+
/**
|
|
38
|
+
* 字典属性 默认为{ value: 'value', label: 'label', children: 'children' },可通过全局配置进行设置,为适配全局配置此处不再设置默认值
|
|
39
|
+
*/
|
|
40
|
+
dictProps: {
|
|
41
|
+
type: Object as PropType<DictProps>,
|
|
42
|
+
default: () => ({})
|
|
43
|
+
},
|
|
44
|
+
/**
|
|
45
|
+
* el-form-item宽度值
|
|
46
|
+
*/
|
|
47
|
+
formItemWidth: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: '100%'
|
|
50
|
+
},
|
|
51
|
+
/**
|
|
52
|
+
* label后缀
|
|
53
|
+
*/
|
|
54
|
+
labelSuffix: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: ''
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* label宽度
|
|
60
|
+
*/
|
|
61
|
+
labelWidth: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: 'auto'
|
|
64
|
+
},
|
|
65
|
+
/**
|
|
66
|
+
* label定位
|
|
67
|
+
*/
|
|
68
|
+
labelPosition: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: 'right',
|
|
71
|
+
validator: (val: string) => ['left', 'right', 'top'].includes(val)
|
|
72
|
+
},
|
|
73
|
+
/**
|
|
74
|
+
* el-row的gutter值
|
|
75
|
+
*/
|
|
76
|
+
rowGutter: {
|
|
77
|
+
type: Number,
|
|
78
|
+
default: 20
|
|
79
|
+
},
|
|
80
|
+
/**
|
|
81
|
+
* el-col的span值
|
|
82
|
+
*/
|
|
83
|
+
colSpan: {
|
|
84
|
+
type: Number,
|
|
85
|
+
default: 12,
|
|
86
|
+
validator: (val: number) => [24, 12, 8, 6, 4, 3, 2, 1, 0].includes(val)
|
|
87
|
+
},
|
|
88
|
+
/**
|
|
89
|
+
* 是否禁用
|
|
90
|
+
*/
|
|
91
|
+
disabled: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: false
|
|
94
|
+
},
|
|
95
|
+
/**
|
|
96
|
+
* 查询配置
|
|
97
|
+
*/
|
|
98
|
+
queryConfig: {
|
|
99
|
+
type: Object as PropType<QueryConfig>,
|
|
100
|
+
default: () => ({})
|
|
101
|
+
}
|
|
102
|
+
}
|