@v-c/tree-select 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/LegacyContext.cjs +12 -0
- package/dist/LegacyContext.d.ts +25 -0
- package/dist/LegacyContext.js +9 -0
- package/dist/OptionList.cjs +230 -0
- package/dist/OptionList.d.ts +2 -0
- package/dist/OptionList.js +223 -0
- package/dist/TreeNode.cjs +11 -0
- package/dist/TreeNode.d.ts +7 -0
- package/dist/TreeNode.js +5 -0
- package/dist/TreeSelect.cjs +953 -0
- package/dist/TreeSelect.d.ts +76 -0
- package/dist/TreeSelect.js +947 -0
- package/dist/TreeSelectContext.cjs +12 -0
- package/dist/TreeSelectContext.d.ts +28 -0
- package/dist/TreeSelectContext.js +9 -0
- package/dist/_virtual/rolldown_runtime.cjs +21 -0
- package/dist/hooks/useCache.cjs +25 -0
- package/dist/hooks/useCache.d.ts +6 -0
- package/dist/hooks/useCache.js +20 -0
- package/dist/hooks/useCheckedKeys.cjs +25 -0
- package/dist/hooks/useCheckedKeys.d.ts +4 -0
- package/dist/hooks/useCheckedKeys.js +20 -0
- package/dist/hooks/useDataEntities.cjs +40 -0
- package/dist/hooks/useDataEntities.d.ts +7 -0
- package/dist/hooks/useDataEntities.js +35 -0
- package/dist/hooks/useFilterTreeData.cjs +28 -0
- package/dist/hooks/useFilterTreeData.d.ts +8 -0
- package/dist/hooks/useFilterTreeData.js +23 -0
- package/dist/hooks/useRefFunc.cjs +15 -0
- package/dist/hooks/useRefFunc.d.ts +5 -0
- package/dist/hooks/useRefFunc.js +10 -0
- package/dist/hooks/useSearchConfig.cjs +23 -0
- package/dist/hooks/useSearchConfig.d.ts +6 -0
- package/dist/hooks/useSearchConfig.js +18 -0
- package/dist/hooks/useTreeData.cjs +43 -0
- package/dist/hooks/useTreeData.d.ts +6 -0
- package/dist/hooks/useTreeData.js +38 -0
- package/dist/index.cjs +18 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +10 -0
- package/dist/interface.cjs +1 -0
- package/dist/interface.d.ts +57 -0
- package/dist/interface.js +0 -0
- package/dist/utils/legacyUtil.cjs +85 -0
- package/dist/utils/legacyUtil.d.ts +5 -0
- package/dist/utils/legacyUtil.js +80 -0
- package/dist/utils/strategyUtil.cjs +22 -0
- package/dist/utils/strategyUtil.d.ts +7 -0
- package/dist/utils/strategyUtil.js +18 -0
- package/dist/utils/valueUtil.cjs +36 -0
- package/dist/utils/valueUtil.d.ts +11 -0
- package/dist/utils/valueUtil.js +31 -0
- package/dist/utils/warningPropsUtil.cjs +18 -0
- package/dist/utils/warningPropsUtil.d.ts +4 -0
- package/dist/utils/warningPropsUtil.js +12 -0
- package/package.json +43 -0
|
@@ -0,0 +1,953 @@
|
|
|
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_LegacyContext = require("./LegacyContext.cjs");
|
|
7
|
+
const require_TreeSelectContext = require("./TreeSelectContext.cjs");
|
|
8
|
+
const require_valueUtil = require("./utils/valueUtil.cjs");
|
|
9
|
+
const require_OptionList = require("./OptionList.cjs");
|
|
10
|
+
const require_useCache = require("./hooks/useCache.cjs");
|
|
11
|
+
const require_useCheckedKeys = require("./hooks/useCheckedKeys.cjs");
|
|
12
|
+
const require_useDataEntities = require("./hooks/useDataEntities.cjs");
|
|
13
|
+
const require_legacyUtil = require("./utils/legacyUtil.cjs");
|
|
14
|
+
const require_useFilterTreeData = require("./hooks/useFilterTreeData.cjs");
|
|
15
|
+
const require_useRefFunc = require("./hooks/useRefFunc.cjs");
|
|
16
|
+
const require_useSearchConfig = require("./hooks/useSearchConfig.cjs");
|
|
17
|
+
const require_useTreeData = require("./hooks/useTreeData.cjs");
|
|
18
|
+
const require_strategyUtil = require("./utils/strategyUtil.cjs");
|
|
19
|
+
const require_warningPropsUtil = require("./utils/warningPropsUtil.cjs");
|
|
20
|
+
let vue = require("vue");
|
|
21
|
+
let _v_c_select = require("@v-c/select");
|
|
22
|
+
let _v_c_tree = require("@v-c/tree");
|
|
23
|
+
let _v_c_util = require("@v-c/util");
|
|
24
|
+
let _v_c_util_dist_props_util = require("@v-c/util/dist/props-util");
|
|
25
|
+
function isRawValue(value) {
|
|
26
|
+
return !value || typeof value !== "object";
|
|
27
|
+
}
|
|
28
|
+
var defaults = {
|
|
29
|
+
prefixCls: "vc-tree-select",
|
|
30
|
+
listHeight: 200,
|
|
31
|
+
listItemHeight: 20,
|
|
32
|
+
listItemScrollOffset: 0,
|
|
33
|
+
popupMatchSelectWidth: true
|
|
34
|
+
};
|
|
35
|
+
var omitKeyList = [
|
|
36
|
+
"id",
|
|
37
|
+
"prefixCls",
|
|
38
|
+
"value",
|
|
39
|
+
"defaultValue",
|
|
40
|
+
"onChange",
|
|
41
|
+
"showSearch",
|
|
42
|
+
"searchValue",
|
|
43
|
+
"inputValue",
|
|
44
|
+
"onSearch",
|
|
45
|
+
"autoClearSearchValue",
|
|
46
|
+
"filterTreeNode",
|
|
47
|
+
"treeNodeFilterProp",
|
|
48
|
+
"onSelect",
|
|
49
|
+
"onDeselect",
|
|
50
|
+
"showCheckedStrategy",
|
|
51
|
+
"treeNodeLabelProp",
|
|
52
|
+
"fieldNames",
|
|
53
|
+
"multiple",
|
|
54
|
+
"treeCheckable",
|
|
55
|
+
"treeCheckStrictly",
|
|
56
|
+
"labelInValue",
|
|
57
|
+
"maxCount",
|
|
58
|
+
"treeData",
|
|
59
|
+
"treeDataSimpleMode",
|
|
60
|
+
"treeDefaultExpandAll",
|
|
61
|
+
"treeExpandedKeys",
|
|
62
|
+
"treeDefaultExpandedKeys",
|
|
63
|
+
"onTreeExpand",
|
|
64
|
+
"treeExpandAction",
|
|
65
|
+
"virtual",
|
|
66
|
+
"listHeight",
|
|
67
|
+
"listItemHeight",
|
|
68
|
+
"listItemScrollOffset",
|
|
69
|
+
"onPopupVisibleChange",
|
|
70
|
+
"popupMatchSelectWidth",
|
|
71
|
+
"treeTitleRender",
|
|
72
|
+
"treeLine",
|
|
73
|
+
"treeIcon",
|
|
74
|
+
"showTreeIcon",
|
|
75
|
+
"switcherIcon",
|
|
76
|
+
"treeMotion",
|
|
77
|
+
"treeLoadedKeys",
|
|
78
|
+
"onTreeLoad",
|
|
79
|
+
"loadData",
|
|
80
|
+
"onPopupScroll",
|
|
81
|
+
"classNames",
|
|
82
|
+
"styles"
|
|
83
|
+
];
|
|
84
|
+
var TreeSelect = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
85
|
+
props: /* @__PURE__ */ (0, vue.mergeDefaults)({
|
|
86
|
+
prefixCls: {
|
|
87
|
+
type: String,
|
|
88
|
+
required: false,
|
|
89
|
+
default: void 0
|
|
90
|
+
},
|
|
91
|
+
id: {
|
|
92
|
+
type: String,
|
|
93
|
+
required: false,
|
|
94
|
+
default: void 0
|
|
95
|
+
},
|
|
96
|
+
classNames: {
|
|
97
|
+
type: Object,
|
|
98
|
+
required: false,
|
|
99
|
+
default: void 0
|
|
100
|
+
},
|
|
101
|
+
styles: {
|
|
102
|
+
type: Object,
|
|
103
|
+
required: false,
|
|
104
|
+
default: void 0
|
|
105
|
+
},
|
|
106
|
+
value: {
|
|
107
|
+
required: false,
|
|
108
|
+
default: void 0
|
|
109
|
+
},
|
|
110
|
+
defaultValue: {
|
|
111
|
+
required: false,
|
|
112
|
+
default: void 0
|
|
113
|
+
},
|
|
114
|
+
onChange: {
|
|
115
|
+
type: Function,
|
|
116
|
+
required: false,
|
|
117
|
+
default: void 0
|
|
118
|
+
},
|
|
119
|
+
showSearch: {
|
|
120
|
+
type: [Boolean, Object],
|
|
121
|
+
required: false,
|
|
122
|
+
default: void 0
|
|
123
|
+
},
|
|
124
|
+
searchValue: {
|
|
125
|
+
type: String,
|
|
126
|
+
required: false,
|
|
127
|
+
default: void 0
|
|
128
|
+
},
|
|
129
|
+
inputValue: {
|
|
130
|
+
type: String,
|
|
131
|
+
required: false,
|
|
132
|
+
default: void 0
|
|
133
|
+
},
|
|
134
|
+
onSearch: {
|
|
135
|
+
type: Function,
|
|
136
|
+
required: false,
|
|
137
|
+
default: void 0
|
|
138
|
+
},
|
|
139
|
+
autoClearSearchValue: {
|
|
140
|
+
type: Boolean,
|
|
141
|
+
required: false,
|
|
142
|
+
default: void 0
|
|
143
|
+
},
|
|
144
|
+
filterTreeNode: {
|
|
145
|
+
type: [Boolean, Function],
|
|
146
|
+
required: false,
|
|
147
|
+
default: void 0
|
|
148
|
+
},
|
|
149
|
+
treeNodeFilterProp: {
|
|
150
|
+
type: String,
|
|
151
|
+
required: false,
|
|
152
|
+
default: void 0
|
|
153
|
+
},
|
|
154
|
+
onSelect: {
|
|
155
|
+
type: Function,
|
|
156
|
+
required: false,
|
|
157
|
+
default: void 0
|
|
158
|
+
},
|
|
159
|
+
onDeselect: {
|
|
160
|
+
type: Function,
|
|
161
|
+
required: false,
|
|
162
|
+
default: void 0
|
|
163
|
+
},
|
|
164
|
+
showCheckedStrategy: {
|
|
165
|
+
required: false,
|
|
166
|
+
default: void 0
|
|
167
|
+
},
|
|
168
|
+
treeNodeLabelProp: {
|
|
169
|
+
type: String,
|
|
170
|
+
required: false,
|
|
171
|
+
default: void 0
|
|
172
|
+
},
|
|
173
|
+
fieldNames: {
|
|
174
|
+
type: Object,
|
|
175
|
+
required: false,
|
|
176
|
+
default: void 0
|
|
177
|
+
},
|
|
178
|
+
multiple: {
|
|
179
|
+
type: Boolean,
|
|
180
|
+
required: false,
|
|
181
|
+
default: void 0
|
|
182
|
+
},
|
|
183
|
+
treeCheckable: {
|
|
184
|
+
type: [
|
|
185
|
+
Boolean,
|
|
186
|
+
Object,
|
|
187
|
+
Function,
|
|
188
|
+
String,
|
|
189
|
+
Number,
|
|
190
|
+
null,
|
|
191
|
+
Array
|
|
192
|
+
],
|
|
193
|
+
required: false,
|
|
194
|
+
default: void 0
|
|
195
|
+
},
|
|
196
|
+
treeCheckStrictly: {
|
|
197
|
+
type: Boolean,
|
|
198
|
+
required: false,
|
|
199
|
+
default: void 0
|
|
200
|
+
},
|
|
201
|
+
labelInValue: {
|
|
202
|
+
type: Boolean,
|
|
203
|
+
required: false,
|
|
204
|
+
default: void 0
|
|
205
|
+
},
|
|
206
|
+
maxCount: {
|
|
207
|
+
type: Number,
|
|
208
|
+
required: false,
|
|
209
|
+
default: void 0
|
|
210
|
+
},
|
|
211
|
+
treeData: {
|
|
212
|
+
type: Array,
|
|
213
|
+
required: false,
|
|
214
|
+
default: void 0
|
|
215
|
+
},
|
|
216
|
+
treeDataSimpleMode: {
|
|
217
|
+
type: [Boolean, Object],
|
|
218
|
+
required: false,
|
|
219
|
+
default: void 0
|
|
220
|
+
},
|
|
221
|
+
loadData: {
|
|
222
|
+
type: Function,
|
|
223
|
+
required: false,
|
|
224
|
+
default: void 0
|
|
225
|
+
},
|
|
226
|
+
treeLoadedKeys: {
|
|
227
|
+
type: Array,
|
|
228
|
+
required: false,
|
|
229
|
+
default: void 0
|
|
230
|
+
},
|
|
231
|
+
onTreeLoad: {
|
|
232
|
+
type: Function,
|
|
233
|
+
required: false,
|
|
234
|
+
default: void 0
|
|
235
|
+
},
|
|
236
|
+
treeDefaultExpandAll: {
|
|
237
|
+
type: Boolean,
|
|
238
|
+
required: false,
|
|
239
|
+
default: void 0
|
|
240
|
+
},
|
|
241
|
+
treeExpandedKeys: {
|
|
242
|
+
type: Array,
|
|
243
|
+
required: false,
|
|
244
|
+
default: void 0
|
|
245
|
+
},
|
|
246
|
+
treeDefaultExpandedKeys: {
|
|
247
|
+
type: Array,
|
|
248
|
+
required: false,
|
|
249
|
+
default: void 0
|
|
250
|
+
},
|
|
251
|
+
onTreeExpand: {
|
|
252
|
+
type: Function,
|
|
253
|
+
required: false,
|
|
254
|
+
default: void 0
|
|
255
|
+
},
|
|
256
|
+
treeExpandAction: {
|
|
257
|
+
type: [Boolean, String],
|
|
258
|
+
required: false,
|
|
259
|
+
default: void 0
|
|
260
|
+
},
|
|
261
|
+
virtual: {
|
|
262
|
+
type: Boolean,
|
|
263
|
+
required: false,
|
|
264
|
+
default: void 0
|
|
265
|
+
},
|
|
266
|
+
listHeight: {
|
|
267
|
+
type: Number,
|
|
268
|
+
required: false,
|
|
269
|
+
default: void 0
|
|
270
|
+
},
|
|
271
|
+
listItemHeight: {
|
|
272
|
+
type: Number,
|
|
273
|
+
required: false,
|
|
274
|
+
default: void 0
|
|
275
|
+
},
|
|
276
|
+
listItemScrollOffset: {
|
|
277
|
+
type: Number,
|
|
278
|
+
required: false,
|
|
279
|
+
default: void 0
|
|
280
|
+
},
|
|
281
|
+
onPopupVisibleChange: {
|
|
282
|
+
type: Function,
|
|
283
|
+
required: false,
|
|
284
|
+
default: void 0
|
|
285
|
+
},
|
|
286
|
+
treeTitleRender: {
|
|
287
|
+
type: Function,
|
|
288
|
+
required: false,
|
|
289
|
+
default: void 0
|
|
290
|
+
},
|
|
291
|
+
treeLine: {
|
|
292
|
+
type: Boolean,
|
|
293
|
+
required: false,
|
|
294
|
+
default: void 0
|
|
295
|
+
},
|
|
296
|
+
treeIcon: {
|
|
297
|
+
type: [
|
|
298
|
+
Object,
|
|
299
|
+
Function,
|
|
300
|
+
String,
|
|
301
|
+
Number,
|
|
302
|
+
null,
|
|
303
|
+
Boolean,
|
|
304
|
+
Array
|
|
305
|
+
],
|
|
306
|
+
required: false,
|
|
307
|
+
default: void 0
|
|
308
|
+
},
|
|
309
|
+
showTreeIcon: {
|
|
310
|
+
type: Boolean,
|
|
311
|
+
required: false,
|
|
312
|
+
default: void 0
|
|
313
|
+
},
|
|
314
|
+
switcherIcon: {
|
|
315
|
+
type: [
|
|
316
|
+
Object,
|
|
317
|
+
Function,
|
|
318
|
+
String,
|
|
319
|
+
Number,
|
|
320
|
+
null,
|
|
321
|
+
Boolean,
|
|
322
|
+
Array
|
|
323
|
+
],
|
|
324
|
+
required: false,
|
|
325
|
+
default: void 0
|
|
326
|
+
},
|
|
327
|
+
treeMotion: {
|
|
328
|
+
required: false,
|
|
329
|
+
default: void 0
|
|
330
|
+
},
|
|
331
|
+
onPopupScroll: {
|
|
332
|
+
type: Function,
|
|
333
|
+
required: false,
|
|
334
|
+
default: void 0
|
|
335
|
+
},
|
|
336
|
+
popupMatchSelectWidth: {
|
|
337
|
+
type: [Boolean, Number],
|
|
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
|
+
title: {
|
|
380
|
+
type: String,
|
|
381
|
+
required: false,
|
|
382
|
+
default: void 0
|
|
383
|
+
},
|
|
384
|
+
tabIndex: {
|
|
385
|
+
type: Number,
|
|
386
|
+
required: false,
|
|
387
|
+
default: void 0
|
|
388
|
+
},
|
|
389
|
+
notFoundContent: {
|
|
390
|
+
type: [
|
|
391
|
+
Object,
|
|
392
|
+
Function,
|
|
393
|
+
String,
|
|
394
|
+
Number,
|
|
395
|
+
null,
|
|
396
|
+
Boolean,
|
|
397
|
+
Array
|
|
398
|
+
],
|
|
399
|
+
required: false,
|
|
400
|
+
default: void 0
|
|
401
|
+
},
|
|
402
|
+
onClear: {
|
|
403
|
+
type: Function,
|
|
404
|
+
required: false,
|
|
405
|
+
default: void 0
|
|
406
|
+
},
|
|
407
|
+
maxLength: {
|
|
408
|
+
type: Number,
|
|
409
|
+
required: false,
|
|
410
|
+
default: void 0
|
|
411
|
+
},
|
|
412
|
+
showScrollBar: {
|
|
413
|
+
type: [Boolean, String],
|
|
414
|
+
required: false,
|
|
415
|
+
default: void 0
|
|
416
|
+
},
|
|
417
|
+
choiceTransitionName: {
|
|
418
|
+
type: String,
|
|
419
|
+
required: false,
|
|
420
|
+
default: void 0
|
|
421
|
+
},
|
|
422
|
+
disabled: {
|
|
423
|
+
type: Boolean,
|
|
424
|
+
required: false,
|
|
425
|
+
default: void 0
|
|
426
|
+
},
|
|
427
|
+
loading: {
|
|
428
|
+
type: Boolean,
|
|
429
|
+
required: false,
|
|
430
|
+
default: void 0
|
|
431
|
+
},
|
|
432
|
+
open: {
|
|
433
|
+
type: Boolean,
|
|
434
|
+
required: false,
|
|
435
|
+
default: void 0
|
|
436
|
+
},
|
|
437
|
+
defaultOpen: {
|
|
438
|
+
type: Boolean,
|
|
439
|
+
required: false,
|
|
440
|
+
default: void 0
|
|
441
|
+
},
|
|
442
|
+
getInputElement: {
|
|
443
|
+
type: Function,
|
|
444
|
+
required: false,
|
|
445
|
+
default: void 0
|
|
446
|
+
},
|
|
447
|
+
getRawInputElement: {
|
|
448
|
+
type: Function,
|
|
449
|
+
required: false,
|
|
450
|
+
default: void 0
|
|
451
|
+
},
|
|
452
|
+
maxTagTextLength: {
|
|
453
|
+
type: Number,
|
|
454
|
+
required: false,
|
|
455
|
+
default: void 0
|
|
456
|
+
},
|
|
457
|
+
maxTagCount: {
|
|
458
|
+
type: [Number, String],
|
|
459
|
+
required: false,
|
|
460
|
+
default: void 0
|
|
461
|
+
},
|
|
462
|
+
maxTagPlaceholder: {
|
|
463
|
+
type: [
|
|
464
|
+
Object,
|
|
465
|
+
Function,
|
|
466
|
+
String,
|
|
467
|
+
Number,
|
|
468
|
+
null,
|
|
469
|
+
Boolean,
|
|
470
|
+
Array
|
|
471
|
+
],
|
|
472
|
+
required: false,
|
|
473
|
+
default: void 0
|
|
474
|
+
},
|
|
475
|
+
tokenSeparators: {
|
|
476
|
+
type: Array,
|
|
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
|
+
popupClassName: {
|
|
566
|
+
type: String,
|
|
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
|
+
placement: {
|
|
581
|
+
type: String,
|
|
582
|
+
required: false,
|
|
583
|
+
default: void 0
|
|
584
|
+
},
|
|
585
|
+
builtinPlacements: {
|
|
586
|
+
type: Object,
|
|
587
|
+
required: false,
|
|
588
|
+
default: void 0
|
|
589
|
+
},
|
|
590
|
+
getPopupContainer: {
|
|
591
|
+
type: Function,
|
|
592
|
+
required: false,
|
|
593
|
+
default: void 0
|
|
594
|
+
},
|
|
595
|
+
showAction: {
|
|
596
|
+
type: Array,
|
|
597
|
+
required: false,
|
|
598
|
+
default: void 0
|
|
599
|
+
},
|
|
600
|
+
onBlur: {
|
|
601
|
+
type: Function,
|
|
602
|
+
required: false,
|
|
603
|
+
default: void 0
|
|
604
|
+
},
|
|
605
|
+
onFocus: {
|
|
606
|
+
type: Function,
|
|
607
|
+
required: false,
|
|
608
|
+
default: void 0
|
|
609
|
+
},
|
|
610
|
+
onKeyUp: {
|
|
611
|
+
type: Function,
|
|
612
|
+
required: false,
|
|
613
|
+
default: void 0
|
|
614
|
+
},
|
|
615
|
+
onKeyDown: {
|
|
616
|
+
type: Function,
|
|
617
|
+
required: false,
|
|
618
|
+
default: void 0
|
|
619
|
+
},
|
|
620
|
+
onMouseDown: {
|
|
621
|
+
type: Function,
|
|
622
|
+
required: false,
|
|
623
|
+
default: void 0
|
|
624
|
+
},
|
|
625
|
+
onInputKeyDown: {
|
|
626
|
+
type: Function,
|
|
627
|
+
required: false,
|
|
628
|
+
default: void 0
|
|
629
|
+
},
|
|
630
|
+
onMouseEnter: {
|
|
631
|
+
type: Function,
|
|
632
|
+
required: false,
|
|
633
|
+
default: void 0
|
|
634
|
+
},
|
|
635
|
+
onMouseLeave: {
|
|
636
|
+
type: Function,
|
|
637
|
+
required: false,
|
|
638
|
+
default: void 0
|
|
639
|
+
},
|
|
640
|
+
onClick: {
|
|
641
|
+
type: Function,
|
|
642
|
+
required: false,
|
|
643
|
+
default: void 0
|
|
644
|
+
},
|
|
645
|
+
components: {
|
|
646
|
+
type: Object,
|
|
647
|
+
required: false,
|
|
648
|
+
default: void 0
|
|
649
|
+
}
|
|
650
|
+
}, defaults),
|
|
651
|
+
name: "TreeSelect",
|
|
652
|
+
inheritAttrs: false,
|
|
653
|
+
setup(props, { attrs, expose, slots }) {
|
|
654
|
+
const baseSelectRef = (0, vue.shallowRef)(null);
|
|
655
|
+
expose({
|
|
656
|
+
focus: () => baseSelectRef.value?.focus(),
|
|
657
|
+
blur: () => baseSelectRef.value?.blur(),
|
|
658
|
+
scrollTo: (arg) => baseSelectRef.value?.scrollTo?.(arg)
|
|
659
|
+
});
|
|
660
|
+
const mergedId = (0, _v_c_util.useId)(props.id);
|
|
661
|
+
const treeConduction = (0, vue.computed)(() => !!props.treeCheckable && !props.treeCheckStrictly);
|
|
662
|
+
const mergedCheckable = (0, vue.computed)(() => props.treeCheckable || props.treeCheckStrictly);
|
|
663
|
+
const mergedLabelInValue = (0, vue.computed)(() => !!props.treeCheckStrictly || !!props.labelInValue);
|
|
664
|
+
const mergedMultiple = (0, vue.computed)(() => !!mergedCheckable.value || !!props.multiple);
|
|
665
|
+
const searchProps = (0, vue.computed)(() => ({
|
|
666
|
+
searchValue: props.searchValue,
|
|
667
|
+
inputValue: props.inputValue,
|
|
668
|
+
onSearch: props.onSearch,
|
|
669
|
+
autoClearSearchValue: props.autoClearSearchValue,
|
|
670
|
+
filterTreeNode: props.filterTreeNode,
|
|
671
|
+
treeNodeFilterProp: props.treeNodeFilterProp
|
|
672
|
+
}));
|
|
673
|
+
const [mergedShowSearch, searchConfig] = require_useSearchConfig.default((0, vue.computed)(() => props.showSearch), searchProps);
|
|
674
|
+
const mergedTreeNodeFilterProp = (0, vue.computed)(() => searchConfig.value.treeNodeFilterProp || "value");
|
|
675
|
+
const mergedAutoClearSearchValue = (0, vue.computed)(() => searchConfig.value.autoClearSearchValue !== false);
|
|
676
|
+
const internalValue = (0, vue.shallowRef)(props?.value ?? props?.defaultValue);
|
|
677
|
+
(0, vue.watch)(() => props.value, () => {
|
|
678
|
+
internalValue.value = props?.value;
|
|
679
|
+
});
|
|
680
|
+
const setInternalValue = (val) => {
|
|
681
|
+
internalValue.value = val;
|
|
682
|
+
};
|
|
683
|
+
const mergedShowCheckedStrategy = (0, vue.computed)(() => {
|
|
684
|
+
if (!props.treeCheckable) return require_strategyUtil.SHOW_ALL;
|
|
685
|
+
return props.showCheckedStrategy || "SHOW_CHILD";
|
|
686
|
+
});
|
|
687
|
+
if (process.env.NODE_ENV !== "production") require_warningPropsUtil.default(props);
|
|
688
|
+
const mergedFieldNames = (0, vue.computed)(() => require_valueUtil.fillFieldNames(props.fieldNames));
|
|
689
|
+
const [internalSearchValue, setSearchValue] = (0, _v_c_util.useMergedState)(() => "", { value: (0, vue.computed)(() => searchConfig.value.searchValue) });
|
|
690
|
+
const mergedSearchValue = (0, vue.computed)(() => internalSearchValue.value || "");
|
|
691
|
+
const onInternalSearch = (searchText) => {
|
|
692
|
+
setSearchValue(searchText);
|
|
693
|
+
searchConfig.value.onSearch?.(searchText);
|
|
694
|
+
};
|
|
695
|
+
const slotTreeData = (0, vue.shallowRef)([]);
|
|
696
|
+
const slotTreeDataSignature = (0, vue.shallowRef)("");
|
|
697
|
+
const mergedSourceTreeData = (0, vue.computed)(() => {
|
|
698
|
+
if (props.treeData !== void 0) return props.treeData;
|
|
699
|
+
return slotTreeData.value;
|
|
700
|
+
});
|
|
701
|
+
const getTreeDataSignature = (data) => {
|
|
702
|
+
const dig = (list) => {
|
|
703
|
+
return (list || []).map((node) => {
|
|
704
|
+
const key = String(node?.key);
|
|
705
|
+
const children = node?.children;
|
|
706
|
+
return `${key}{${children?.length ? dig(children) : ""}}`;
|
|
707
|
+
}).join("|");
|
|
708
|
+
};
|
|
709
|
+
return dig(data);
|
|
710
|
+
};
|
|
711
|
+
const mergedTreeData = require_useTreeData.default(mergedSourceTreeData, (0, vue.computed)(() => props.treeDataSimpleMode));
|
|
712
|
+
const { keyEntities, valueEntities } = require_useDataEntities.default(mergedTreeData, mergedFieldNames);
|
|
713
|
+
const splitRawValues = (newRawValues) => {
|
|
714
|
+
const missingRawValues = [];
|
|
715
|
+
const existRawValues = [];
|
|
716
|
+
newRawValues.forEach((val) => {
|
|
717
|
+
if (valueEntities.value.has(val)) existRawValues.push(val);
|
|
718
|
+
else missingRawValues.push(val);
|
|
719
|
+
});
|
|
720
|
+
return {
|
|
721
|
+
missingRawValues,
|
|
722
|
+
existRawValues
|
|
723
|
+
};
|
|
724
|
+
};
|
|
725
|
+
const filteredTreeData = require_useFilterTreeData.default(mergedTreeData, mergedSearchValue, {
|
|
726
|
+
fieldNames: mergedFieldNames,
|
|
727
|
+
treeNodeFilterProp: mergedTreeNodeFilterProp,
|
|
728
|
+
filterTreeNode: (0, vue.computed)(() => searchConfig.value.filterTreeNode)
|
|
729
|
+
});
|
|
730
|
+
const getLabel = (item) => {
|
|
731
|
+
if (!item) return;
|
|
732
|
+
if (props.treeNodeLabelProp) return item[props.treeNodeLabelProp];
|
|
733
|
+
const titleList = mergedFieldNames.value._title;
|
|
734
|
+
for (let i = 0; i < titleList.length; i += 1) {
|
|
735
|
+
const title = item[titleList[i]];
|
|
736
|
+
if (title !== void 0) return title;
|
|
737
|
+
}
|
|
738
|
+
};
|
|
739
|
+
const toLabeledValues = (draftValues) => {
|
|
740
|
+
return require_valueUtil.toArray(draftValues).map((val) => {
|
|
741
|
+
if (isRawValue(val)) return { value: val };
|
|
742
|
+
return val;
|
|
743
|
+
});
|
|
744
|
+
};
|
|
745
|
+
const renderTreeTitleRender = (node) => {
|
|
746
|
+
let label;
|
|
747
|
+
const labelInfo = props?.treeTitleRender?.(node);
|
|
748
|
+
if (typeof labelInfo === "string" || typeof labelInfo === "number") label = labelInfo;
|
|
749
|
+
else {
|
|
750
|
+
const labelArr = (0, _v_c_util_dist_props_util.filterEmpty)(Array.isArray(labelInfo) ? labelInfo : [labelInfo]);
|
|
751
|
+
if (labelArr.length) label = labelArr.length === 1 ? labelArr[0] : labelArr;
|
|
752
|
+
}
|
|
753
|
+
return label;
|
|
754
|
+
};
|
|
755
|
+
const convert2LabelValues = (draftValues) => {
|
|
756
|
+
return toLabeledValues(draftValues).map((item) => {
|
|
757
|
+
let { label: rawLabel } = item;
|
|
758
|
+
const { value: rawValue, halfChecked: rawHalfChecked } = item;
|
|
759
|
+
let rawDisabled;
|
|
760
|
+
const entity = valueEntities.value.get(rawValue);
|
|
761
|
+
if (entity) {
|
|
762
|
+
rawLabel = props.treeTitleRender ? renderTreeTitleRender(entity.node) : rawLabel ?? getLabel(entity.node);
|
|
763
|
+
rawDisabled = entity.node.disabled;
|
|
764
|
+
} else if (rawLabel === void 0) rawLabel = toLabeledValues(internalValue.value).find((labeledItem) => labeledItem.value === rawValue)?.label;
|
|
765
|
+
return {
|
|
766
|
+
label: rawLabel,
|
|
767
|
+
value: rawValue,
|
|
768
|
+
halfChecked: rawHalfChecked,
|
|
769
|
+
disabled: rawDisabled
|
|
770
|
+
};
|
|
771
|
+
});
|
|
772
|
+
};
|
|
773
|
+
const rawMixedLabeledValues = (0, vue.computed)(() => toLabeledValues(internalValue.value === null ? [] : internalValue.value));
|
|
774
|
+
const rawLabeledValues = (0, vue.computed)(() => rawMixedLabeledValues.value.filter((item) => !item.halfChecked));
|
|
775
|
+
const rawHalfLabeledValues = (0, vue.computed)(() => rawMixedLabeledValues.value.filter((item) => !!item.halfChecked));
|
|
776
|
+
const rawValues = (0, vue.computed)(() => rawLabeledValues.value.map((item) => item.value));
|
|
777
|
+
const [rawCheckedValues, rawHalfCheckedValues] = require_useCheckedKeys.default(rawLabeledValues, rawHalfLabeledValues, treeConduction, keyEntities);
|
|
778
|
+
const [cachedDisplayValues] = require_useCache.default((0, vue.computed)(() => {
|
|
779
|
+
const rawDisplayValues = convert2LabelValues(require_strategyUtil.formatStrategyValues(rawCheckedValues.value, mergedShowCheckedStrategy.value, keyEntities.value, mergedFieldNames.value).map((key) => keyEntities.value[String(key)]?.node?.[mergedFieldNames.value.value] ?? key).map((val) => {
|
|
780
|
+
const targetItem = rawLabeledValues.value.find((item) => item.value === val);
|
|
781
|
+
let label;
|
|
782
|
+
if (props.labelInValue) label = targetItem?.label;
|
|
783
|
+
else label = renderTreeTitleRender(targetItem);
|
|
784
|
+
return {
|
|
785
|
+
value: val,
|
|
786
|
+
label
|
|
787
|
+
};
|
|
788
|
+
}));
|
|
789
|
+
const firstVal = rawDisplayValues[0];
|
|
790
|
+
if (!mergedMultiple.value && firstVal && require_valueUtil.isNil(firstVal.value) && require_valueUtil.isNil(firstVal.label)) return [];
|
|
791
|
+
return rawDisplayValues.map((item) => ({
|
|
792
|
+
...item,
|
|
793
|
+
label: item.label ?? item.value
|
|
794
|
+
}));
|
|
795
|
+
}));
|
|
796
|
+
const mergedMaxCount = (0, vue.computed)(() => {
|
|
797
|
+
if (mergedMultiple.value && (mergedShowCheckedStrategy.value === "SHOW_CHILD" || props.treeCheckStrictly || !props.treeCheckable)) return props.maxCount;
|
|
798
|
+
return null;
|
|
799
|
+
});
|
|
800
|
+
const triggerChange = require_useRefFunc.default((newRawValues, extra, source) => {
|
|
801
|
+
const formattedKeyList = require_strategyUtil.formatStrategyValues(newRawValues, mergedShowCheckedStrategy.value, keyEntities.value, mergedFieldNames.value);
|
|
802
|
+
if (mergedMaxCount.value && formattedKeyList.length > mergedMaxCount.value) return;
|
|
803
|
+
setInternalValue(convert2LabelValues(newRawValues));
|
|
804
|
+
if (mergedAutoClearSearchValue.value) setSearchValue("");
|
|
805
|
+
if (props.onChange) {
|
|
806
|
+
let eventValues = newRawValues;
|
|
807
|
+
if (treeConduction.value) eventValues = formattedKeyList.map((key) => {
|
|
808
|
+
const entity = valueEntities.value.get(key);
|
|
809
|
+
return entity ? entity.node[mergedFieldNames.value.value] : key;
|
|
810
|
+
});
|
|
811
|
+
const { triggerValue, selected } = extra || {
|
|
812
|
+
triggerValue: void 0,
|
|
813
|
+
selected: void 0
|
|
814
|
+
};
|
|
815
|
+
let returnRawValues = eventValues;
|
|
816
|
+
if (props.treeCheckStrictly) {
|
|
817
|
+
const halfValues = rawHalfLabeledValues.value.filter((item) => !eventValues.includes(item.value));
|
|
818
|
+
returnRawValues = [...returnRawValues, ...halfValues];
|
|
819
|
+
}
|
|
820
|
+
const returnLabeledValues = convert2LabelValues(returnRawValues);
|
|
821
|
+
const additionalInfo = {
|
|
822
|
+
preValue: rawLabeledValues.value,
|
|
823
|
+
triggerValue
|
|
824
|
+
};
|
|
825
|
+
let showPosition = true;
|
|
826
|
+
if (props.treeCheckStrictly || source === "selection" && !selected) showPosition = false;
|
|
827
|
+
require_legacyUtil.fillAdditionalInfo(additionalInfo, triggerValue, newRawValues, mergedTreeData.value, showPosition, mergedFieldNames.value);
|
|
828
|
+
if (mergedCheckable.value) additionalInfo.checked = selected;
|
|
829
|
+
else additionalInfo.selected = selected;
|
|
830
|
+
const returnValues = mergedLabelInValue.value ? returnLabeledValues : returnLabeledValues.map((item) => item.value);
|
|
831
|
+
props.onChange(mergedMultiple.value ? returnValues : returnValues[0], mergedLabelInValue.value ? null : returnLabeledValues.map((item) => item.label), additionalInfo);
|
|
832
|
+
}
|
|
833
|
+
});
|
|
834
|
+
const onOptionSelect = (selectedKey, { selected, source }) => {
|
|
835
|
+
const node = keyEntities.value[String(selectedKey)]?.node;
|
|
836
|
+
const selectedValue = node?.[mergedFieldNames.value.value] ?? selectedKey;
|
|
837
|
+
if (!mergedMultiple.value) triggerChange([selectedValue], {
|
|
838
|
+
selected: true,
|
|
839
|
+
triggerValue: selectedValue
|
|
840
|
+
}, "option");
|
|
841
|
+
else {
|
|
842
|
+
let newRawValues = selected ? [...rawValues.value, selectedValue] : rawCheckedValues.value.filter((v) => v !== selectedValue);
|
|
843
|
+
if (treeConduction.value) {
|
|
844
|
+
const { missingRawValues, existRawValues } = splitRawValues(newRawValues);
|
|
845
|
+
const keyList = existRawValues.map((val) => {
|
|
846
|
+
const entity = valueEntities.value.get(val);
|
|
847
|
+
return entity ? entity.key : val;
|
|
848
|
+
});
|
|
849
|
+
let checkedKeys;
|
|
850
|
+
if (selected) ({checkedKeys} = (0, _v_c_tree.conductCheck)(keyList, true, keyEntities.value));
|
|
851
|
+
else ({checkedKeys} = (0, _v_c_tree.conductCheck)(keyList, {
|
|
852
|
+
checked: false,
|
|
853
|
+
halfCheckedKeys: rawHalfCheckedValues.value
|
|
854
|
+
}, keyEntities.value));
|
|
855
|
+
newRawValues = [...missingRawValues, ...checkedKeys.map((key) => keyEntities.value[String(key)].node[mergedFieldNames.value.value])];
|
|
856
|
+
}
|
|
857
|
+
triggerChange(newRawValues, {
|
|
858
|
+
selected,
|
|
859
|
+
triggerValue: selectedValue
|
|
860
|
+
}, source || "option");
|
|
861
|
+
}
|
|
862
|
+
if (selected || !mergedMultiple.value) props.onSelect?.(selectedValue, require_legacyUtil.fillLegacyProps(node));
|
|
863
|
+
else props.onDeselect?.(selectedValue, require_legacyUtil.fillLegacyProps(node));
|
|
864
|
+
};
|
|
865
|
+
const onInternalPopupVisibleChange = (open) => {
|
|
866
|
+
props.onPopupVisibleChange?.(open);
|
|
867
|
+
};
|
|
868
|
+
const onDisplayValuesChange = require_useRefFunc.default((newValues, info) => {
|
|
869
|
+
const newRawValues = newValues.map((item) => item.value);
|
|
870
|
+
if (info.type === "clear") {
|
|
871
|
+
triggerChange(newRawValues, {}, "selection");
|
|
872
|
+
return;
|
|
873
|
+
}
|
|
874
|
+
if (info.values.length) onOptionSelect(info.values[0].value, {
|
|
875
|
+
selected: false,
|
|
876
|
+
source: "selection"
|
|
877
|
+
});
|
|
878
|
+
});
|
|
879
|
+
require_TreeSelectContext.useTreeSelectProvider((0, vue.computed)(() => {
|
|
880
|
+
return {
|
|
881
|
+
virtual: props.virtual,
|
|
882
|
+
popupMatchSelectWidth: props.popupMatchSelectWidth ?? defaults.popupMatchSelectWidth,
|
|
883
|
+
listHeight: props.listHeight ?? defaults.listHeight,
|
|
884
|
+
listItemHeight: props.listItemHeight ?? defaults.listItemHeight,
|
|
885
|
+
listItemScrollOffset: props.listItemScrollOffset ?? defaults.listItemScrollOffset,
|
|
886
|
+
treeData: filteredTreeData.value,
|
|
887
|
+
fieldNames: mergedFieldNames.value,
|
|
888
|
+
onSelect: onOptionSelect,
|
|
889
|
+
treeExpandAction: props.treeExpandAction,
|
|
890
|
+
treeTitleRender: props.treeTitleRender,
|
|
891
|
+
onPopupScroll: props.onPopupScroll,
|
|
892
|
+
leftMaxCount: props.maxCount === void 0 ? null : props.maxCount - cachedDisplayValues.value.length,
|
|
893
|
+
leafCountOnly: mergedShowCheckedStrategy.value === "SHOW_CHILD" && !props.treeCheckStrictly && !!props.treeCheckable,
|
|
894
|
+
valueEntities: valueEntities.value,
|
|
895
|
+
classNames: props.classNames,
|
|
896
|
+
styles: props.styles
|
|
897
|
+
};
|
|
898
|
+
}));
|
|
899
|
+
require_LegacyContext.useLegacyProvider((0, vue.computed)(() => ({
|
|
900
|
+
checkable: mergedCheckable.value,
|
|
901
|
+
loadData: props.loadData,
|
|
902
|
+
treeLoadedKeys: props.treeLoadedKeys,
|
|
903
|
+
onTreeLoad: props.onTreeLoad,
|
|
904
|
+
checkedKeys: rawCheckedValues.value,
|
|
905
|
+
halfCheckedKeys: rawHalfCheckedValues.value,
|
|
906
|
+
treeDefaultExpandAll: props.treeDefaultExpandAll,
|
|
907
|
+
treeExpandedKeys: props.treeExpandedKeys,
|
|
908
|
+
treeDefaultExpandedKeys: props.treeDefaultExpandedKeys || [],
|
|
909
|
+
onTreeExpand: props.onTreeExpand,
|
|
910
|
+
treeIcon: props.treeIcon,
|
|
911
|
+
treeMotion: props.treeMotion,
|
|
912
|
+
showTreeIcon: props.showTreeIcon,
|
|
913
|
+
switcherIcon: props.switcherIcon,
|
|
914
|
+
treeLine: props.treeLine,
|
|
915
|
+
treeNodeFilterProp: mergedTreeNodeFilterProp.value,
|
|
916
|
+
keyEntities: keyEntities.value
|
|
917
|
+
})));
|
|
918
|
+
return () => {
|
|
919
|
+
if (props.treeData === void 0) {
|
|
920
|
+
const parsed = require_legacyUtil.convertChildrenToData(slots.default?.() ?? []);
|
|
921
|
+
const signature = getTreeDataSignature(parsed);
|
|
922
|
+
if (signature !== slotTreeDataSignature.value) {
|
|
923
|
+
slotTreeDataSignature.value = signature;
|
|
924
|
+
slotTreeData.value = parsed;
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
return (0, vue.createVNode)(_v_c_select.BaseSelect, (0, vue.mergeProps)({ ...attrs }, (0, _v_c_util.omit)(props, omitKeyList), {
|
|
928
|
+
"ref": (el) => {
|
|
929
|
+
baseSelectRef.value = el;
|
|
930
|
+
},
|
|
931
|
+
"id": mergedId,
|
|
932
|
+
"prefixCls": props.prefixCls || defaults.prefixCls,
|
|
933
|
+
"mode": mergedMultiple.value ? "multiple" : void 0,
|
|
934
|
+
"classNames": props.classNames,
|
|
935
|
+
"styles": props.styles,
|
|
936
|
+
"displayValues": cachedDisplayValues.value,
|
|
937
|
+
"onDisplayValuesChange": onDisplayValuesChange,
|
|
938
|
+
"autoClearSearchValue": mergedAutoClearSearchValue.value,
|
|
939
|
+
"showSearch": mergedShowSearch.value,
|
|
940
|
+
"searchValue": mergedSearchValue.value,
|
|
941
|
+
"onSearch": (v) => {
|
|
942
|
+
onInternalSearch(v);
|
|
943
|
+
},
|
|
944
|
+
"OptionList": require_OptionList.default,
|
|
945
|
+
"emptyOptions": !mergedTreeData.value.length,
|
|
946
|
+
"onPopupVisibleChange": onInternalPopupVisibleChange,
|
|
947
|
+
"popupMatchSelectWidth": props.popupMatchSelectWidth ?? defaults.popupMatchSelectWidth
|
|
948
|
+
}), null);
|
|
949
|
+
};
|
|
950
|
+
}
|
|
951
|
+
});
|
|
952
|
+
var TreeSelect_default = TreeSelect;
|
|
953
|
+
exports.default = TreeSelect_default;
|