@v-c/cascader 0.0.1
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/LICENSE +21 -0
- package/dist/Cascader.cjs +647 -0
- package/dist/Cascader.d.ts +90 -0
- package/dist/Cascader.js +639 -0
- package/dist/OptionList/CacheContent.cjs +38 -0
- package/dist/OptionList/CacheContent.d.ts +7 -0
- package/dist/OptionList/CacheContent.js +32 -0
- package/dist/OptionList/Checkbox.cjs +75 -0
- package/dist/OptionList/Checkbox.d.ts +12 -0
- package/dist/OptionList/Checkbox.js +69 -0
- package/dist/OptionList/Column.cjs +223 -0
- package/dist/OptionList/Column.d.ts +23 -0
- package/dist/OptionList/Column.js +215 -0
- package/dist/OptionList/List.cjs +195 -0
- package/dist/OptionList/List.d.ts +12 -0
- package/dist/OptionList/List.js +189 -0
- package/dist/OptionList/index.cjs +24 -0
- package/dist/OptionList/index.d.ts +2 -0
- package/dist/OptionList/index.js +18 -0
- package/dist/OptionList/useActive.cjs +19 -0
- package/dist/OptionList/useActive.d.ts +7 -0
- package/dist/OptionList/useActive.js +14 -0
- package/dist/OptionList/useKeyboard.cjs +108 -0
- package/dist/OptionList/useKeyboard.d.ts +9 -0
- package/dist/OptionList/useKeyboard.js +102 -0
- package/dist/Panel.cjs +209 -0
- package/dist/Panel.d.ts +5 -0
- package/dist/Panel.js +202 -0
- package/dist/_virtual/rolldown_runtime.cjs +21 -0
- package/dist/context.cjs +12 -0
- package/dist/context.d.ts +23 -0
- package/dist/context.js +9 -0
- package/dist/hooks/useDisplayValues.cjs +39 -0
- package/dist/hooks/useDisplayValues.d.ts +4 -0
- package/dist/hooks/useDisplayValues.js +34 -0
- package/dist/hooks/useEntities.cjs +41 -0
- package/dist/hooks/useEntities.d.ts +10 -0
- package/dist/hooks/useEntities.js +36 -0
- package/dist/hooks/useMissingValues.cjs +17 -0
- package/dist/hooks/useMissingValues.d.ts +4 -0
- package/dist/hooks/useMissingValues.js +13 -0
- package/dist/hooks/useOptions.cjs +25 -0
- package/dist/hooks/useOptions.d.ts +9 -0
- package/dist/hooks/useOptions.js +20 -0
- package/dist/hooks/useSearchConfig.cjs +34 -0
- package/dist/hooks/useSearchConfig.d.ts +4 -0
- package/dist/hooks/useSearchConfig.js +29 -0
- package/dist/hooks/useSearchOptions.cjs +46 -0
- package/dist/hooks/useSearchOptions.d.ts +5 -0
- package/dist/hooks/useSearchOptions.js +40 -0
- package/dist/hooks/useSelect.cjs +36 -0
- package/dist/hooks/useSelect.d.ts +4 -0
- package/dist/hooks/useSelect.js +31 -0
- package/dist/hooks/useValues.cjs +25 -0
- package/dist/hooks/useValues.d.ts +9 -0
- package/dist/hooks/useValues.js +20 -0
- package/dist/index.cjs +16 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +9 -0
- package/dist/utils/commonUtil.cjs +56 -0
- package/dist/utils/commonUtil.d.ts +18 -0
- package/dist/utils/commonUtil.js +45 -0
- package/dist/utils/treeUtil.cjs +34 -0
- package/dist/utils/treeUtil.d.ts +8 -0
- package/dist/utils/treeUtil.js +32 -0
- package/dist/utils/warningPropsUtil.cjs +19 -0
- package/dist/utils/warningPropsUtil.d.ts +2 -0
- package/dist/utils/warningPropsUtil.js +17 -0
- package/package.json +38 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 antdv-community
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,647 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_rolldown_runtime = require("./_virtual/rolldown_runtime.cjs");
|
|
6
|
+
const require_context = require("./context.cjs");
|
|
7
|
+
const require_useSearchOptions = require("./hooks/useSearchOptions.cjs");
|
|
8
|
+
const require_commonUtil = require("./utils/commonUtil.cjs");
|
|
9
|
+
const require_treeUtil = require("./utils/treeUtil.cjs");
|
|
10
|
+
const require_useDisplayValues = require("./hooks/useDisplayValues.cjs");
|
|
11
|
+
const require_useMissingValues = require("./hooks/useMissingValues.cjs");
|
|
12
|
+
const require_useOptions = require("./hooks/useOptions.cjs");
|
|
13
|
+
const require_useSearchConfig = require("./hooks/useSearchConfig.cjs");
|
|
14
|
+
const require_useSelect = require("./hooks/useSelect.cjs");
|
|
15
|
+
const require_useValues = require("./hooks/useValues.cjs");
|
|
16
|
+
const require_index = require("./OptionList/index.cjs");
|
|
17
|
+
const require_warningPropsUtil = require("./utils/warningPropsUtil.cjs");
|
|
18
|
+
let vue = require("vue");
|
|
19
|
+
let _v_c_select = require("@v-c/select");
|
|
20
|
+
let _v_c_util = require("@v-c/util");
|
|
21
|
+
let _v_c_util_dist_hooks_useEvent = require("@v-c/util/dist/hooks/useEvent");
|
|
22
|
+
_v_c_util_dist_hooks_useEvent = require_rolldown_runtime.__toESM(_v_c_util_dist_hooks_useEvent);
|
|
23
|
+
let _v_c_util_dist_omit = require("@v-c/util/dist/omit");
|
|
24
|
+
_v_c_util_dist_omit = require_rolldown_runtime.__toESM(_v_c_util_dist_omit);
|
|
25
|
+
var cascaderDefaults = {
|
|
26
|
+
prefixCls: "vc-cascader",
|
|
27
|
+
expandIcon: ">",
|
|
28
|
+
showCheckedStrategy: require_commonUtil.SHOW_PARENT,
|
|
29
|
+
popupMatchSelectWidth: false
|
|
30
|
+
};
|
|
31
|
+
var omitKeyList = [
|
|
32
|
+
"id",
|
|
33
|
+
"prefixCls",
|
|
34
|
+
"fieldNames",
|
|
35
|
+
"optionRender",
|
|
36
|
+
"value",
|
|
37
|
+
"defaultValue",
|
|
38
|
+
"onChange",
|
|
39
|
+
"changeOnSelect",
|
|
40
|
+
"displayRender",
|
|
41
|
+
"checkable",
|
|
42
|
+
"showCheckedStrategy",
|
|
43
|
+
"showSearch",
|
|
44
|
+
"searchValue",
|
|
45
|
+
"onSearch",
|
|
46
|
+
"autoClearSearchValue",
|
|
47
|
+
"expandTrigger",
|
|
48
|
+
"options",
|
|
49
|
+
"popupPrefixCls",
|
|
50
|
+
"loadData",
|
|
51
|
+
"popupMenuColumnStyle",
|
|
52
|
+
"popupClassName",
|
|
53
|
+
"popupStyle",
|
|
54
|
+
"open",
|
|
55
|
+
"placement",
|
|
56
|
+
"builtinPlacements",
|
|
57
|
+
"onPopupVisibleChange",
|
|
58
|
+
"popupMatchSelectWidth",
|
|
59
|
+
"expandIcon",
|
|
60
|
+
"loadingIcon",
|
|
61
|
+
"classNames",
|
|
62
|
+
"styles"
|
|
63
|
+
];
|
|
64
|
+
var Cascader = /* @__PURE__ */ (0, vue.defineComponent)((props, { attrs, slots, expose }) => {
|
|
65
|
+
const baseSelectRef = (0, vue.shallowRef)(null);
|
|
66
|
+
expose({
|
|
67
|
+
focus: (options) => baseSelectRef.value?.focus(options),
|
|
68
|
+
blur: () => baseSelectRef.value?.blur(),
|
|
69
|
+
nativeElement: (0, vue.computed)(() => baseSelectRef.value?.nativeElement)
|
|
70
|
+
});
|
|
71
|
+
const mergedId = (0, _v_c_util.useId)(props.id);
|
|
72
|
+
const multiple = (0, vue.computed)(() => !!props.checkable);
|
|
73
|
+
const internalRawValues = (0, vue.shallowRef)(props?.value ?? props?.defaultValue);
|
|
74
|
+
(0, vue.watch)(() => props.value, () => {
|
|
75
|
+
internalRawValues.value = props?.value;
|
|
76
|
+
});
|
|
77
|
+
const setRawValues = (values) => {
|
|
78
|
+
internalRawValues.value = values;
|
|
79
|
+
};
|
|
80
|
+
const rawValues = (0, vue.computed)(() => require_commonUtil.toRawValues(internalRawValues.value));
|
|
81
|
+
const mergedFieldNames = (0, vue.computed)(() => require_commonUtil.fillFieldNames(props.fieldNames));
|
|
82
|
+
const [mergedOptions, getPathKeyEntities, getValueByKeyPath] = require_useOptions.default(mergedFieldNames, (0, vue.computed)(() => props.options));
|
|
83
|
+
const [mergedShowSearch, searchConfig] = require_useSearchConfig.default((0, vue.computed)(() => props.showSearch), (0, vue.computed)(() => ({
|
|
84
|
+
autoClearSearchValue: props.autoClearSearchValue,
|
|
85
|
+
searchValue: props.searchValue,
|
|
86
|
+
onSearch: props.onSearch
|
|
87
|
+
})));
|
|
88
|
+
const mergedAutoClearSearchValue = (0, vue.computed)(() => searchConfig.value.autoClearSearchValue !== false);
|
|
89
|
+
const mergedShowCheckedStrategy = (0, vue.computed)(() => props.showCheckedStrategy ?? cascaderDefaults.showCheckedStrategy);
|
|
90
|
+
const [internalSearchValue, setSearchValue] = (0, _v_c_util.useMergedState)("", { value: (0, vue.computed)(() => searchConfig.value.searchValue) });
|
|
91
|
+
const mergedSearchValue = (0, vue.computed)(() => internalSearchValue.value || "");
|
|
92
|
+
const onInternalSearch = (searchText, info) => {
|
|
93
|
+
setSearchValue(searchText);
|
|
94
|
+
if (info.source !== "blur") searchConfig.value.onSearch?.(searchText);
|
|
95
|
+
};
|
|
96
|
+
const searchOptions = require_useSearchOptions.default(mergedSearchValue, mergedOptions, mergedFieldNames, (0, vue.computed)(() => props.popupPrefixCls || props.prefixCls || cascaderDefaults.prefixCls), searchConfig, (0, vue.computed)(() => !!props.changeOnSelect || multiple.value));
|
|
97
|
+
const valuesInfo = require_useValues.default(multiple, rawValues, getPathKeyEntities, getValueByKeyPath, require_useMissingValues.default(mergedOptions, mergedFieldNames));
|
|
98
|
+
const checkedValues = (0, vue.computed)(() => valuesInfo.value[0]);
|
|
99
|
+
const halfCheckedValues = (0, vue.computed)(() => valuesInfo.value[1]);
|
|
100
|
+
const missingCheckedValues = (0, vue.computed)(() => valuesInfo.value[2]);
|
|
101
|
+
const displayValues = require_useDisplayValues.default((0, vue.computed)(() => {
|
|
102
|
+
const deduplicateKeys = require_treeUtil.formatStrategyValues(require_commonUtil.toPathKeys(checkedValues.value), getPathKeyEntities, mergedShowCheckedStrategy.value);
|
|
103
|
+
return [...missingCheckedValues.value, ...getValueByKeyPath(deduplicateKeys)];
|
|
104
|
+
}), mergedOptions, mergedFieldNames, multiple, (0, vue.computed)(() => props.displayRender));
|
|
105
|
+
const triggerChange = (0, _v_c_util_dist_hooks_useEvent.default)((nextValues) => {
|
|
106
|
+
setRawValues(nextValues);
|
|
107
|
+
if (props.onChange) {
|
|
108
|
+
const nextRawValues = require_commonUtil.toRawValues(nextValues);
|
|
109
|
+
const valueOptions = nextRawValues.map((valueCells) => require_treeUtil.toPathOptions(valueCells, mergedOptions.value, mergedFieldNames.value).map((valueOpt) => valueOpt.option));
|
|
110
|
+
const triggerValues = multiple.value ? nextRawValues : nextRawValues[0];
|
|
111
|
+
const triggerOptions = multiple.value ? valueOptions : valueOptions[0];
|
|
112
|
+
props.onChange(triggerValues, triggerOptions);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
const handleSelection = require_useSelect.default(multiple, triggerChange, checkedValues, halfCheckedValues, missingCheckedValues, getPathKeyEntities, getValueByKeyPath, mergedShowCheckedStrategy);
|
|
116
|
+
const onInternalSelect = (0, _v_c_util_dist_hooks_useEvent.default)((valuePath) => {
|
|
117
|
+
if (!multiple.value || mergedAutoClearSearchValue.value) setSearchValue("");
|
|
118
|
+
handleSelection(valuePath);
|
|
119
|
+
});
|
|
120
|
+
const onDisplayValuesChange = (_, info) => {
|
|
121
|
+
if (info.type === "clear") {
|
|
122
|
+
triggerChange([]);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
const { valueCells } = info.values[0];
|
|
126
|
+
onInternalSelect(valueCells);
|
|
127
|
+
};
|
|
128
|
+
const onInternalPopupVisibleChange = (nextVisible) => {
|
|
129
|
+
props.onPopupVisibleChange?.(nextVisible);
|
|
130
|
+
};
|
|
131
|
+
if (process.env.NODE_ENV !== "production") require_warningPropsUtil.warningNullOptions(mergedOptions.value, mergedFieldNames.value);
|
|
132
|
+
require_context.useCascaderProvider((0, vue.computed)(() => ({
|
|
133
|
+
classNames: props.classNames,
|
|
134
|
+
styles: props.styles,
|
|
135
|
+
options: mergedOptions.value,
|
|
136
|
+
fieldNames: mergedFieldNames.value,
|
|
137
|
+
values: checkedValues.value,
|
|
138
|
+
halfValues: halfCheckedValues.value,
|
|
139
|
+
changeOnSelect: props.changeOnSelect,
|
|
140
|
+
onSelect: onInternalSelect,
|
|
141
|
+
checkable: props.checkable,
|
|
142
|
+
searchOptions: searchOptions.value,
|
|
143
|
+
popupPrefixCls: props.popupPrefixCls,
|
|
144
|
+
loadData: props.loadData,
|
|
145
|
+
expandTrigger: props.expandTrigger,
|
|
146
|
+
expandIcon: props.expandIcon !== void 0 ? props.expandIcon : cascaderDefaults.expandIcon,
|
|
147
|
+
loadingIcon: props.loadingIcon,
|
|
148
|
+
popupMenuColumnStyle: props.popupMenuColumnStyle,
|
|
149
|
+
optionRender: props.optionRender
|
|
150
|
+
})));
|
|
151
|
+
const emptyOptions = (0, vue.computed)(() => {
|
|
152
|
+
return !(mergedSearchValue.value ? searchOptions.value : mergedOptions.value).length;
|
|
153
|
+
});
|
|
154
|
+
const popupStyle = (0, vue.computed)(() => mergedSearchValue.value && searchConfig.value.matchInputWidth || emptyOptions.value ? {} : { minWidth: "auto" });
|
|
155
|
+
return () => {
|
|
156
|
+
const restProps = (0, _v_c_util_dist_omit.default)(props, omitKeyList);
|
|
157
|
+
const rawInputElement = slots.default ? () => slots.default?.()[0] : void 0;
|
|
158
|
+
return (0, vue.createVNode)(_v_c_select.BaseSelect, (0, vue.mergeProps)(attrs, restProps, {
|
|
159
|
+
"ref": (el) => {
|
|
160
|
+
baseSelectRef.value = el;
|
|
161
|
+
},
|
|
162
|
+
"id": mergedId,
|
|
163
|
+
"prefixCls": props.prefixCls ?? cascaderDefaults.prefixCls,
|
|
164
|
+
"autoClearSearchValue": mergedAutoClearSearchValue.value,
|
|
165
|
+
"popupMatchSelectWidth": props.popupMatchSelectWidth ?? cascaderDefaults.popupMatchSelectWidth,
|
|
166
|
+
"classNames": props.classNames,
|
|
167
|
+
"styles": props.styles,
|
|
168
|
+
"popupStyle": {
|
|
169
|
+
...popupStyle.value,
|
|
170
|
+
...props.popupStyle
|
|
171
|
+
},
|
|
172
|
+
"displayValues": displayValues.value,
|
|
173
|
+
"onDisplayValuesChange": onDisplayValuesChange,
|
|
174
|
+
"mode": multiple.value ? "multiple" : void 0,
|
|
175
|
+
"searchValue": mergedSearchValue.value,
|
|
176
|
+
"onSearch": onInternalSearch,
|
|
177
|
+
"showSearch": mergedShowSearch.value,
|
|
178
|
+
"OptionList": require_index.default,
|
|
179
|
+
"emptyOptions": emptyOptions.value,
|
|
180
|
+
"open": props.open,
|
|
181
|
+
"popupClassName": props.popupClassName,
|
|
182
|
+
"placement": props.placement,
|
|
183
|
+
"builtinPlacements": props.builtinPlacements,
|
|
184
|
+
"onPopupVisibleChange": onInternalPopupVisibleChange,
|
|
185
|
+
"getRawInputElement": rawInputElement
|
|
186
|
+
}), null);
|
|
187
|
+
};
|
|
188
|
+
}, { props: /* @__PURE__ */ (0, vue.mergeDefaults)({
|
|
189
|
+
styles: {
|
|
190
|
+
type: Object,
|
|
191
|
+
required: false,
|
|
192
|
+
default: void 0
|
|
193
|
+
},
|
|
194
|
+
classNames: {
|
|
195
|
+
type: Object,
|
|
196
|
+
required: false,
|
|
197
|
+
default: void 0
|
|
198
|
+
},
|
|
199
|
+
checkable: {
|
|
200
|
+
required: false,
|
|
201
|
+
default: void 0
|
|
202
|
+
},
|
|
203
|
+
value: {
|
|
204
|
+
required: false,
|
|
205
|
+
default: void 0
|
|
206
|
+
},
|
|
207
|
+
defaultValue: {
|
|
208
|
+
required: false,
|
|
209
|
+
default: void 0
|
|
210
|
+
},
|
|
211
|
+
onChange: {
|
|
212
|
+
type: Function,
|
|
213
|
+
required: false,
|
|
214
|
+
default: void 0
|
|
215
|
+
},
|
|
216
|
+
id: {
|
|
217
|
+
type: String,
|
|
218
|
+
required: false,
|
|
219
|
+
default: void 0
|
|
220
|
+
},
|
|
221
|
+
prefixCls: {
|
|
222
|
+
type: String,
|
|
223
|
+
required: false,
|
|
224
|
+
default: void 0
|
|
225
|
+
},
|
|
226
|
+
fieldNames: {
|
|
227
|
+
type: Object,
|
|
228
|
+
required: false,
|
|
229
|
+
default: void 0
|
|
230
|
+
},
|
|
231
|
+
optionRender: {
|
|
232
|
+
type: Function,
|
|
233
|
+
required: false,
|
|
234
|
+
default: void 0
|
|
235
|
+
},
|
|
236
|
+
changeOnSelect: {
|
|
237
|
+
type: Boolean,
|
|
238
|
+
required: false,
|
|
239
|
+
default: void 0
|
|
240
|
+
},
|
|
241
|
+
displayRender: {
|
|
242
|
+
type: Function,
|
|
243
|
+
required: false,
|
|
244
|
+
default: void 0
|
|
245
|
+
},
|
|
246
|
+
showCheckedStrategy: {
|
|
247
|
+
required: false,
|
|
248
|
+
default: void 0
|
|
249
|
+
},
|
|
250
|
+
autoClearSearchValue: {
|
|
251
|
+
type: Boolean,
|
|
252
|
+
required: false,
|
|
253
|
+
default: void 0
|
|
254
|
+
},
|
|
255
|
+
showSearch: {
|
|
256
|
+
type: [Boolean, Object],
|
|
257
|
+
required: false,
|
|
258
|
+
default: void 0
|
|
259
|
+
},
|
|
260
|
+
searchValue: {
|
|
261
|
+
type: String,
|
|
262
|
+
required: false,
|
|
263
|
+
default: void 0
|
|
264
|
+
},
|
|
265
|
+
onSearch: {
|
|
266
|
+
type: Function,
|
|
267
|
+
required: false,
|
|
268
|
+
default: void 0
|
|
269
|
+
},
|
|
270
|
+
expandTrigger: {
|
|
271
|
+
type: String,
|
|
272
|
+
required: false,
|
|
273
|
+
default: void 0
|
|
274
|
+
},
|
|
275
|
+
options: {
|
|
276
|
+
type: Array,
|
|
277
|
+
required: false,
|
|
278
|
+
default: void 0
|
|
279
|
+
},
|
|
280
|
+
popupPrefixCls: {
|
|
281
|
+
type: String,
|
|
282
|
+
required: false,
|
|
283
|
+
default: void 0
|
|
284
|
+
},
|
|
285
|
+
loadData: {
|
|
286
|
+
type: Function,
|
|
287
|
+
required: false,
|
|
288
|
+
default: void 0
|
|
289
|
+
},
|
|
290
|
+
popupClassName: {
|
|
291
|
+
type: String,
|
|
292
|
+
required: false,
|
|
293
|
+
default: void 0
|
|
294
|
+
},
|
|
295
|
+
popupMenuColumnStyle: {
|
|
296
|
+
type: Object,
|
|
297
|
+
required: false,
|
|
298
|
+
default: void 0
|
|
299
|
+
},
|
|
300
|
+
placement: {
|
|
301
|
+
type: String,
|
|
302
|
+
required: false,
|
|
303
|
+
default: void 0
|
|
304
|
+
},
|
|
305
|
+
builtinPlacements: {
|
|
306
|
+
type: Object,
|
|
307
|
+
required: false,
|
|
308
|
+
default: void 0
|
|
309
|
+
},
|
|
310
|
+
onPopupVisibleChange: {
|
|
311
|
+
type: Function,
|
|
312
|
+
required: false,
|
|
313
|
+
default: void 0
|
|
314
|
+
},
|
|
315
|
+
expandIcon: {
|
|
316
|
+
type: [
|
|
317
|
+
Object,
|
|
318
|
+
Function,
|
|
319
|
+
String,
|
|
320
|
+
Number,
|
|
321
|
+
null,
|
|
322
|
+
Boolean,
|
|
323
|
+
Array
|
|
324
|
+
],
|
|
325
|
+
required: false,
|
|
326
|
+
default: void 0
|
|
327
|
+
},
|
|
328
|
+
loadingIcon: {
|
|
329
|
+
type: [
|
|
330
|
+
Object,
|
|
331
|
+
Function,
|
|
332
|
+
String,
|
|
333
|
+
Number,
|
|
334
|
+
null,
|
|
335
|
+
Boolean,
|
|
336
|
+
Array
|
|
337
|
+
],
|
|
338
|
+
required: false,
|
|
339
|
+
default: void 0
|
|
340
|
+
},
|
|
341
|
+
className: {
|
|
342
|
+
type: String,
|
|
343
|
+
required: false,
|
|
344
|
+
default: void 0
|
|
345
|
+
},
|
|
346
|
+
style: {
|
|
347
|
+
type: Object,
|
|
348
|
+
required: false,
|
|
349
|
+
default: void 0
|
|
350
|
+
},
|
|
351
|
+
tagRender: {
|
|
352
|
+
type: Function,
|
|
353
|
+
required: false,
|
|
354
|
+
default: void 0
|
|
355
|
+
},
|
|
356
|
+
direction: {
|
|
357
|
+
type: String,
|
|
358
|
+
required: false,
|
|
359
|
+
default: void 0
|
|
360
|
+
},
|
|
361
|
+
autoFocus: {
|
|
362
|
+
type: Boolean,
|
|
363
|
+
required: false,
|
|
364
|
+
default: void 0
|
|
365
|
+
},
|
|
366
|
+
placeholder: {
|
|
367
|
+
type: [
|
|
368
|
+
Object,
|
|
369
|
+
Function,
|
|
370
|
+
String,
|
|
371
|
+
Number,
|
|
372
|
+
null,
|
|
373
|
+
Boolean,
|
|
374
|
+
Array
|
|
375
|
+
],
|
|
376
|
+
required: false,
|
|
377
|
+
default: void 0
|
|
378
|
+
},
|
|
379
|
+
maxCount: {
|
|
380
|
+
type: Number,
|
|
381
|
+
required: false,
|
|
382
|
+
default: void 0
|
|
383
|
+
},
|
|
384
|
+
title: {
|
|
385
|
+
type: String,
|
|
386
|
+
required: false,
|
|
387
|
+
default: void 0
|
|
388
|
+
},
|
|
389
|
+
tabIndex: {
|
|
390
|
+
type: Number,
|
|
391
|
+
required: false,
|
|
392
|
+
default: void 0
|
|
393
|
+
},
|
|
394
|
+
notFoundContent: {
|
|
395
|
+
type: [
|
|
396
|
+
Object,
|
|
397
|
+
Function,
|
|
398
|
+
String,
|
|
399
|
+
Number,
|
|
400
|
+
null,
|
|
401
|
+
Boolean,
|
|
402
|
+
Array
|
|
403
|
+
],
|
|
404
|
+
required: false,
|
|
405
|
+
default: void 0
|
|
406
|
+
},
|
|
407
|
+
onClear: {
|
|
408
|
+
type: Function,
|
|
409
|
+
required: false,
|
|
410
|
+
default: void 0
|
|
411
|
+
},
|
|
412
|
+
maxLength: {
|
|
413
|
+
type: Number,
|
|
414
|
+
required: false,
|
|
415
|
+
default: void 0
|
|
416
|
+
},
|
|
417
|
+
showScrollBar: {
|
|
418
|
+
type: [Boolean, String],
|
|
419
|
+
required: false,
|
|
420
|
+
default: void 0
|
|
421
|
+
},
|
|
422
|
+
choiceTransitionName: {
|
|
423
|
+
type: String,
|
|
424
|
+
required: false,
|
|
425
|
+
default: void 0
|
|
426
|
+
},
|
|
427
|
+
disabled: {
|
|
428
|
+
type: Boolean,
|
|
429
|
+
required: false,
|
|
430
|
+
default: void 0
|
|
431
|
+
},
|
|
432
|
+
loading: {
|
|
433
|
+
type: Boolean,
|
|
434
|
+
required: false,
|
|
435
|
+
default: void 0
|
|
436
|
+
},
|
|
437
|
+
open: {
|
|
438
|
+
type: Boolean,
|
|
439
|
+
required: false,
|
|
440
|
+
default: void 0
|
|
441
|
+
},
|
|
442
|
+
defaultOpen: {
|
|
443
|
+
type: Boolean,
|
|
444
|
+
required: false,
|
|
445
|
+
default: void 0
|
|
446
|
+
},
|
|
447
|
+
getInputElement: {
|
|
448
|
+
type: Function,
|
|
449
|
+
required: false,
|
|
450
|
+
default: void 0
|
|
451
|
+
},
|
|
452
|
+
getRawInputElement: {
|
|
453
|
+
type: Function,
|
|
454
|
+
required: false,
|
|
455
|
+
default: void 0
|
|
456
|
+
},
|
|
457
|
+
maxTagTextLength: {
|
|
458
|
+
type: Number,
|
|
459
|
+
required: false,
|
|
460
|
+
default: void 0
|
|
461
|
+
},
|
|
462
|
+
maxTagCount: {
|
|
463
|
+
type: [Number, String],
|
|
464
|
+
required: false,
|
|
465
|
+
default: void 0
|
|
466
|
+
},
|
|
467
|
+
maxTagPlaceholder: {
|
|
468
|
+
type: [
|
|
469
|
+
Object,
|
|
470
|
+
Function,
|
|
471
|
+
String,
|
|
472
|
+
Number,
|
|
473
|
+
null,
|
|
474
|
+
Boolean,
|
|
475
|
+
Array
|
|
476
|
+
],
|
|
477
|
+
required: false,
|
|
478
|
+
default: void 0
|
|
479
|
+
},
|
|
480
|
+
allowClear: {
|
|
481
|
+
type: [Boolean, Object],
|
|
482
|
+
required: false,
|
|
483
|
+
default: void 0
|
|
484
|
+
},
|
|
485
|
+
prefix: {
|
|
486
|
+
type: [
|
|
487
|
+
Object,
|
|
488
|
+
Function,
|
|
489
|
+
String,
|
|
490
|
+
Number,
|
|
491
|
+
null,
|
|
492
|
+
Boolean,
|
|
493
|
+
Array
|
|
494
|
+
],
|
|
495
|
+
required: false,
|
|
496
|
+
default: void 0
|
|
497
|
+
},
|
|
498
|
+
suffixIcon: {
|
|
499
|
+
type: [
|
|
500
|
+
Object,
|
|
501
|
+
Function,
|
|
502
|
+
String,
|
|
503
|
+
Number,
|
|
504
|
+
null,
|
|
505
|
+
Boolean,
|
|
506
|
+
Array
|
|
507
|
+
],
|
|
508
|
+
required: false,
|
|
509
|
+
default: void 0
|
|
510
|
+
},
|
|
511
|
+
suffix: {
|
|
512
|
+
type: [
|
|
513
|
+
Object,
|
|
514
|
+
Function,
|
|
515
|
+
String,
|
|
516
|
+
Number,
|
|
517
|
+
null,
|
|
518
|
+
Boolean,
|
|
519
|
+
Array
|
|
520
|
+
],
|
|
521
|
+
required: false,
|
|
522
|
+
default: void 0
|
|
523
|
+
},
|
|
524
|
+
clearIcon: {
|
|
525
|
+
type: [
|
|
526
|
+
Object,
|
|
527
|
+
Function,
|
|
528
|
+
String,
|
|
529
|
+
Number,
|
|
530
|
+
null,
|
|
531
|
+
Boolean,
|
|
532
|
+
Array
|
|
533
|
+
],
|
|
534
|
+
required: false,
|
|
535
|
+
default: void 0
|
|
536
|
+
},
|
|
537
|
+
removeIcon: {
|
|
538
|
+
type: [
|
|
539
|
+
Object,
|
|
540
|
+
Function,
|
|
541
|
+
String,
|
|
542
|
+
Number,
|
|
543
|
+
null,
|
|
544
|
+
Boolean,
|
|
545
|
+
Array
|
|
546
|
+
],
|
|
547
|
+
required: false,
|
|
548
|
+
default: void 0
|
|
549
|
+
},
|
|
550
|
+
animation: {
|
|
551
|
+
type: String,
|
|
552
|
+
required: false,
|
|
553
|
+
default: void 0
|
|
554
|
+
},
|
|
555
|
+
transitionName: {
|
|
556
|
+
type: String,
|
|
557
|
+
required: false,
|
|
558
|
+
default: void 0
|
|
559
|
+
},
|
|
560
|
+
popupStyle: {
|
|
561
|
+
type: Object,
|
|
562
|
+
required: false,
|
|
563
|
+
default: void 0
|
|
564
|
+
},
|
|
565
|
+
popupMatchSelectWidth: {
|
|
566
|
+
type: [Boolean, Number],
|
|
567
|
+
required: false,
|
|
568
|
+
default: void 0
|
|
569
|
+
},
|
|
570
|
+
popupRender: {
|
|
571
|
+
type: Function,
|
|
572
|
+
required: false,
|
|
573
|
+
default: void 0
|
|
574
|
+
},
|
|
575
|
+
popupAlign: {
|
|
576
|
+
type: Object,
|
|
577
|
+
required: false,
|
|
578
|
+
default: void 0
|
|
579
|
+
},
|
|
580
|
+
getPopupContainer: {
|
|
581
|
+
type: Function,
|
|
582
|
+
required: false,
|
|
583
|
+
default: void 0
|
|
584
|
+
},
|
|
585
|
+
showAction: {
|
|
586
|
+
type: Array,
|
|
587
|
+
required: false,
|
|
588
|
+
default: void 0
|
|
589
|
+
},
|
|
590
|
+
onBlur: {
|
|
591
|
+
type: Function,
|
|
592
|
+
required: false,
|
|
593
|
+
default: void 0
|
|
594
|
+
},
|
|
595
|
+
onFocus: {
|
|
596
|
+
type: Function,
|
|
597
|
+
required: false,
|
|
598
|
+
default: void 0
|
|
599
|
+
},
|
|
600
|
+
onKeyUp: {
|
|
601
|
+
type: Function,
|
|
602
|
+
required: false,
|
|
603
|
+
default: void 0
|
|
604
|
+
},
|
|
605
|
+
onKeyDown: {
|
|
606
|
+
type: Function,
|
|
607
|
+
required: false,
|
|
608
|
+
default: void 0
|
|
609
|
+
},
|
|
610
|
+
onMouseDown: {
|
|
611
|
+
type: Function,
|
|
612
|
+
required: false,
|
|
613
|
+
default: void 0
|
|
614
|
+
},
|
|
615
|
+
onPopupScroll: {
|
|
616
|
+
type: Function,
|
|
617
|
+
required: false,
|
|
618
|
+
default: void 0
|
|
619
|
+
},
|
|
620
|
+
onInputKeyDown: {
|
|
621
|
+
type: Function,
|
|
622
|
+
required: false,
|
|
623
|
+
default: void 0
|
|
624
|
+
},
|
|
625
|
+
onMouseEnter: {
|
|
626
|
+
type: Function,
|
|
627
|
+
required: false,
|
|
628
|
+
default: void 0
|
|
629
|
+
},
|
|
630
|
+
onMouseLeave: {
|
|
631
|
+
type: Function,
|
|
632
|
+
required: false,
|
|
633
|
+
default: void 0
|
|
634
|
+
},
|
|
635
|
+
onClick: {
|
|
636
|
+
type: Function,
|
|
637
|
+
required: false,
|
|
638
|
+
default: void 0
|
|
639
|
+
},
|
|
640
|
+
components: {
|
|
641
|
+
type: Object,
|
|
642
|
+
required: false,
|
|
643
|
+
default: void 0
|
|
644
|
+
}
|
|
645
|
+
}, cascaderDefaults) });
|
|
646
|
+
var Cascader_default = Cascader;
|
|
647
|
+
exports.default = Cascader_default;
|