@opentinyvue/vue-base-select 2.21.0 → 3.21.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/lib/index.js +1 -1
- package/lib/mobile-first.js +871 -699
- package/lib/pc.js +917 -756
- package/package.json +15 -15
- package/src/index.d.ts +691 -1
- package/src/mobile-first.vue.d.ts +270 -1
- package/src/pc.vue.d.ts +291 -1
package/lib/pc.js
CHANGED
|
@@ -14,36 +14,40 @@ import RecycleScroller from '@opentinyvue/vue-recycle-scroller';
|
|
|
14
14
|
import Checkbox from '@opentinyvue/vue-checkbox';
|
|
15
15
|
import '@opentinyvue/vue-theme/select/index.css';
|
|
16
16
|
import '@opentinyvue/vue-theme/base-select/index.css';
|
|
17
|
+
import { resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, mergeProps, withModifiers, createElementVNode, normalizeStyle, normalizeClass, renderSlot, createBlock, createCommentVNode, withCtx, createVNode, createTextVNode, toDisplayString, Fragment, renderList, createSlots, withKeys, vShow, vModelText, resolveDynamicComponent, Transition } from 'vue';
|
|
17
18
|
|
|
18
|
-
function
|
|
19
|
-
var
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
function _createForOfIteratorHelperLoose(r, e) {
|
|
20
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
21
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
22
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
23
|
+
t && (r = t);
|
|
24
|
+
var o = 0;
|
|
25
|
+
return function() {
|
|
26
|
+
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
27
|
+
};
|
|
24
28
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
var originalRender = options.render;
|
|
33
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
34
|
-
hook.call(context);
|
|
35
|
-
return originalRender(h, context);
|
|
36
|
-
};
|
|
37
|
-
} else {
|
|
38
|
-
var existing = options.beforeCreate;
|
|
39
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
40
|
-
}
|
|
29
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
30
|
+
}
|
|
31
|
+
function _unsupportedIterableToArray(r, a) {
|
|
32
|
+
if (r) {
|
|
33
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
34
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
35
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
41
36
|
}
|
|
42
|
-
return {
|
|
43
|
-
exports: scriptExports,
|
|
44
|
-
options
|
|
45
|
-
};
|
|
46
37
|
}
|
|
38
|
+
function _arrayLikeToArray(r, a) {
|
|
39
|
+
(null == a || a > r.length) && (a = r.length);
|
|
40
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
41
|
+
return n;
|
|
42
|
+
}
|
|
43
|
+
var _export_sfc = function _export_sfc2(sfc, props) {
|
|
44
|
+
var target = sfc.__vccOpts || sfc;
|
|
45
|
+
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
|
|
46
|
+
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
|
|
47
|
+
target[key] = val;
|
|
48
|
+
}
|
|
49
|
+
return target;
|
|
50
|
+
};
|
|
47
51
|
|
|
48
52
|
var getReference = function getReference2(el, binding, vnode) {
|
|
49
53
|
var _ref = binding.expression ? binding.value : binding.arg;
|
|
@@ -56,7 +60,7 @@ var getReference = function getReference2(el, binding, vnode) {
|
|
|
56
60
|
}
|
|
57
61
|
}
|
|
58
62
|
};
|
|
59
|
-
var
|
|
63
|
+
var _sfc_main = defineComponent({
|
|
60
64
|
inheritAttrs: false,
|
|
61
65
|
emits: ["update:modelValue", "change", "focus", "blur", "clear", "remove-tag", "visible-change", "handleDropdownClick", "dropdown-click", "top-create-click"],
|
|
62
66
|
directives: directive({
|
|
@@ -189,739 +193,896 @@ var __vue2_script = defineComponent({
|
|
|
189
193
|
});
|
|
190
194
|
}
|
|
191
195
|
});
|
|
192
|
-
var
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
196
|
+
var _hoisted_1 = {
|
|
197
|
+
key: 0
|
|
198
|
+
};
|
|
199
|
+
var _hoisted_2 = {
|
|
200
|
+
key: 0
|
|
201
|
+
};
|
|
202
|
+
var _hoisted_3 = {
|
|
203
|
+
class: "tiny-base-select__tags-text"
|
|
204
|
+
};
|
|
205
|
+
var _hoisted_4 = {
|
|
206
|
+
key: 0
|
|
207
|
+
};
|
|
208
|
+
var _hoisted_5 = {
|
|
209
|
+
class: "tiny-base-select__tags-text"
|
|
210
|
+
};
|
|
211
|
+
var _hoisted_6 = {
|
|
212
|
+
key: 1,
|
|
213
|
+
ref: "tags-content"
|
|
214
|
+
};
|
|
215
|
+
var _hoisted_7 = {
|
|
216
|
+
key: 0,
|
|
217
|
+
class: "tiny-base-select__tags-text"
|
|
218
|
+
};
|
|
219
|
+
var _hoisted_8 = {
|
|
220
|
+
key: 1,
|
|
221
|
+
class: "tiny-base-select__tags-text"
|
|
222
|
+
};
|
|
223
|
+
var _hoisted_9 = {
|
|
224
|
+
key: 0
|
|
225
|
+
};
|
|
226
|
+
var _hoisted_10 = {
|
|
227
|
+
key: 1
|
|
228
|
+
};
|
|
229
|
+
var _hoisted_11 = {
|
|
230
|
+
key: 1,
|
|
231
|
+
class: "tiny-base-select__tags-text is-disabled"
|
|
232
|
+
};
|
|
233
|
+
var _hoisted_12 = {
|
|
234
|
+
key: 0
|
|
235
|
+
};
|
|
236
|
+
var _hoisted_13 = {
|
|
237
|
+
key: 1
|
|
238
|
+
};
|
|
239
|
+
var _hoisted_14 = ["disabled", "autocomplete"];
|
|
240
|
+
var _hoisted_15 = {
|
|
241
|
+
key: 0,
|
|
242
|
+
class: "tiny-base-select__limit-txt"
|
|
243
|
+
};
|
|
244
|
+
var _hoisted_16 = {
|
|
245
|
+
key: 1,
|
|
246
|
+
class: "tiny-base-select__proportion-txt"
|
|
247
|
+
};
|
|
248
|
+
var _hoisted_17 = {
|
|
249
|
+
key: 1,
|
|
250
|
+
class: "tiny-select__top-create"
|
|
251
|
+
};
|
|
252
|
+
var _hoisted_18 = {
|
|
253
|
+
class: "tiny-icon-close"
|
|
254
|
+
};
|
|
255
|
+
var _hoisted_19 = {
|
|
256
|
+
key: 0,
|
|
257
|
+
class: "tiny-select-dropdown__empty-wrap"
|
|
258
|
+
};
|
|
259
|
+
var _hoisted_20 = {
|
|
260
|
+
key: 1,
|
|
261
|
+
class: "tiny-select-dropdown__empty-images"
|
|
262
|
+
};
|
|
263
|
+
var _hoisted_21 = {
|
|
264
|
+
key: 2,
|
|
265
|
+
class: "tiny-select-dropdown__empty"
|
|
266
|
+
};
|
|
267
|
+
var _hoisted_22 = {
|
|
268
|
+
key: 1,
|
|
269
|
+
class: "tiny-select-dropdown__loading"
|
|
270
|
+
};
|
|
271
|
+
var _hoisted_23 = {
|
|
272
|
+
key: 0,
|
|
273
|
+
class: "tiny-select-dropdown__empty-images"
|
|
274
|
+
};
|
|
275
|
+
var _hoisted_24 = {
|
|
276
|
+
key: 1,
|
|
277
|
+
class: "tiny-select-dropdown__empty"
|
|
278
|
+
};
|
|
279
|
+
var _hoisted_25 = {
|
|
280
|
+
key: 1,
|
|
281
|
+
class: "circular",
|
|
282
|
+
viewBox: "25 25 50 50"
|
|
283
|
+
};
|
|
284
|
+
var _hoisted_26 = /* @__PURE__ */ createElementVNode(
|
|
285
|
+
"circle",
|
|
286
|
+
{
|
|
287
|
+
class: "path",
|
|
288
|
+
cx: "50",
|
|
289
|
+
cy: "50",
|
|
290
|
+
r: "24",
|
|
291
|
+
fill: "none"
|
|
292
|
+
},
|
|
293
|
+
null,
|
|
294
|
+
-1
|
|
295
|
+
/* HOISTED */
|
|
296
|
+
);
|
|
297
|
+
var _hoisted_27 = [_hoisted_26];
|
|
298
|
+
var _hoisted_28 = {
|
|
299
|
+
key: 0,
|
|
300
|
+
class: "tiny-base-select__placeholder"
|
|
301
|
+
};
|
|
302
|
+
var _hoisted_29 = /* @__PURE__ */ createElementVNode(
|
|
303
|
+
"input",
|
|
304
|
+
{
|
|
305
|
+
class: "tiny-input__inner",
|
|
306
|
+
disabled: ""
|
|
307
|
+
},
|
|
308
|
+
null,
|
|
309
|
+
-1
|
|
310
|
+
/* HOISTED */
|
|
311
|
+
);
|
|
312
|
+
var _hoisted_30 = [_hoisted_29];
|
|
313
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
314
|
+
var _component_tiny_filter_box = resolveComponent("tiny-filter-box");
|
|
315
|
+
var _component_tiny_tooltip = resolveComponent("tiny-tooltip");
|
|
316
|
+
var _component_tiny_tag = resolveComponent("tiny-tag");
|
|
317
|
+
var _component_icon_ellipsis = resolveComponent("icon-ellipsis");
|
|
318
|
+
var _component_icon_chevron_up = resolveComponent("icon-chevron-up");
|
|
319
|
+
var _component_icon_copy = resolveComponent("icon-copy");
|
|
320
|
+
var _component_icon_close = resolveComponent("icon-close");
|
|
321
|
+
var _component_tiny_input = resolveComponent("tiny-input");
|
|
322
|
+
var _component_icon_search = resolveComponent("icon-search");
|
|
323
|
+
var _component_tiny_option = resolveComponent("tiny-option");
|
|
324
|
+
var _component_tiny_recycle_scroller = resolveComponent("tiny-recycle-scroller");
|
|
325
|
+
var _component_tiny_scrollbar = resolveComponent("tiny-scrollbar");
|
|
326
|
+
var _component_tiny_select_dropdown = resolveComponent("tiny-select-dropdown");
|
|
327
|
+
var _directive_popover = resolveDirective("popover");
|
|
328
|
+
var _directive_clickoutside = resolveDirective("clickoutside");
|
|
329
|
+
return withDirectives((openBlock(), createElementBlock(
|
|
330
|
+
"div",
|
|
331
|
+
mergeProps({
|
|
332
|
+
ref: "select",
|
|
333
|
+
class: ["tiny-base-select", [_ctx.state.selectSize ? "tiny-base-select--" + _ctx.state.selectSize : "", _ctx.state.collapseTags ? "tiny-base-select__collapse-tags" : "", _ctx.filterable ? "tiny-base-select__filterable" : "", _ctx.multiple ? "tiny-base-select__multiple" : "", (_ctx.state.inputHovering || _ctx.state.visible) && !_ctx.clickExpand ? "is-hover" : "", _ctx.state.isDisplayOnly ? "is-display-only" : "", _ctx.hoverExpand ? "is-hover-expand" : "", _ctx.clickExpand ? "is-click-expand" : "", _ctx.state.showCollapseTag ? "collapse-tag-clicked" : "", _ctx.state.selectDisabled ? "is-disabled" : "", _ctx.$parent.$attrs.class]],
|
|
334
|
+
onMouseleave: _cache[40] || (_cache[40] = withModifiers(function() {
|
|
335
|
+
_ctx.state.selectHover = false;
|
|
336
|
+
_ctx.state.inputHovering = false;
|
|
337
|
+
}, ["self"])),
|
|
338
|
+
onMouseenter: _cache[41] || (_cache[41] = withModifiers(function() {
|
|
339
|
+
_ctx.state.selectHover = true;
|
|
340
|
+
_ctx.state.inputHovering = true;
|
|
341
|
+
}, ["self"])),
|
|
342
|
+
onClick: _cache[42] || (_cache[42] = function() {
|
|
343
|
+
return _ctx.toggleMenu && _ctx.toggleMenu.apply(_ctx, arguments);
|
|
344
|
+
})
|
|
345
|
+
}, _ctx.a(_ctx.$attrs, ["class", "style"], true)),
|
|
346
|
+
[createElementVNode(
|
|
347
|
+
"div",
|
|
348
|
+
{
|
|
349
|
+
ref: "tagsGroup",
|
|
350
|
+
style: normalizeStyle(_ctx.state.selectFiexd),
|
|
351
|
+
class: normalizeClass(["tiny-base-select__tags-group", {
|
|
352
|
+
"is-expand": _ctx.state.isExpand
|
|
353
|
+
}])
|
|
339
354
|
},
|
|
340
|
-
|
|
341
|
-
"
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
"
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
"
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
}, [_c("tiny-tooltip", {
|
|
366
|
-
attrs: {
|
|
367
|
-
"effect": "light",
|
|
368
|
-
"placement": "top"
|
|
369
|
-
},
|
|
370
|
-
nativeOn: {
|
|
371
|
-
"mouseenter": function mouseenter($event) {
|
|
372
|
-
_vm.handleEnterTag($event, _vm.getValueKey(item));
|
|
373
|
-
}
|
|
374
|
-
},
|
|
375
|
-
scopedSlots: _vm._u([_vm.state.tooltipContent[_vm.getValueKey(item)] ? {
|
|
376
|
-
key: "content",
|
|
377
|
-
fn: function fn() {
|
|
378
|
-
return [!_vm.state.visible && _vm.state.overflow === index ? _c("span", [_vm._v(" " + _vm._s(item.state ? item.state.currentLabel + "... " : item.currentLabel + "... ") + " ")]) : _c("span", [_vm._t("label", function() {
|
|
379
|
-
return [_vm._v(" " + _vm._s(item.state ? item.state.currentLabel : item.currentLabel) + " ")];
|
|
355
|
+
[renderSlot(_ctx.$slots, "reference", {}, function() {
|
|
356
|
+
return [_ctx.shape === "filter" ? (openBlock(), createBlock(_component_tiny_filter_box, {
|
|
357
|
+
key: 0,
|
|
358
|
+
ref: "reference",
|
|
359
|
+
onClick: _ctx.toggleMenu,
|
|
360
|
+
"show-close": _ctx.clearable,
|
|
361
|
+
placeholder: _ctx.placeholder,
|
|
362
|
+
disabled: _ctx.state.selectDisabled,
|
|
363
|
+
label: _ctx.label,
|
|
364
|
+
tip: _ctx.tip,
|
|
365
|
+
value: _ctx.multiple ? _ctx.state.selected.map(function(item) {
|
|
366
|
+
return item.state ? item.state.currentLabel : item.currentLabel;
|
|
367
|
+
}).join("; ") : _ctx.state.selectedLabel,
|
|
368
|
+
"drop-down-visible": _ctx.state.visible,
|
|
369
|
+
blank: _ctx.blank
|
|
370
|
+
}, null, 8, ["onClick", "show-close", "placeholder", "disabled", "label", "tip", "value", "drop-down-visible", "blank"])) : createCommentVNode("v-if", true), _ctx.multiple && !_ctx.state.isDisplayOnly && !_ctx.shape ? (openBlock(), createElementBlock(
|
|
371
|
+
"div",
|
|
372
|
+
{
|
|
373
|
+
key: 1,
|
|
374
|
+
ref: "tags",
|
|
375
|
+
class: normalizeClass(["tiny-base-select__tags", {
|
|
376
|
+
"is-showicon": _ctx.slots.prefix,
|
|
377
|
+
"not-selected": !_ctx.state.selected.length
|
|
380
378
|
}, {
|
|
381
|
-
"
|
|
382
|
-
})
|
|
379
|
+
"is-show-tag": !_ctx.state.isShowTagText
|
|
380
|
+
}]),
|
|
381
|
+
style: normalizeStyle(_ctx.state.tagsStyle)
|
|
383
382
|
},
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
"focus": _vm.handleFocus,
|
|
464
|
-
"blur": _vm.handleBlur,
|
|
465
|
-
"keyup": _vm.managePlaceholder,
|
|
466
|
-
"keydown": [_vm.resetInputState, function($event) {
|
|
467
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "down", 40, $event.key, ["Down", "ArrowDown"])) return null;
|
|
468
|
-
$event.preventDefault();
|
|
469
|
-
return _vm.navigateOptions("next");
|
|
470
|
-
}, function($event) {
|
|
471
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])) return null;
|
|
472
|
-
$event.preventDefault();
|
|
473
|
-
return _vm.navigateOptions("prev");
|
|
474
|
-
}, function($event) {
|
|
475
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) return null;
|
|
476
|
-
$event.preventDefault();
|
|
477
|
-
return _vm.selectOption.apply(null, arguments);
|
|
478
|
-
}, function($event) {
|
|
479
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "esc", 27, $event.key, ["Esc", "Escape"])) return null;
|
|
480
|
-
$event.stopPropagation();
|
|
481
|
-
$event.preventDefault();
|
|
482
|
-
_vm.state.visible = false;
|
|
483
|
-
}, function($event) {
|
|
484
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "delete", [8, 46], $event.key, ["Backspace", "Delete", "Del"])) return null;
|
|
485
|
-
return _vm.deletePrevTag.apply(null, arguments);
|
|
486
|
-
}, function($event) {
|
|
487
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "tab", 9, $event.key, "Tab")) return null;
|
|
488
|
-
_vm.state.visible = false;
|
|
489
|
-
}],
|
|
490
|
-
"compositionstart": _vm.handleComposition,
|
|
491
|
-
"compositionupdate": _vm.handleComposition,
|
|
492
|
-
"compositionend": _vm.handleComposition,
|
|
493
|
-
"input": [function($event) {
|
|
494
|
-
if ($event.target.composing) return;
|
|
495
|
-
_vm.$set(_vm.state, "query", $event.target.value);
|
|
496
|
-
}, _vm.debouncedQueryChange]
|
|
497
|
-
}
|
|
498
|
-
})]) : _vm._e(), !_vm.shape ? _c("tiny-input", {
|
|
499
|
-
ref: "reference",
|
|
500
|
-
class: {
|
|
501
|
-
"is-focus": _vm.state.visible,
|
|
502
|
-
overflow: _vm.state.overflow,
|
|
503
|
-
"is-show-close": _vm.state.showClose
|
|
504
|
-
},
|
|
505
|
-
attrs: {
|
|
506
|
-
"tiny_mode": "pc",
|
|
507
|
-
"type": "text",
|
|
508
|
-
"placeholder": _vm.state.currentPlaceholder,
|
|
509
|
-
"name": _vm.name,
|
|
510
|
-
"id": _vm.id,
|
|
511
|
-
"autocomplete": _vm.autocomplete,
|
|
512
|
-
"size": _vm.state.selectSize,
|
|
513
|
-
"disabled": _vm.state.selectDisabled,
|
|
514
|
-
"readonly": _vm.state.readonly,
|
|
515
|
-
"display-only": _vm.state.isDisplayOnly,
|
|
516
|
-
"display-only-content": _vm.state.displayOnlyContent,
|
|
517
|
-
"unselectable": _vm.state.readonly ? "on" : "off",
|
|
518
|
-
"validate-event": false,
|
|
519
|
-
"input-box-type": _vm.inputBoxType,
|
|
520
|
-
"tabindex": _vm.multiple && _vm.filterable ? "-1" : _vm.tabindex
|
|
521
|
-
},
|
|
522
|
-
on: {
|
|
523
|
-
"focus": _vm.handleFocus,
|
|
524
|
-
"blur": _vm.handleBlur,
|
|
525
|
-
"keyup": _vm.debouncedOnInputChange,
|
|
526
|
-
"keydown": [function($event) {
|
|
527
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "down", 40, $event.key, ["Down", "ArrowDown"])) return null;
|
|
528
|
-
$event.stopPropagation();
|
|
529
|
-
$event.preventDefault();
|
|
530
|
-
return _vm.navigateOptions("next");
|
|
531
|
-
}, function($event) {
|
|
532
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])) return null;
|
|
533
|
-
$event.stopPropagation();
|
|
534
|
-
$event.preventDefault();
|
|
535
|
-
return _vm.navigateOptions("prev");
|
|
536
|
-
}, function($event) {
|
|
537
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) return null;
|
|
538
|
-
$event.preventDefault();
|
|
539
|
-
return _vm.selectOption.apply(null, arguments);
|
|
540
|
-
}, function($event) {
|
|
541
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "esc", 27, $event.key, ["Esc", "Escape"])) return null;
|
|
542
|
-
$event.stopPropagation();
|
|
543
|
-
$event.preventDefault();
|
|
544
|
-
_vm.state.visible = false;
|
|
545
|
-
}, function($event) {
|
|
546
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "tab", 9, $event.key, "Tab")) return null;
|
|
547
|
-
_vm.state.visible = false;
|
|
548
|
-
}],
|
|
549
|
-
"paste": _vm.debouncedOnInputChange,
|
|
550
|
-
"mouseenter": _vm.onMouseenterNative,
|
|
551
|
-
"mouseleave": _vm.onMouseleaveNative
|
|
552
|
-
},
|
|
553
|
-
nativeOn: {
|
|
554
|
-
"compositionend": function compositionend($event) {
|
|
555
|
-
return _vm.handleComposition.apply(null, arguments);
|
|
556
|
-
}
|
|
557
|
-
},
|
|
558
|
-
scopedSlots: _vm._u([_vm.slots.prefix ? {
|
|
559
|
-
key: "prefix",
|
|
560
|
-
fn: function fn() {
|
|
561
|
-
return [_vm._t("prefix")];
|
|
562
|
-
},
|
|
563
|
-
proxy: true
|
|
564
|
-
} : null, {
|
|
565
|
-
key: "suffix",
|
|
566
|
-
fn: function fn() {
|
|
567
|
-
return [_vm._t("suffix"), _vm.showLimitText && _vm.multiple && _vm.multipleLimit ? _c("span", {
|
|
568
|
-
staticClass: "tiny-base-select__limit-txt"
|
|
569
|
-
}, [_vm._v(" " + _vm._s(_vm.state.selected.length) + "/" + _vm._s(_vm.multipleLimit) + " ")]) : _vm.showProportion && _vm.state.selected.length > 0 && _vm.state.options.length > 1 ? _c("span", {
|
|
570
|
-
staticClass: "tiny-base-select__proportion-txt"
|
|
571
|
-
}, [_vm._v(" " + _vm._s(_vm.state.selected.length + "/" + _vm.state.options.length) + " ")]) : _vm._e(), _vm.state.showCopy ? _c("span", {
|
|
572
|
-
staticClass: "tiny-base-select__copy",
|
|
573
|
-
on: {
|
|
574
|
-
"click": function click($event) {
|
|
575
|
-
$event.stopPropagation();
|
|
576
|
-
return _vm.handleCopyClick.apply(null, arguments);
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
}, [_c("icon-copy", {
|
|
580
|
-
staticClass: "tiny-svg-size tiny-base-select__caret"
|
|
581
|
-
})], 1) : _vm._e(), _vm.state.showClose ? _c("icon-close", {
|
|
582
|
-
staticClass: "tiny-svg-size tiny-base-select__caret icon-close",
|
|
583
|
-
on: {
|
|
584
|
-
"click": _vm.handleClearClick,
|
|
585
|
-
"mouseenter": function mouseenter($event) {
|
|
586
|
-
_vm.state.inputHovering = true;
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
}) : _vm._e(), _c(_vm.state.getIcon.icon, {
|
|
590
|
-
directives: [{
|
|
591
|
-
name: "show",
|
|
592
|
-
rawName: "v-show",
|
|
593
|
-
value: _vm.state.autoHideDownIcon ? !_vm.state.showClose && !(_vm.remote && _vm.filterable && !_vm.remoteConfig.showIcon) : !(_vm.remote && _vm.filterable && !_vm.remoteConfig.showIcon),
|
|
594
|
-
expression: "\n state.autoHideDownIcon\n ? !state.showClose && !(remote && filterable && !remoteConfig.showIcon)\n : !(remote && filterable && !remoteConfig.showIcon)\n "
|
|
595
|
-
}],
|
|
596
|
-
tag: "component",
|
|
597
|
-
class: ["tiny-svg-size", "tiny-base-select__caret", _vm.state.iconClass, {
|
|
598
|
-
"is-reverse": !_vm.state.visible && _vm.state.getIcon.isDefault
|
|
383
|
+
[!_ctx.state.isShowTagText ? (openBlock(), createElementBlock("span", _hoisted_1, [_ctx.collapseTags && _ctx.state.selected.length ? (openBlock(), createElementBlock("span", _hoisted_2, [(openBlock(), createBlock(_component_tiny_tag, {
|
|
384
|
+
closable: !_ctx.state.selectDisabled,
|
|
385
|
+
size: _ctx.state.collapseTagSize,
|
|
386
|
+
hit: _ctx.state.selected[0].state ? _ctx.state.selected[0].state.hitState : _ctx.state.selected[0].hitState,
|
|
387
|
+
key: _ctx.state.key,
|
|
388
|
+
type: _ctx.state.getTagType,
|
|
389
|
+
onClose: _cache[1] || (_cache[1] = function($event) {
|
|
390
|
+
return _ctx.deleteTag($event, _ctx.state.selected[0]);
|
|
391
|
+
}),
|
|
392
|
+
"disable-transitions": ""
|
|
393
|
+
}, {
|
|
394
|
+
default: withCtx(function() {
|
|
395
|
+
return [createVNode(_component_tiny_tooltip, {
|
|
396
|
+
effect: "light",
|
|
397
|
+
placement: "top",
|
|
398
|
+
onMouseenter: _cache[0] || (_cache[0] = function($event) {
|
|
399
|
+
return _ctx.handleEnterTag($event, _ctx.getValueKey(_ctx.state.selected[0]));
|
|
400
|
+
})
|
|
401
|
+
}, {
|
|
402
|
+
content: withCtx(function() {
|
|
403
|
+
return [_ctx.state.tooltipContent[_ctx.getValueKey(_ctx.state.selected[0])] ? (openBlock(), createElementBlock("span", _hoisted_4, [renderSlot(_ctx.$slots, "label", {
|
|
404
|
+
item: _ctx.getLabelSlotValue(_ctx.state.selected[0])
|
|
405
|
+
}, function() {
|
|
406
|
+
return [createTextVNode(
|
|
407
|
+
toDisplayString(_ctx.state.selected[0].state ? _ctx.state.selected[0].state.currentLabel : _ctx.state.selected[0].currentLabel),
|
|
408
|
+
1
|
|
409
|
+
/* TEXT */
|
|
410
|
+
)];
|
|
411
|
+
})])) : createCommentVNode("v-if", true)];
|
|
412
|
+
}),
|
|
413
|
+
default: withCtx(function() {
|
|
414
|
+
return [createElementVNode("span", _hoisted_3, [renderSlot(_ctx.$slots, "label", {
|
|
415
|
+
item: _ctx.getLabelSlotValue(_ctx.state.selected[0])
|
|
416
|
+
}, function() {
|
|
417
|
+
return [createTextVNode(
|
|
418
|
+
toDisplayString(_ctx.state.selected[0].state ? _ctx.state.selected[0].state.currentLabel : _ctx.state.selected[0].currentLabel),
|
|
419
|
+
1
|
|
420
|
+
/* TEXT */
|
|
421
|
+
)];
|
|
422
|
+
})])];
|
|
423
|
+
}),
|
|
424
|
+
_: 3
|
|
425
|
+
/* FORWARDED */
|
|
426
|
+
})];
|
|
427
|
+
}),
|
|
428
|
+
_: 3
|
|
429
|
+
/* FORWARDED */
|
|
430
|
+
}, 8, ["closable", "size", "hit", "type"])), _ctx.state.selected.length > 1 ? (openBlock(), createBlock(_component_tiny_tag, {
|
|
431
|
+
key: 0,
|
|
432
|
+
closable: false,
|
|
433
|
+
size: _ctx.state.collapseTagSize,
|
|
434
|
+
type: _ctx.state.getTagType,
|
|
435
|
+
"disable-transitions": "",
|
|
436
|
+
class: "tiny-base-select__tags-number"
|
|
437
|
+
}, {
|
|
438
|
+
default: withCtx(function() {
|
|
439
|
+
return [createElementVNode(
|
|
440
|
+
"span",
|
|
441
|
+
_hoisted_5,
|
|
442
|
+
"+ " + toDisplayString(_ctx.state.selected.length - 1),
|
|
443
|
+
1
|
|
444
|
+
/* TEXT */
|
|
445
|
+
)];
|
|
446
|
+
}),
|
|
447
|
+
_: 1
|
|
448
|
+
/* STABLE */
|
|
449
|
+
}, 8, ["size", "type"])) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true), !_ctx.collapseTags ? (openBlock(), createElementBlock(
|
|
450
|
+
"span",
|
|
451
|
+
_hoisted_6,
|
|
452
|
+
[_ctx.showAllTextTag && _ctx.state.selectCls === "checked-sur" ? (openBlock(), createBlock(_component_tiny_tag, {
|
|
453
|
+
type: _ctx.state.getTagType,
|
|
454
|
+
key: "tags-all-text-tag",
|
|
455
|
+
"data-tag": "tags-all-text-tag",
|
|
456
|
+
disabled: _ctx.state.isDisabled,
|
|
457
|
+
closable: true,
|
|
458
|
+
size: _ctx.state.collapseTagSize,
|
|
459
|
+
onClose: _cache[2] || (_cache[2] = function($event) {
|
|
460
|
+
return _ctx.toggleCheckAll(false);
|
|
461
|
+
})
|
|
599
462
|
}, {
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
"
|
|
867
|
-
"
|
|
868
|
-
"
|
|
869
|
-
"
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
"
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
463
|
+
default: withCtx(function() {
|
|
464
|
+
return [createTextVNode(
|
|
465
|
+
toDisplayString(_ctx.allText || _ctx.t("ui.base.all")),
|
|
466
|
+
1
|
|
467
|
+
/* TEXT */
|
|
468
|
+
)];
|
|
469
|
+
}),
|
|
470
|
+
_: 1
|
|
471
|
+
/* STABLE */
|
|
472
|
+
}, 8, ["type", "disabled", "size"])) : (openBlock(), createElementBlock(
|
|
473
|
+
Fragment,
|
|
474
|
+
{
|
|
475
|
+
key: 1
|
|
476
|
+
},
|
|
477
|
+
[_ctx.hoverExpand || _ctx.clickExpand ? (openBlock(), createBlock(_component_tiny_tag, {
|
|
478
|
+
class: normalizeClass(["tiny-base-select__tags-collapse", {
|
|
479
|
+
"is-hidden": _ctx.state.isHidden || _ctx.state.isDisabled
|
|
480
|
+
}]),
|
|
481
|
+
type: _ctx.state.getTagType,
|
|
482
|
+
key: "tags-collapse",
|
|
483
|
+
"data-tag": "tags-collapse",
|
|
484
|
+
"only-icon": "",
|
|
485
|
+
closable: false,
|
|
486
|
+
size: _ctx.state.collapseTagSize,
|
|
487
|
+
onClick: _cache[3] || (_cache[3] = function($event) {
|
|
488
|
+
return _ctx.onClickCollapseTag($event);
|
|
489
|
+
})
|
|
490
|
+
}, {
|
|
491
|
+
default: withCtx(function() {
|
|
492
|
+
return [_ctx.hoverExpand ? (openBlock(), createElementBlock(
|
|
493
|
+
Fragment,
|
|
494
|
+
{
|
|
495
|
+
key: 0
|
|
496
|
+
},
|
|
497
|
+
[createTextVNode(
|
|
498
|
+
" + " + toDisplayString(_ctx.state.collapseTagsLength),
|
|
499
|
+
1
|
|
500
|
+
/* TEXT */
|
|
501
|
+
)],
|
|
502
|
+
64
|
|
503
|
+
/* STABLE_FRAGMENT */
|
|
504
|
+
)) : (openBlock(), createBlock(_component_icon_ellipsis, {
|
|
505
|
+
key: 1
|
|
506
|
+
}))];
|
|
507
|
+
}),
|
|
508
|
+
_: 1
|
|
509
|
+
/* STABLE */
|
|
510
|
+
}, 8, ["class", "type", "size"])) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(
|
|
511
|
+
Fragment,
|
|
512
|
+
null,
|
|
513
|
+
renderList(_ctx.state.selected, function(item, index) {
|
|
514
|
+
return openBlock(), createBlock(_component_tiny_tag, {
|
|
515
|
+
key: _ctx.getValueKey(item),
|
|
516
|
+
class: normalizeClass({
|
|
517
|
+
"not-visible": _ctx.state.toHideIndex <= index && !_ctx.state.isExpand,
|
|
518
|
+
"is-required": item.required
|
|
519
|
+
}),
|
|
520
|
+
closable: _ctx.isTagClosable(item),
|
|
521
|
+
disabled: _ctx.state.isDisabled || item.disabled,
|
|
522
|
+
size: _ctx.state.collapseTagSize,
|
|
523
|
+
hit: item.state ? item.state.hitState : item.hitState,
|
|
524
|
+
type: _ctx.state.getTagType,
|
|
525
|
+
onClose: function onClose($event) {
|
|
526
|
+
return _ctx.deleteTag($event, item);
|
|
527
|
+
},
|
|
528
|
+
"disable-transitions": ""
|
|
529
|
+
}, {
|
|
530
|
+
default: withCtx(function() {
|
|
531
|
+
return [createVNode(_component_tiny_tooltip, {
|
|
532
|
+
effect: "light",
|
|
533
|
+
placement: "top",
|
|
534
|
+
onMouseenter: function onMouseenter($event) {
|
|
535
|
+
return _ctx.handleEnterTag($event, _ctx.getValueKey(item));
|
|
536
|
+
}
|
|
537
|
+
}, createSlots({
|
|
538
|
+
default: withCtx(function() {
|
|
539
|
+
return [!_ctx.state.visible && _ctx.state.overflow === index ? (openBlock(), createElementBlock(
|
|
540
|
+
"span",
|
|
541
|
+
_hoisted_7,
|
|
542
|
+
toDisplayString(item.state ? item.state.currentLabel + "... " : item.currentLabel + "... "),
|
|
543
|
+
1
|
|
544
|
+
/* TEXT */
|
|
545
|
+
)) : (openBlock(), createElementBlock("span", _hoisted_8, [renderSlot(_ctx.$slots, "label", {
|
|
546
|
+
item: _ctx.getLabelSlotValue(item)
|
|
547
|
+
}, function() {
|
|
548
|
+
return [createTextVNode(
|
|
549
|
+
toDisplayString(item.state ? item.state.currentLabel : item.currentLabel),
|
|
550
|
+
1
|
|
551
|
+
/* TEXT */
|
|
552
|
+
)];
|
|
553
|
+
})]))];
|
|
554
|
+
}),
|
|
555
|
+
_: 2
|
|
556
|
+
/* DYNAMIC */
|
|
557
|
+
}, [_ctx.state.tooltipContent[_ctx.getValueKey(item)] ? {
|
|
558
|
+
name: "content",
|
|
559
|
+
fn: withCtx(function() {
|
|
560
|
+
return [!_ctx.state.visible && _ctx.state.overflow === index ? (openBlock(), createElementBlock(
|
|
561
|
+
"span",
|
|
562
|
+
_hoisted_9,
|
|
563
|
+
toDisplayString(item.state ? item.state.currentLabel + "... " : item.currentLabel + "... "),
|
|
564
|
+
1
|
|
565
|
+
/* TEXT */
|
|
566
|
+
)) : (openBlock(), createElementBlock("span", _hoisted_10, [renderSlot(_ctx.$slots, "label", {
|
|
567
|
+
item: _ctx.getLabelSlotValue(item)
|
|
568
|
+
}, function() {
|
|
569
|
+
return [createTextVNode(
|
|
570
|
+
toDisplayString(item.state ? item.state.currentLabel : item.currentLabel),
|
|
571
|
+
1
|
|
572
|
+
/* TEXT */
|
|
573
|
+
)];
|
|
574
|
+
})]))];
|
|
575
|
+
}),
|
|
576
|
+
key: "0"
|
|
577
|
+
} : void 0]), 1032, ["onMouseenter"])];
|
|
578
|
+
}),
|
|
579
|
+
_: 2
|
|
580
|
+
/* DYNAMIC */
|
|
581
|
+
}, 1032, ["class", "closable", "disabled", "size", "hit", "type", "onClose"]);
|
|
582
|
+
}),
|
|
583
|
+
128
|
|
584
|
+
/* KEYED_FRAGMENT */
|
|
585
|
+
)), _ctx.clickExpand && _ctx.state.showCollapseTag ? (openBlock(), createElementBlock("span", {
|
|
586
|
+
key: 1,
|
|
587
|
+
class: "tiny-base-select__collapse-text",
|
|
588
|
+
onClick: _cache[4] || (_cache[4] = function($event) {
|
|
589
|
+
return _ctx.onClickCollapseTag($event);
|
|
590
|
+
})
|
|
591
|
+
}, [createTextVNode(
|
|
592
|
+
toDisplayString(_ctx.t("ui.select.collapse")) + " ",
|
|
593
|
+
1
|
|
594
|
+
/* TEXT */
|
|
595
|
+
), createVNode(_component_icon_chevron_up)])) : createCommentVNode("v-if", true)],
|
|
596
|
+
64
|
|
597
|
+
/* STABLE_FRAGMENT */
|
|
598
|
+
))],
|
|
599
|
+
512
|
|
600
|
+
/* NEED_PATCH */
|
|
601
|
+
)) : createCommentVNode("v-if", true)])) : (openBlock(), createElementBlock("span", _hoisted_11, [createVNode(_component_tiny_tooltip, {
|
|
602
|
+
effect: "light",
|
|
603
|
+
placement: "top",
|
|
604
|
+
disabled: !_ctx.showTips
|
|
605
|
+
}, {
|
|
606
|
+
content: withCtx(function() {
|
|
607
|
+
return [createElementVNode(
|
|
608
|
+
"div",
|
|
609
|
+
{
|
|
610
|
+
class: normalizeClass([_ctx.state.showTips && "tiny-base-select__show-tips", "tiny-base-select__show-common"])
|
|
611
|
+
},
|
|
612
|
+
[_ctx.slots.label ? (openBlock(), createElementBlock("span", _hoisted_12, [(openBlock(true), createElementBlock(
|
|
613
|
+
Fragment,
|
|
614
|
+
null,
|
|
615
|
+
renderList(_ctx.state.selected, function(item) {
|
|
616
|
+
return openBlock(), createElementBlock("span", {
|
|
617
|
+
key: _ctx.getValueKey(item)
|
|
618
|
+
}, [renderSlot(_ctx.$slots, "label", {
|
|
619
|
+
item
|
|
620
|
+
})]);
|
|
621
|
+
}),
|
|
622
|
+
128
|
|
623
|
+
/* KEYED_FRAGMENT */
|
|
624
|
+
))])) : (openBlock(), createElementBlock(
|
|
625
|
+
"span",
|
|
626
|
+
_hoisted_13,
|
|
627
|
+
toDisplayString(_ctx.disabledTooltipContent || _ctx.state.disabledTooltipContent),
|
|
628
|
+
1
|
|
629
|
+
/* TEXT */
|
|
630
|
+
))],
|
|
631
|
+
2
|
|
632
|
+
/* CLASS */
|
|
633
|
+
)];
|
|
634
|
+
}),
|
|
635
|
+
default: withCtx(function() {
|
|
636
|
+
return [createElementVNode("span", null, [(openBlock(true), createElementBlock(
|
|
637
|
+
Fragment,
|
|
638
|
+
null,
|
|
639
|
+
renderList(_ctx.state.selected, function(item) {
|
|
640
|
+
return openBlock(), createElementBlock("span", {
|
|
641
|
+
key: item.value
|
|
642
|
+
}, [renderSlot(_ctx.$slots, "label", {
|
|
643
|
+
item
|
|
644
|
+
}, function() {
|
|
645
|
+
return [createTextVNode(
|
|
646
|
+
toDisplayString(item.state ? item.state.currentLabel : item.currentLabel),
|
|
647
|
+
1
|
|
648
|
+
/* TEXT */
|
|
649
|
+
)];
|
|
650
|
+
}), createTextVNode("; ")]);
|
|
651
|
+
}),
|
|
652
|
+
128
|
|
653
|
+
/* KEYED_FRAGMENT */
|
|
654
|
+
))])];
|
|
655
|
+
}),
|
|
656
|
+
_: 3
|
|
657
|
+
/* FORWARDED */
|
|
658
|
+
}, 8, ["disabled"])])), withDirectives(createElementVNode("input", {
|
|
659
|
+
ref: "input",
|
|
660
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = function($event) {
|
|
661
|
+
return _ctx.state.query = $event;
|
|
662
|
+
}),
|
|
663
|
+
type: "text",
|
|
664
|
+
class: normalizeClass(["tiny-base-select__input", [_ctx.state.selectSize ? "is-" + _ctx.state.selectSize : ""]]),
|
|
665
|
+
disabled: _ctx.state.selectDisabled,
|
|
666
|
+
autocomplete: _ctx.autocomplete,
|
|
667
|
+
onFocus: _cache[6] || (_cache[6] = function() {
|
|
668
|
+
return _ctx.handleFocus && _ctx.handleFocus.apply(_ctx, arguments);
|
|
669
|
+
}),
|
|
670
|
+
onBlur: _cache[7] || (_cache[7] = function() {
|
|
671
|
+
return _ctx.handleBlur && _ctx.handleBlur.apply(_ctx, arguments);
|
|
672
|
+
}),
|
|
673
|
+
onKeyup: _cache[8] || (_cache[8] = function() {
|
|
674
|
+
return _ctx.managePlaceholder && _ctx.managePlaceholder.apply(_ctx, arguments);
|
|
675
|
+
}),
|
|
676
|
+
onKeydown: [_cache[9] || (_cache[9] = function() {
|
|
677
|
+
return _ctx.resetInputState && _ctx.resetInputState.apply(_ctx, arguments);
|
|
678
|
+
}), _cache[10] || (_cache[10] = withKeys(withModifiers(function($event) {
|
|
679
|
+
return _ctx.navigateOptions("next");
|
|
680
|
+
}, ["prevent"]), ["down"])), _cache[11] || (_cache[11] = withKeys(withModifiers(function($event) {
|
|
681
|
+
return _ctx.navigateOptions("prev");
|
|
682
|
+
}, ["prevent"]), ["up"])), _cache[12] || (_cache[12] = withKeys(withModifiers(function() {
|
|
683
|
+
return _ctx.selectOption && _ctx.selectOption.apply(_ctx, arguments);
|
|
684
|
+
}, ["prevent"]), ["enter"])), _cache[13] || (_cache[13] = withKeys(withModifiers(function($event) {
|
|
685
|
+
return _ctx.state.visible = false;
|
|
686
|
+
}, ["stop", "prevent"]), ["esc"])), _cache[14] || (_cache[14] = withKeys(function() {
|
|
687
|
+
return _ctx.deletePrevTag && _ctx.deletePrevTag.apply(_ctx, arguments);
|
|
688
|
+
}, ["delete"])), _cache[15] || (_cache[15] = withKeys(function($event) {
|
|
689
|
+
return _ctx.state.visible = false;
|
|
690
|
+
}, ["tab"]))],
|
|
691
|
+
onCompositionstart: _cache[16] || (_cache[16] = function() {
|
|
692
|
+
return _ctx.handleComposition && _ctx.handleComposition.apply(_ctx, arguments);
|
|
693
|
+
}),
|
|
694
|
+
onCompositionupdate: _cache[17] || (_cache[17] = function() {
|
|
695
|
+
return _ctx.handleComposition && _ctx.handleComposition.apply(_ctx, arguments);
|
|
696
|
+
}),
|
|
697
|
+
onCompositionend: _cache[18] || (_cache[18] = function() {
|
|
698
|
+
return _ctx.handleComposition && _ctx.handleComposition.apply(_ctx, arguments);
|
|
699
|
+
}),
|
|
700
|
+
onInput: _cache[19] || (_cache[19] = function() {
|
|
701
|
+
return _ctx.debouncedQueryChange && _ctx.debouncedQueryChange.apply(_ctx, arguments);
|
|
702
|
+
}),
|
|
703
|
+
style: normalizeStyle({
|
|
704
|
+
"flex-grow": "1",
|
|
705
|
+
width: _ctx.state.inputLength / (_ctx.state.inputWidth - 32) + "%",
|
|
706
|
+
"max-width": _ctx.state.inputWidth - 42 + "px",
|
|
707
|
+
height: "auto"
|
|
708
|
+
})
|
|
709
|
+
}, null, 46, _hoisted_14), [[vShow, _ctx.filterable && !_ctx.searchable && !_ctx.state.selectDisabled], [vModelText, _ctx.state.query]])],
|
|
710
|
+
6
|
|
711
|
+
/* CLASS, STYLE */
|
|
712
|
+
)) : createCommentVNode("v-if", true), !_ctx.shape ? (openBlock(), createBlock(_component_tiny_input, {
|
|
713
|
+
key: 2,
|
|
714
|
+
tiny_mode: "pc",
|
|
715
|
+
ref: "reference",
|
|
716
|
+
modelValue: _ctx.state.selectedLabel,
|
|
717
|
+
"onUpdate:modelValue": _cache[22] || (_cache[22] = function($event) {
|
|
718
|
+
return _ctx.state.selectedLabel = $event;
|
|
719
|
+
}),
|
|
720
|
+
type: "text",
|
|
721
|
+
placeholder: _ctx.state.currentPlaceholder,
|
|
722
|
+
name: _ctx.name,
|
|
723
|
+
id: _ctx.id,
|
|
724
|
+
autocomplete: _ctx.autocomplete,
|
|
725
|
+
size: _ctx.state.selectSize,
|
|
726
|
+
disabled: _ctx.state.selectDisabled,
|
|
727
|
+
readonly: _ctx.state.readonly,
|
|
728
|
+
"display-only": _ctx.state.isDisplayOnly,
|
|
729
|
+
"display-only-content": _ctx.state.displayOnlyContent,
|
|
730
|
+
unselectable: _ctx.state.readonly ? "on" : "off",
|
|
731
|
+
"validate-event": false,
|
|
732
|
+
"input-box-type": _ctx.inputBoxType,
|
|
733
|
+
class: normalizeClass({
|
|
734
|
+
"is-focus": _ctx.state.visible,
|
|
735
|
+
overflow: _ctx.state.overflow,
|
|
736
|
+
"is-show-close": _ctx.state.showClose
|
|
737
|
+
}),
|
|
738
|
+
tabindex: _ctx.multiple && _ctx.filterable ? "-1" : _ctx.tabindex,
|
|
739
|
+
onFocus: _ctx.handleFocus,
|
|
740
|
+
onBlur: _ctx.handleBlur,
|
|
741
|
+
onKeyup: _ctx.debouncedOnInputChange,
|
|
742
|
+
onKeydown: [_cache[23] || (_cache[23] = withKeys(withModifiers(function($event) {
|
|
743
|
+
return _ctx.navigateOptions("next");
|
|
744
|
+
}, ["stop", "prevent"]), ["down"])), _cache[24] || (_cache[24] = withKeys(withModifiers(function($event) {
|
|
745
|
+
return _ctx.navigateOptions("prev");
|
|
746
|
+
}, ["stop", "prevent"]), ["up"])), withKeys(withModifiers(_ctx.selectOption, ["prevent"]), ["enter"]), _cache[25] || (_cache[25] = withKeys(withModifiers(function($event) {
|
|
747
|
+
return _ctx.state.visible = false;
|
|
748
|
+
}, ["stop", "prevent"]), ["esc"])), _cache[26] || (_cache[26] = withKeys(function($event) {
|
|
749
|
+
return _ctx.state.visible = false;
|
|
750
|
+
}, ["tab"]))],
|
|
751
|
+
onPaste: _ctx.debouncedOnInputChange,
|
|
752
|
+
onMouseenter: _ctx.onMouseenterNative,
|
|
753
|
+
onMouseleave: _ctx.onMouseleaveNative,
|
|
754
|
+
onCompositionend: _ctx.handleComposition
|
|
755
|
+
}, createSlots({
|
|
756
|
+
suffix: withCtx(function() {
|
|
757
|
+
return [renderSlot(_ctx.$slots, "suffix"), _ctx.showLimitText && _ctx.multiple && _ctx.multipleLimit ? (openBlock(), createElementBlock(
|
|
758
|
+
"span",
|
|
759
|
+
_hoisted_15,
|
|
760
|
+
toDisplayString(_ctx.state.selected.length) + "/" + toDisplayString(_ctx.multipleLimit),
|
|
761
|
+
1
|
|
762
|
+
/* TEXT */
|
|
763
|
+
)) : _ctx.showProportion && _ctx.state.selected.length > 0 && _ctx.state.options.length > 1 ? (openBlock(), createElementBlock(
|
|
764
|
+
"span",
|
|
765
|
+
_hoisted_16,
|
|
766
|
+
toDisplayString(_ctx.state.selected.length + "/" + _ctx.state.options.length),
|
|
767
|
+
1
|
|
768
|
+
/* TEXT */
|
|
769
|
+
)) : createCommentVNode("v-if", true), _ctx.state.showCopy ? (openBlock(), createElementBlock("span", {
|
|
770
|
+
key: 2,
|
|
771
|
+
class: "tiny-base-select__copy",
|
|
772
|
+
onClick: _cache[20] || (_cache[20] = withModifiers(function() {
|
|
773
|
+
return _ctx.handleCopyClick && _ctx.handleCopyClick.apply(_ctx, arguments);
|
|
774
|
+
}, ["stop"]))
|
|
775
|
+
}, [createVNode(_component_icon_copy, {
|
|
776
|
+
class: "tiny-svg-size tiny-base-select__caret"
|
|
777
|
+
})])) : createCommentVNode("v-if", true), _ctx.state.showClose ? (openBlock(), createBlock(_component_icon_close, {
|
|
778
|
+
key: 3,
|
|
779
|
+
class: "tiny-svg-size tiny-base-select__caret icon-close",
|
|
780
|
+
onClick: _ctx.handleClearClick,
|
|
781
|
+
onMouseenter: _cache[21] || (_cache[21] = function($event) {
|
|
782
|
+
return _ctx.state.inputHovering = true;
|
|
783
|
+
})
|
|
784
|
+
}, null, 8, ["onClick"])) : createCommentVNode("v-if", true), withDirectives((openBlock(), createBlock(resolveDynamicComponent(_ctx.state.getIcon.icon), {
|
|
785
|
+
class: normalizeClass(["tiny-svg-size", "tiny-base-select__caret", _ctx.state.iconClass, {
|
|
786
|
+
"is-reverse": !_ctx.state.visible && _ctx.state.getIcon.isDefault
|
|
787
|
+
}, {
|
|
788
|
+
"not-reverse": !_ctx.state.getIcon.isDefault
|
|
789
|
+
}]),
|
|
790
|
+
onClick: _ctx.handleDropdownClick
|
|
791
|
+
}, null, 8, ["class", "onClick"])), [[vShow, _ctx.state.autoHideDownIcon ? !_ctx.state.showClose && !(_ctx.remote && _ctx.filterable && !_ctx.remoteConfig.showIcon) : !(_ctx.remote && _ctx.filterable && !_ctx.remoteConfig.showIcon)]])];
|
|
792
|
+
}),
|
|
793
|
+
_: 2
|
|
794
|
+
/* DYNAMIC */
|
|
795
|
+
}, [_ctx.slots.prefix ? {
|
|
796
|
+
name: "prefix",
|
|
797
|
+
fn: withCtx(function() {
|
|
798
|
+
return [renderSlot(_ctx.$slots, "prefix")];
|
|
799
|
+
}),
|
|
800
|
+
key: "0"
|
|
801
|
+
} : void 0]), 1032, ["modelValue", "placeholder", "name", "id", "autocomplete", "size", "disabled", "readonly", "display-only", "display-only-content", "unselectable", "input-box-type", "class", "tabindex", "onFocus", "onBlur", "onKeyup", "onKeydown", "onPaste", "onMouseenter", "onMouseleave", "onCompositionend"])) : createCommentVNode("v-if", true)];
|
|
802
|
+
}), createVNode(Transition, {
|
|
803
|
+
name: "tiny-zoom-in-top",
|
|
804
|
+
onBeforeEnter: _ctx.handleMenuEnter,
|
|
805
|
+
onAfterLeave: _ctx.doDestroy,
|
|
806
|
+
persisted: ""
|
|
807
|
+
}, {
|
|
808
|
+
default: withCtx(function() {
|
|
809
|
+
return [withDirectives(createVNode(_component_tiny_select_dropdown, {
|
|
810
|
+
ref: "popper",
|
|
811
|
+
"is-drop-inherit-width": _ctx.isDropInheritWidth,
|
|
812
|
+
placement: _ctx.placement,
|
|
813
|
+
"append-to-body": _ctx.popperAppendToBody,
|
|
814
|
+
style: normalizeStyle(_ctx.dropStyle),
|
|
815
|
+
"popper-options": _ctx.popperOptions
|
|
816
|
+
}, {
|
|
817
|
+
default: withCtx(function() {
|
|
818
|
+
var _ctx$state$designConf, _ctx$state$designConf2;
|
|
819
|
+
return [_ctx.shape && _ctx.filterable ? (openBlock(), createElementBlock(
|
|
820
|
+
"div",
|
|
821
|
+
{
|
|
822
|
+
key: 0,
|
|
823
|
+
class: normalizeClass(["tiny-base-select__filter-input", [_ctx.remote && !_ctx.state.options.length ? "tiny-base-select__remote-input" : ""]])
|
|
824
|
+
},
|
|
825
|
+
[createVNode(_component_tiny_input, {
|
|
826
|
+
ref: "input",
|
|
827
|
+
type: "text",
|
|
828
|
+
modelValue: _ctx.state.query,
|
|
829
|
+
"onUpdate:modelValue": _cache[27] || (_cache[27] = function($event) {
|
|
830
|
+
return _ctx.state.query = $event;
|
|
831
|
+
}),
|
|
832
|
+
placeholder: _ctx.placeholder,
|
|
833
|
+
onInput: _ctx.debouncedQueryChange,
|
|
834
|
+
onFocus: _ctx.handleFocus,
|
|
835
|
+
autofocus: ""
|
|
836
|
+
}, null, 8, ["modelValue", "placeholder", "onInput", "onFocus"])],
|
|
837
|
+
2
|
|
838
|
+
/* CLASS */
|
|
839
|
+
)) : createCommentVNode("v-if", true), _ctx.topCreate ? (openBlock(), createElementBlock("div", _hoisted_17, [createElementVNode("div", {
|
|
840
|
+
onClick: _cache[28] || (_cache[28] = function($event) {
|
|
841
|
+
return _ctx.$emit("top-create-click", $event);
|
|
842
|
+
})
|
|
843
|
+
}, [(openBlock(), createBlock(resolveDynamicComponent(((_ctx$state$designConf = _ctx.state.designConfig) == null ? void 0 : (_ctx$state$designConf2 = _ctx$state$designConf.icons) == null ? void 0 : _ctx$state$designConf2.addIcon) || "icon-add-circle"))), createElementVNode(
|
|
844
|
+
"span",
|
|
845
|
+
null,
|
|
846
|
+
toDisplayString(_ctx.topCreateText),
|
|
847
|
+
1
|
|
848
|
+
/* TEXT */
|
|
849
|
+
)])])) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "panel", {
|
|
850
|
+
methods: {
|
|
851
|
+
updateSelectedData: _ctx.updateSelectedData,
|
|
852
|
+
hidePanel: _ctx.hidePanel
|
|
853
|
+
}
|
|
854
|
+
}), _ctx.searchable ? (openBlock(), createBlock(_component_tiny_input, {
|
|
855
|
+
key: 2,
|
|
856
|
+
"input-box-type": "underline",
|
|
857
|
+
modelValue: _ctx.state.query,
|
|
858
|
+
"onUpdate:modelValue": [_cache[29] || (_cache[29] = function($event) {
|
|
859
|
+
return _ctx.state.query = $event;
|
|
860
|
+
}), _cache[30] || (_cache[30] = function($event) {
|
|
861
|
+
return _ctx.handleQueryChange(_ctx.state.query);
|
|
862
|
+
})],
|
|
863
|
+
placeholder: _ctx.t("ui.search.placeholder"),
|
|
864
|
+
class: "tiny-select-dropdown__search"
|
|
865
|
+
}, {
|
|
866
|
+
prefix: withCtx(function() {
|
|
867
|
+
return [createVNode(_component_icon_search, {
|
|
868
|
+
class: "tiny-select-dropdown__search-prefix"
|
|
869
|
+
})];
|
|
870
|
+
}),
|
|
871
|
+
suffix: withCtx(function() {
|
|
872
|
+
return [withDirectives(createElementVNode(
|
|
873
|
+
"span",
|
|
874
|
+
_hoisted_18,
|
|
875
|
+
[createVNode(_component_icon_close, {
|
|
876
|
+
onClick: _ctx.clearSearchText
|
|
877
|
+
}, null, 8, ["onClick"])],
|
|
878
|
+
512
|
|
879
|
+
/* NEED_PATCH */
|
|
880
|
+
), [[vShow, _ctx.state.query]]), createVNode(_component_icon_search, {
|
|
881
|
+
class: "tiny-select-dropdown__search-suffix"
|
|
882
|
+
})];
|
|
883
|
+
}),
|
|
884
|
+
_: 1
|
|
885
|
+
/* STABLE */
|
|
886
|
+
}, 8, ["modelValue", "placeholder"])) : createCommentVNode("v-if", true), _ctx.optimization ? (openBlock(), createElementBlock(
|
|
887
|
+
"div",
|
|
888
|
+
{
|
|
889
|
+
key: 3,
|
|
890
|
+
style: normalizeStyle({
|
|
891
|
+
height: _ctx.state.optimizeStore.recycleScrollerHeight + "px"
|
|
892
|
+
})
|
|
893
|
+
},
|
|
894
|
+
[withDirectives((openBlock(), createBlock(_component_tiny_recycle_scroller, {
|
|
895
|
+
ref: "scrollbar",
|
|
896
|
+
style: {
|
|
897
|
+
"height": "100%"
|
|
898
|
+
},
|
|
899
|
+
key: _ctx.state.magicKey,
|
|
900
|
+
"key-field": _ctx.valueField,
|
|
901
|
+
"list-class": ["tiny-select-dropdown__wrap"],
|
|
902
|
+
"item-class": ["tiny-select-dropdown__item-view"],
|
|
903
|
+
items: _ctx.state.datas,
|
|
904
|
+
"item-size": _ctx.state.optimizeOpts.optionHeight
|
|
905
|
+
}, {
|
|
906
|
+
before: withCtx(function() {
|
|
907
|
+
return [_ctx.state.showNewOption ? (openBlock(), createBlock(_component_tiny_option, {
|
|
908
|
+
key: 0,
|
|
909
|
+
value: _ctx.state.query,
|
|
910
|
+
created: ""
|
|
911
|
+
}, null, 8, ["value"])) : createCommentVNode("v-if", true)];
|
|
912
|
+
}),
|
|
913
|
+
default: withCtx(function(_ref2) {
|
|
914
|
+
var item = _ref2.item;
|
|
915
|
+
return [renderSlot(_ctx.$slots, "default", {
|
|
916
|
+
item
|
|
917
|
+
}, function() {
|
|
918
|
+
return [(openBlock(), createBlock(_component_tiny_option, {
|
|
919
|
+
key: "" + item[_ctx.valueField],
|
|
920
|
+
label: item[_ctx.textField],
|
|
921
|
+
value: item[_ctx.valueField],
|
|
922
|
+
disabled: item.disabled,
|
|
923
|
+
required: item.required,
|
|
924
|
+
"highlight-class": item._highlightClass,
|
|
925
|
+
events: item.events,
|
|
926
|
+
icon: item.icon,
|
|
927
|
+
onMousedown: _cache[31] || (_cache[31] = withModifiers(function() {
|
|
928
|
+
}, ["stop"]))
|
|
929
|
+
}, null, 8, ["label", "value", "disabled", "required", "highlight-class", "events", "icon"]))];
|
|
930
|
+
})];
|
|
931
|
+
}),
|
|
932
|
+
_: 3
|
|
933
|
+
/* FORWARDED */
|
|
934
|
+
}, 8, ["key-field", "items", "item-size"])), [[vShow, !_ctx.state.emptyFlag && !_ctx.loading]])],
|
|
935
|
+
4
|
|
936
|
+
/* STYLE */
|
|
937
|
+
)) : createCommentVNode("v-if", true), !_ctx.optimization ? withDirectives((openBlock(), createBlock(_component_tiny_scrollbar, {
|
|
938
|
+
key: 4,
|
|
939
|
+
ref: "scrollbar",
|
|
940
|
+
show: "",
|
|
941
|
+
tag: "ul",
|
|
942
|
+
"wrap-class": ["tiny-select-dropdown__wrap"],
|
|
943
|
+
"view-class": ["tiny-select-dropdown__list"],
|
|
944
|
+
onMousedown: _cache[39] || (_cache[39] = withModifiers(function() {
|
|
945
|
+
}, ["stop"])),
|
|
946
|
+
class: normalizeClass({
|
|
947
|
+
"is-empty": !_ctx.allowCreate && _ctx.state.query && _ctx.state.filteredOptionsCount === 0
|
|
948
|
+
})
|
|
949
|
+
}, {
|
|
950
|
+
default: withCtx(function() {
|
|
951
|
+
return [renderSlot(_ctx.$slots, "dropdown"), _ctx.multiple && _ctx.showCheck && _ctx.showAlloption && !_ctx.state.multipleLimit && !_ctx.state.query && !_ctx.remote ? (openBlock(), createElementBlock(
|
|
952
|
+
"li",
|
|
953
|
+
{
|
|
954
|
+
key: 0,
|
|
955
|
+
class: normalizeClass(["tiny-option tiny-select-dropdown__item", [{
|
|
956
|
+
hover: _ctx.state.hoverIndex === -9 && _ctx.state.selectCls !== "checked-sur"
|
|
957
|
+
}, {
|
|
958
|
+
"selected": _ctx.state.selectCls === "checked-sur"
|
|
959
|
+
}]]),
|
|
960
|
+
"data-tag": "tiny-option",
|
|
961
|
+
onClick: _cache[32] || (_cache[32] = withModifiers(function($event) {
|
|
962
|
+
return _ctx.toggleCheckAll(false);
|
|
963
|
+
}, ["stop"])),
|
|
964
|
+
onMousedown: _cache[33] || (_cache[33] = withModifiers(function() {
|
|
965
|
+
}, ["stop"])),
|
|
966
|
+
onMouseenter: _cache[34] || (_cache[34] = function($event) {
|
|
967
|
+
return _ctx.state.hoverIndex = -9;
|
|
968
|
+
})
|
|
969
|
+
},
|
|
970
|
+
[(openBlock(), createBlock(resolveDynamicComponent("icon-" + _ctx.state.selectCls), {
|
|
971
|
+
class: normalizeClass(["tiny-svg-size", _ctx.state.selectCls])
|
|
972
|
+
}, null, 8, ["class"])), createElementVNode(
|
|
973
|
+
"span",
|
|
974
|
+
null,
|
|
975
|
+
toDisplayString(_ctx.allText || _ctx.t("ui.base.all")),
|
|
976
|
+
1
|
|
977
|
+
/* TEXT */
|
|
978
|
+
)],
|
|
979
|
+
34
|
|
980
|
+
/* CLASS, NEED_HYDRATION */
|
|
981
|
+
)) : createCommentVNode("v-if", true), _ctx.multiple && _ctx.showCheck && _ctx.showAlloption && !_ctx.state.multipleLimit && _ctx.state.query && !_ctx.state.emptyText && !_ctx.remote ? (openBlock(), createElementBlock(
|
|
982
|
+
"li",
|
|
983
|
+
{
|
|
984
|
+
key: 1,
|
|
985
|
+
class: normalizeClass(["tiny-option tiny-select-dropdown__item", [{
|
|
986
|
+
hover: _ctx.state.hoverIndex === -9 && _ctx.state.filteredSelectCls !== "checked-sur"
|
|
987
|
+
}, {
|
|
988
|
+
"selected": _ctx.state.filteredSelectCls === "checked-sur"
|
|
989
|
+
}]]),
|
|
990
|
+
"data-tag": "tiny-option",
|
|
991
|
+
onClick: _cache[35] || (_cache[35] = withModifiers(function($event) {
|
|
992
|
+
return _ctx.toggleCheckAll(true);
|
|
993
|
+
}, ["stop"])),
|
|
994
|
+
onMousedown: _cache[36] || (_cache[36] = withModifiers(function() {
|
|
995
|
+
}, ["stop"])),
|
|
996
|
+
onMouseenter: _cache[37] || (_cache[37] = function($event) {
|
|
997
|
+
return _ctx.state.hoverIndex = -9;
|
|
998
|
+
})
|
|
999
|
+
},
|
|
1000
|
+
[(openBlock(), createBlock(resolveDynamicComponent("icon-" + _ctx.state.filteredSelectCls), {
|
|
1001
|
+
class: normalizeClass(["tiny-svg-size", _ctx.state.filteredSelectCls])
|
|
1002
|
+
}, null, 8, ["class"])), createElementVNode(
|
|
1003
|
+
"span",
|
|
1004
|
+
null,
|
|
1005
|
+
toDisplayString(_ctx.allText || _ctx.t("ui.base.all")),
|
|
1006
|
+
1
|
|
1007
|
+
/* TEXT */
|
|
1008
|
+
)],
|
|
1009
|
+
34
|
|
1010
|
+
/* CLASS, NEED_HYDRATION */
|
|
1011
|
+
)) : createCommentVNode("v-if", true), _ctx.state.showNewOption ? (openBlock(), createBlock(_component_tiny_option, {
|
|
1012
|
+
key: 2,
|
|
1013
|
+
value: _ctx.state.query,
|
|
1014
|
+
created: ""
|
|
1015
|
+
}, null, 8, ["value"])) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", {}, function() {
|
|
1016
|
+
return [(openBlock(true), createElementBlock(
|
|
1017
|
+
Fragment,
|
|
1018
|
+
null,
|
|
1019
|
+
renderList(_ctx.state.datas, function(item) {
|
|
1020
|
+
return openBlock(), createBlock(_component_tiny_option, {
|
|
1021
|
+
key: "" + item[_ctx.valueField],
|
|
1022
|
+
label: item[_ctx.textField],
|
|
1023
|
+
value: item[_ctx.valueField],
|
|
1024
|
+
disabled: item.disabled,
|
|
1025
|
+
required: item.required,
|
|
1026
|
+
"highlight-class": item._highlightClass,
|
|
1027
|
+
events: item.events,
|
|
1028
|
+
onMousedown: _cache[38] || (_cache[38] = withModifiers(function() {
|
|
1029
|
+
}, ["stop"])),
|
|
1030
|
+
icon: item.icon
|
|
1031
|
+
}, null, 8, ["label", "value", "disabled", "required", "highlight-class", "events", "icon"]);
|
|
1032
|
+
}),
|
|
1033
|
+
128
|
|
1034
|
+
/* KEYED_FRAGMENT */
|
|
1035
|
+
))];
|
|
1036
|
+
})];
|
|
1037
|
+
}),
|
|
1038
|
+
_: 3
|
|
1039
|
+
/* FORWARDED */
|
|
1040
|
+
}, 8, ["class"])), [[vShow, _ctx.state.options.length > 0 && !_ctx.loading]]) : createCommentVNode("v-if", true), !_ctx.slots.panel && _ctx.state.emptyText && (!_ctx.allowCreate || _ctx.loading || _ctx.allowCreate && _ctx.state.emptyFlag) ? (openBlock(), createElementBlock(
|
|
1041
|
+
Fragment,
|
|
1042
|
+
{
|
|
1043
|
+
key: 5
|
|
1044
|
+
},
|
|
1045
|
+
[_ctx.loadingText || _ctx.slots.empty ? (openBlock(), createElementBlock("div", _hoisted_19, [_ctx.slots.empty ? renderSlot(_ctx.$slots, "empty", {
|
|
1046
|
+
key: 0
|
|
1047
|
+
}) : _ctx.showEmptyImage ? (openBlock(), createElementBlock("span", _hoisted_20)) : (openBlock(), createElementBlock(
|
|
1048
|
+
"p",
|
|
1049
|
+
_hoisted_21,
|
|
1050
|
+
toDisplayString(_ctx.state.emptyText),
|
|
1051
|
+
1
|
|
1052
|
+
/* TEXT */
|
|
1053
|
+
))])) : (openBlock(), createElementBlock("div", _hoisted_22, [!_ctx.loading ? (openBlock(), createElementBlock(
|
|
1054
|
+
Fragment,
|
|
1055
|
+
{
|
|
1056
|
+
key: 0
|
|
1057
|
+
},
|
|
1058
|
+
[_ctx.showEmptyImage ? (openBlock(), createElementBlock("span", _hoisted_23)) : (openBlock(), createElementBlock(
|
|
1059
|
+
"span",
|
|
1060
|
+
_hoisted_24,
|
|
1061
|
+
toDisplayString(_ctx.state.emptyText),
|
|
1062
|
+
1
|
|
1063
|
+
/* TEXT */
|
|
1064
|
+
))],
|
|
1065
|
+
64
|
|
1066
|
+
/* STABLE_FRAGMENT */
|
|
1067
|
+
)) : (openBlock(), createElementBlock("svg", _hoisted_25, _hoisted_27))]))],
|
|
1068
|
+
64
|
|
1069
|
+
/* STABLE_FRAGMENT */
|
|
1070
|
+
)) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "footer")];
|
|
1071
|
+
}),
|
|
1072
|
+
_: 3
|
|
1073
|
+
/* FORWARDED */
|
|
1074
|
+
}, 8, ["is-drop-inherit-width", "placement", "append-to-body", "style", "popper-options"]), [[vShow, !_ctx.onCopying() && !_ctx.hideDrop && _ctx.state.visible && _ctx.state.emptyText !== false]])];
|
|
1075
|
+
}),
|
|
1076
|
+
_: 3
|
|
1077
|
+
/* FORWARDED */
|
|
1078
|
+
}, 8, ["onBeforeEnter", "onAfterLeave"])],
|
|
1079
|
+
6
|
|
1080
|
+
/* CLASS, STYLE */
|
|
1081
|
+
), _ctx.hoverExpand && !_ctx.state.isDisplayOnly ? (openBlock(), createElementBlock("div", _hoisted_28, _hoisted_30)) : createCommentVNode("v-if", true)],
|
|
1082
|
+
16
|
|
1083
|
+
/* FULL_PROPS */
|
|
1084
|
+
)), [[_directive_popover, void 0, "popover"], [_directive_clickoutside, _ctx.handleClose]]);
|
|
922
1085
|
}
|
|
923
|
-
var pc = /* @__PURE__ */
|
|
924
|
-
return __component__.exports;
|
|
925
|
-
}();
|
|
1086
|
+
var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
926
1087
|
|
|
927
1088
|
export { pc as default };
|