@antdv-next1/pro-field 1.0.9 → 1.0.11
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/ProField.d.ts +15 -3
- package/dist/ProField.js +18 -18
- package/dist/ProPureField.d.ts +16 -3
- package/dist/ProPureField.js +18 -18
- package/dist/components/ColorPicker/index.d.ts +1 -1
- package/dist/components/DigitRange/index.d.ts +2 -2
- package/dist/components/Select/SearchSelect/index.d.ts +155 -19
- package/dist/pro-field.esm.js +37295 -40431
- package/dist/pro-field.js +65 -65
- package/package.json +3 -3
package/dist/ProField.d.ts
CHANGED
|
@@ -1,18 +1,30 @@
|
|
|
1
1
|
import { RenderProps } from "./typing.js";
|
|
2
2
|
import * as _$vue from "vue";
|
|
3
3
|
import { Plugin } from "vue";
|
|
4
|
+
import { ProFieldFCRenderProps, ProRenderFieldPropsType } from "@antdv-next1/pro-provider";
|
|
5
|
+
import * as _$_antdv_next1_pro_utils0 from "@antdv-next1/pro-utils";
|
|
4
6
|
import { ProFieldTextType, ProFieldValueObjectType, ProFieldValueType } from "@antdv-next1/pro-utils";
|
|
5
7
|
import { CustomSlotsType, VueNode as VueNode$1 } from "@v-c/util/dist/type";
|
|
6
8
|
|
|
7
9
|
//#region src/ProField.d.ts
|
|
8
|
-
|
|
10
|
+
type ProFieldProps = RenderProps & {
|
|
9
11
|
valueType?: ProFieldValueType | ProFieldValueObjectType;
|
|
10
12
|
text?: ProFieldTextType;
|
|
11
13
|
placeholder?: string | string[];
|
|
12
|
-
}
|
|
14
|
+
};
|
|
13
15
|
declare const _ProField: _$vue.DefineSetupFnComponent<ProFieldProps, {}, CustomSlotsType<{
|
|
14
16
|
default?: () => VueNode$1;
|
|
15
|
-
}>,
|
|
17
|
+
}>, Omit<ProFieldFCRenderProps, "text" | "placeholder"> & ProRenderFieldPropsType<any> & {
|
|
18
|
+
id?: string;
|
|
19
|
+
request?: _$_antdv_next1_pro_utils0.ProFieldRequestData;
|
|
20
|
+
emptyText?: VueNode$1;
|
|
21
|
+
open?: boolean;
|
|
22
|
+
onOpenChange?: (open: boolean) => void;
|
|
23
|
+
} & {
|
|
24
|
+
valueType?: ProFieldValueType | ProFieldValueObjectType;
|
|
25
|
+
text?: ProFieldTextType;
|
|
26
|
+
placeholder?: string | string[];
|
|
27
|
+
} & {}, _$vue.PublicProps>;
|
|
16
28
|
declare const ProField: typeof _ProField & Plugin;
|
|
17
29
|
//#endregion
|
|
18
30
|
export { ProFieldProps, ProField as default };
|
package/dist/ProField.js
CHANGED
|
@@ -300,24 +300,6 @@ const ProField = /* @__PURE__ */ defineComponent((props, { expose }) => {
|
|
|
300
300
|
};
|
|
301
301
|
}, {
|
|
302
302
|
props: {
|
|
303
|
-
valueType: { required: false },
|
|
304
|
-
text: {
|
|
305
|
-
type: [
|
|
306
|
-
Object,
|
|
307
|
-
Function,
|
|
308
|
-
String,
|
|
309
|
-
Number,
|
|
310
|
-
null,
|
|
311
|
-
Boolean,
|
|
312
|
-
Array
|
|
313
|
-
],
|
|
314
|
-
required: false,
|
|
315
|
-
default: void 0
|
|
316
|
-
},
|
|
317
|
-
placeholder: {
|
|
318
|
-
type: [String, Array],
|
|
319
|
-
required: false
|
|
320
|
-
},
|
|
321
303
|
mode: {
|
|
322
304
|
type: String,
|
|
323
305
|
required: false
|
|
@@ -404,6 +386,24 @@ const ProField = /* @__PURE__ */ defineComponent((props, { expose }) => {
|
|
|
404
386
|
onOpenChange: {
|
|
405
387
|
type: Function,
|
|
406
388
|
required: false
|
|
389
|
+
},
|
|
390
|
+
valueType: { required: false },
|
|
391
|
+
text: {
|
|
392
|
+
type: [
|
|
393
|
+
Object,
|
|
394
|
+
Function,
|
|
395
|
+
String,
|
|
396
|
+
Number,
|
|
397
|
+
null,
|
|
398
|
+
Boolean,
|
|
399
|
+
Array
|
|
400
|
+
],
|
|
401
|
+
required: false,
|
|
402
|
+
default: void 0
|
|
403
|
+
},
|
|
404
|
+
placeholder: {
|
|
405
|
+
type: [String, Array],
|
|
406
|
+
required: false
|
|
407
407
|
}
|
|
408
408
|
},
|
|
409
409
|
name: "ProField",
|
package/dist/ProPureField.d.ts
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
import { ProFieldProps } from "./ProField.js";
|
|
2
2
|
import * as _$vue from "vue";
|
|
3
|
-
import {
|
|
3
|
+
import { ProFieldFCRenderProps, ProRenderFieldPropsType } from "@antdv-next1/pro-provider";
|
|
4
|
+
import * as _$_antdv_next1_pro_utils0 from "@antdv-next1/pro-utils";
|
|
5
|
+
import { ProFieldTextType, ProFieldValueObjectType, ProFieldValueType } from "@antdv-next1/pro-utils";
|
|
6
|
+
import { CustomSlotsType, VueNode as VueNode$1 } from "@v-c/util/dist/type";
|
|
4
7
|
|
|
5
8
|
//#region src/ProPureField.d.ts
|
|
6
9
|
declare const ProPureField: _$vue.DefineSetupFnComponent<ProFieldProps, {}, CustomSlotsType<{
|
|
7
|
-
default?: () => VueNode;
|
|
8
|
-
}>,
|
|
10
|
+
default?: () => VueNode$1;
|
|
11
|
+
}>, Omit<ProFieldFCRenderProps, "text" | "placeholder"> & ProRenderFieldPropsType<any> & {
|
|
12
|
+
id?: string;
|
|
13
|
+
request?: _$_antdv_next1_pro_utils0.ProFieldRequestData;
|
|
14
|
+
emptyText?: VueNode$1;
|
|
15
|
+
open?: boolean;
|
|
16
|
+
onOpenChange?: (open: boolean) => void;
|
|
17
|
+
} & {
|
|
18
|
+
valueType?: ProFieldValueType | ProFieldValueObjectType;
|
|
19
|
+
text?: ProFieldTextType;
|
|
20
|
+
placeholder?: string | string[];
|
|
21
|
+
} & {}, _$vue.PublicProps>;
|
|
9
22
|
//#endregion
|
|
10
23
|
export { ProPureField as default };
|
package/dist/ProPureField.js
CHANGED
|
@@ -106,24 +106,6 @@ const ProPureField = /* @__PURE__ */ defineComponent((props, { attrs, expose })
|
|
|
106
106
|
};
|
|
107
107
|
}, {
|
|
108
108
|
props: {
|
|
109
|
-
valueType: { required: false },
|
|
110
|
-
text: {
|
|
111
|
-
type: [
|
|
112
|
-
Object,
|
|
113
|
-
Function,
|
|
114
|
-
String,
|
|
115
|
-
Number,
|
|
116
|
-
null,
|
|
117
|
-
Boolean,
|
|
118
|
-
Array
|
|
119
|
-
],
|
|
120
|
-
required: false,
|
|
121
|
-
default: void 0
|
|
122
|
-
},
|
|
123
|
-
placeholder: {
|
|
124
|
-
type: [String, Array],
|
|
125
|
-
required: false
|
|
126
|
-
},
|
|
127
109
|
mode: {
|
|
128
110
|
type: String,
|
|
129
111
|
required: false
|
|
@@ -213,6 +195,24 @@ const ProPureField = /* @__PURE__ */ defineComponent((props, { attrs, expose })
|
|
|
213
195
|
onOpenChange: {
|
|
214
196
|
type: Function,
|
|
215
197
|
required: false
|
|
198
|
+
},
|
|
199
|
+
valueType: { required: false },
|
|
200
|
+
text: {
|
|
201
|
+
type: [
|
|
202
|
+
Object,
|
|
203
|
+
Function,
|
|
204
|
+
String,
|
|
205
|
+
Number,
|
|
206
|
+
null,
|
|
207
|
+
Boolean,
|
|
208
|
+
Array
|
|
209
|
+
],
|
|
210
|
+
required: false,
|
|
211
|
+
default: void 0
|
|
212
|
+
},
|
|
213
|
+
placeholder: {
|
|
214
|
+
type: [String, Array],
|
|
215
|
+
required: false
|
|
216
216
|
}
|
|
217
217
|
},
|
|
218
218
|
name: "ProPureField",
|
|
@@ -17,6 +17,6 @@ declare const FieldColorPicker: _$vue.DefineSetupFnComponent<FieldColorPickerPro
|
|
|
17
17
|
mode?: "read" | "edit" | "update";
|
|
18
18
|
} & {
|
|
19
19
|
id?: string;
|
|
20
|
-
} & Partial<Omit<_$antdv_next_dist_color_picker_ColorPicker0.InternalColorPickerProps, "
|
|
20
|
+
} & Partial<Omit<_$antdv_next_dist_color_picker_ColorPicker0.InternalColorPickerProps, "mode" | "value">> & {}, _$vue.PublicProps>;
|
|
21
21
|
//#endregion
|
|
22
22
|
export { FieldColorPickerProps, FieldColorPicker as default };
|
|
@@ -22,14 +22,14 @@ type FieldDigitRangeProps = ProFieldFC<{
|
|
|
22
22
|
}>;
|
|
23
23
|
declare const FieldDigitRange: _$vue.DefineSetupFnComponent<FieldDigitRangeProps, {}, CustomSlotsType<{
|
|
24
24
|
default?: () => VueNode;
|
|
25
|
-
}>, _$_antdv_next1_pro_provider0.BaseProFieldFC<Omit<InputNumberProps, "
|
|
25
|
+
}>, _$_antdv_next1_pro_provider0.BaseProFieldFC<Omit<InputNumberProps, "placeholder" | "value" | "onChange" | "defaultValue"> & {
|
|
26
26
|
id?: string;
|
|
27
27
|
placeholder?: string[];
|
|
28
28
|
value?: ValuePair;
|
|
29
29
|
onChange?: (value?: ValuePair) => void;
|
|
30
30
|
defaultValue?: ValuePair;
|
|
31
31
|
intlProps?: Intl.NumberFormatOptions;
|
|
32
|
-
}> & _$_antdv_next1_pro_provider0.ProRenderFieldPropsType<Omit<InputNumberProps, "
|
|
32
|
+
}> & _$_antdv_next1_pro_provider0.ProRenderFieldPropsType<Omit<InputNumberProps, "placeholder" | "value" | "onChange" | "defaultValue"> & {
|
|
33
33
|
id?: string;
|
|
34
34
|
placeholder?: string[];
|
|
35
35
|
value?: ValuePair;
|
|
@@ -9,18 +9,13 @@ type KeyLabel = Partial<LabeledValue> & RequestOptionsType;
|
|
|
9
9
|
type DataValueType<T> = KeyLabel & T;
|
|
10
10
|
/** 可能单选,可能多选 */
|
|
11
11
|
type DataValuesType<T> = DataValueType<T> | DataValueType<T>[];
|
|
12
|
-
|
|
13
|
-
/** 防抖动时间 默认10 单位ms */
|
|
14
|
-
debounceTime?: number;
|
|
15
|
-
/** 自定义搜索方法, 返回搜索结果的 Promise */
|
|
12
|
+
type SearchSelectProps<T = Record<string, any>> = Omit<SelectProps, 'options' | 'searchValue'> & {
|
|
13
|
+
/** 防抖动时间 默认10 单位ms */debounceTime?: number; /** 自定义搜索方法, 返回搜索结果的 Promise */
|
|
16
14
|
request?: (params: {
|
|
17
15
|
query: string;
|
|
18
|
-
}) => Promise<DataValueType<T>[]>;
|
|
19
|
-
/**
|
|
20
|
-
|
|
21
|
-
/** 指定组件中的值 */
|
|
22
|
-
value?: KeyLabel | KeyLabel[];
|
|
23
|
-
/** 指定默认选中的条目 */
|
|
16
|
+
}) => Promise<DataValueType<T>[]>; /** 自定义选项渲染 */
|
|
17
|
+
optionItemRender?: (item: DataValueType<T>) => VueNode; /** 指定组件中的值 */
|
|
18
|
+
value?: KeyLabel | KeyLabel[]; /** 指定默认选中的条目 */
|
|
24
19
|
defaultValue?: KeyLabel | KeyLabel[];
|
|
25
20
|
options?: RequestOptionsType[];
|
|
26
21
|
/**
|
|
@@ -46,18 +41,15 @@ interface SearchSelectProps<T = Record<string, any>> extends Omit<SelectProps, '
|
|
|
46
41
|
*
|
|
47
42
|
* @ignore
|
|
48
43
|
*/
|
|
49
|
-
prefixCls?: string;
|
|
50
|
-
/**
|
|
51
|
-
fetchData: (keyWord?: string) => void;
|
|
52
|
-
/** 清空数据 */
|
|
44
|
+
prefixCls?: string; /** 刷新数据 */
|
|
45
|
+
fetchData: (keyWord?: string) => void; /** 清空数据 */
|
|
53
46
|
resetData: () => void;
|
|
54
47
|
/**
|
|
55
48
|
* 当搜索关键词发生变化时是否请求远程数据
|
|
56
49
|
*
|
|
57
50
|
* @default true
|
|
58
51
|
*/
|
|
59
|
-
fetchDataOnSearch?: boolean;
|
|
60
|
-
/** 默认搜索关键词 */
|
|
52
|
+
fetchDataOnSearch?: boolean; /** 默认搜索关键词 */
|
|
61
53
|
defaultSearchValue?: string;
|
|
62
54
|
/**
|
|
63
55
|
* 在选择时保留选项的原始标签文本
|
|
@@ -65,14 +57,158 @@ interface SearchSelectProps<T = Record<string, any>> extends Omit<SelectProps, '
|
|
|
65
57
|
* @default false
|
|
66
58
|
*/
|
|
67
59
|
preserveOriginalLabel?: boolean;
|
|
68
|
-
}
|
|
69
|
-
declare const SearchSelect: new <T extends Record<string, any>>(props:
|
|
60
|
+
};
|
|
61
|
+
declare const SearchSelect: new <T extends Record<string, any>>(props: Omit<SelectProps, "options" | "searchValue"> & {
|
|
62
|
+
/** 防抖动时间 默认10 单位ms */debounceTime?: number; /** 自定义搜索方法, 返回搜索结果的 Promise */
|
|
63
|
+
request?: ((params: {
|
|
64
|
+
query: string;
|
|
65
|
+
}) => Promise<DataValueType<T>[]>) | undefined; /** 自定义选项渲染 */
|
|
66
|
+
optionItemRender?: ((item: DataValueType<T>) => VueNode) | undefined; /** 指定组件中的值 */
|
|
67
|
+
value?: KeyLabel | KeyLabel[]; /** 指定默认选中的条目 */
|
|
68
|
+
defaultValue?: KeyLabel | KeyLabel[];
|
|
69
|
+
options?: RequestOptionsType[];
|
|
70
|
+
/**
|
|
71
|
+
* Placeholder 输入提示
|
|
72
|
+
*
|
|
73
|
+
* @default 请输入关键字搜索
|
|
74
|
+
*/
|
|
75
|
+
placeholder?: VueNode;
|
|
76
|
+
/**
|
|
77
|
+
* 是否在输入框聚焦时触发搜索
|
|
78
|
+
*
|
|
79
|
+
* @default false
|
|
80
|
+
*/
|
|
81
|
+
searchOnFocus?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* 选择完一个之后是否清空搜索项重新搜索
|
|
84
|
+
*
|
|
85
|
+
* @default false
|
|
86
|
+
*/
|
|
87
|
+
resetAfterSelect?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* 自定义前缀
|
|
90
|
+
*
|
|
91
|
+
* @ignore
|
|
92
|
+
*/
|
|
93
|
+
prefixCls?: string; /** 刷新数据 */
|
|
94
|
+
fetchData: (keyWord?: string) => void; /** 清空数据 */
|
|
95
|
+
resetData: () => void;
|
|
96
|
+
/**
|
|
97
|
+
* 当搜索关键词发生变化时是否请求远程数据
|
|
98
|
+
*
|
|
99
|
+
* @default true
|
|
100
|
+
*/
|
|
101
|
+
fetchDataOnSearch?: boolean; /** 默认搜索关键词 */
|
|
102
|
+
defaultSearchValue?: string;
|
|
103
|
+
/**
|
|
104
|
+
* 在选择时保留选项的原始标签文本
|
|
105
|
+
* 当设置为 true 时,选中后回填的内容将使用选项的原始 label,而不是经过 optionItemRender 处理后的内容
|
|
106
|
+
* @default false
|
|
107
|
+
*/
|
|
108
|
+
preserveOriginalLabel?: boolean;
|
|
109
|
+
} & {} & _$vue.VNodeProps & _$vue.AllowedComponentProps & _$vue.ComponentCustomProps) => _$vue.CreateComponentPublicInstanceWithMixins<Omit<SelectProps, "options" | "searchValue"> & {
|
|
110
|
+
/** 防抖动时间 默认10 单位ms */debounceTime?: number; /** 自定义搜索方法, 返回搜索结果的 Promise */
|
|
111
|
+
request?: ((params: {
|
|
112
|
+
query: string;
|
|
113
|
+
}) => Promise<DataValueType<T>[]>) | undefined; /** 自定义选项渲染 */
|
|
114
|
+
optionItemRender?: ((item: DataValueType<T>) => VueNode) | undefined; /** 指定组件中的值 */
|
|
115
|
+
value?: KeyLabel | KeyLabel[]; /** 指定默认选中的条目 */
|
|
116
|
+
defaultValue?: KeyLabel | KeyLabel[];
|
|
117
|
+
options?: RequestOptionsType[];
|
|
118
|
+
/**
|
|
119
|
+
* Placeholder 输入提示
|
|
120
|
+
*
|
|
121
|
+
* @default 请输入关键字搜索
|
|
122
|
+
*/
|
|
123
|
+
placeholder?: VueNode;
|
|
124
|
+
/**
|
|
125
|
+
* 是否在输入框聚焦时触发搜索
|
|
126
|
+
*
|
|
127
|
+
* @default false
|
|
128
|
+
*/
|
|
129
|
+
searchOnFocus?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* 选择完一个之后是否清空搜索项重新搜索
|
|
132
|
+
*
|
|
133
|
+
* @default false
|
|
134
|
+
*/
|
|
135
|
+
resetAfterSelect?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* 自定义前缀
|
|
138
|
+
*
|
|
139
|
+
* @ignore
|
|
140
|
+
*/
|
|
141
|
+
prefixCls?: string; /** 刷新数据 */
|
|
142
|
+
fetchData: (keyWord?: string) => void; /** 清空数据 */
|
|
143
|
+
resetData: () => void;
|
|
144
|
+
/**
|
|
145
|
+
* 当搜索关键词发生变化时是否请求远程数据
|
|
146
|
+
*
|
|
147
|
+
* @default true
|
|
148
|
+
*/
|
|
149
|
+
fetchDataOnSearch?: boolean; /** 默认搜索关键词 */
|
|
150
|
+
defaultSearchValue?: string;
|
|
151
|
+
/**
|
|
152
|
+
* 在选择时保留选项的原始标签文本
|
|
153
|
+
* 当设置为 true 时,选中后回填的内容将使用选项的原始 label,而不是经过 optionItemRender 处理后的内容
|
|
154
|
+
* @default false
|
|
155
|
+
*/
|
|
156
|
+
preserveOriginalLabel?: boolean;
|
|
157
|
+
} & {}, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, _$vue.PublicProps, {}, false, {}, {}, {}, {}, string, {}, any, _$vue.ComponentProvideOptions, {
|
|
70
158
|
P: {};
|
|
71
159
|
B: {};
|
|
72
160
|
D: {};
|
|
73
161
|
C: {};
|
|
74
162
|
M: {};
|
|
75
163
|
Defaults: {};
|
|
76
|
-
},
|
|
164
|
+
}, Omit<SelectProps, "options" | "searchValue"> & {
|
|
165
|
+
/** 防抖动时间 默认10 单位ms */debounceTime?: number; /** 自定义搜索方法, 返回搜索结果的 Promise */
|
|
166
|
+
request?: ((params: {
|
|
167
|
+
query: string;
|
|
168
|
+
}) => Promise<DataValueType<T>[]>) | undefined; /** 自定义选项渲染 */
|
|
169
|
+
optionItemRender?: ((item: DataValueType<T>) => VueNode) | undefined; /** 指定组件中的值 */
|
|
170
|
+
value?: KeyLabel | KeyLabel[]; /** 指定默认选中的条目 */
|
|
171
|
+
defaultValue?: KeyLabel | KeyLabel[];
|
|
172
|
+
options?: RequestOptionsType[];
|
|
173
|
+
/**
|
|
174
|
+
* Placeholder 输入提示
|
|
175
|
+
*
|
|
176
|
+
* @default 请输入关键字搜索
|
|
177
|
+
*/
|
|
178
|
+
placeholder?: VueNode;
|
|
179
|
+
/**
|
|
180
|
+
* 是否在输入框聚焦时触发搜索
|
|
181
|
+
*
|
|
182
|
+
* @default false
|
|
183
|
+
*/
|
|
184
|
+
searchOnFocus?: boolean;
|
|
185
|
+
/**
|
|
186
|
+
* 选择完一个之后是否清空搜索项重新搜索
|
|
187
|
+
*
|
|
188
|
+
* @default false
|
|
189
|
+
*/
|
|
190
|
+
resetAfterSelect?: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* 自定义前缀
|
|
193
|
+
*
|
|
194
|
+
* @ignore
|
|
195
|
+
*/
|
|
196
|
+
prefixCls?: string; /** 刷新数据 */
|
|
197
|
+
fetchData: (keyWord?: string) => void; /** 清空数据 */
|
|
198
|
+
resetData: () => void;
|
|
199
|
+
/**
|
|
200
|
+
* 当搜索关键词发生变化时是否请求远程数据
|
|
201
|
+
*
|
|
202
|
+
* @default true
|
|
203
|
+
*/
|
|
204
|
+
fetchDataOnSearch?: boolean; /** 默认搜索关键词 */
|
|
205
|
+
defaultSearchValue?: string;
|
|
206
|
+
/**
|
|
207
|
+
* 在选择时保留选项的原始标签文本
|
|
208
|
+
* 当设置为 true 时,选中后回填的内容将使用选项的原始 label,而不是经过 optionItemRender 处理后的内容
|
|
209
|
+
* @default false
|
|
210
|
+
*/
|
|
211
|
+
preserveOriginalLabel?: boolean;
|
|
212
|
+
} & {}, {}, {}, {}, {}, {}>;
|
|
77
213
|
//#endregion
|
|
78
214
|
export { DataValueType, DataValuesType, KeyLabel, SearchSelectProps, SearchSelect as default };
|