@opentinyvue/vue-base-select 2.22.0 → 3.22.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/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 normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
19
- var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
20
- if (render) {
21
- options.render = render;
22
- options.staticRenderFns = staticRenderFns;
23
- options._compiled = true;
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
- var hook;
26
- if (injectStyles) {
27
- hook = injectStyles;
28
- }
29
- if (hook) {
30
- if (options.functional) {
31
- options._injectStyles = hook;
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 __vue2_script = defineComponent({
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 render = function render2() {
193
- var _vm$state$designConfi, _vm$state$designConfi2;
194
- var _vm = this;
195
- var _h = _vm.$createElement;
196
- var _c = _vm._self._c || _h;
197
- return _c("div", _vm._b({
198
- directives: [{
199
- name: "popover",
200
- rawName: "v-popover:popover",
201
- arg: "popover"
202
- }, {
203
- name: "clickoutside",
204
- rawName: "v-clickoutside",
205
- value: _vm.handleClose,
206
- expression: "handleClose"
207
- }],
208
- ref: "select",
209
- staticClass: "tiny-base-select",
210
- class: [_vm.state.selectSize ? "tiny-base-select--" + _vm.state.selectSize : "", _vm.state.collapseTags ? "tiny-base-select__collapse-tags" : "", _vm.filterable ? "tiny-base-select__filterable" : "", _vm.multiple ? "tiny-base-select__multiple" : "", (_vm.state.inputHovering || _vm.state.visible) && !_vm.clickExpand ? "is-hover" : "", _vm.state.isDisplayOnly ? "is-display-only" : "", _vm.hoverExpand ? "is-hover-expand" : "", _vm.clickExpand ? "is-click-expand" : "", _vm.state.showCollapseTag ? "collapse-tag-clicked" : "", _vm.state.selectDisabled ? "is-disabled" : "", _vm.$parent.$attrs.class],
211
- on: {
212
- "mouseleave": function mouseleave($event) {
213
- if ($event.target !== $event.currentTarget) return null;
214
- return (function() {
215
- _vm.state.selectHover = false;
216
- _vm.state.inputHovering = false;
217
- }).apply(null, arguments);
218
- },
219
- "mouseenter": function mouseenter($event) {
220
- if ($event.target !== $event.currentTarget) return null;
221
- return (function() {
222
- _vm.state.selectHover = true;
223
- _vm.state.inputHovering = true;
224
- }).apply(null, arguments);
225
- },
226
- "click": _vm.toggleMenu
227
- }
228
- }, "div", _vm.a(_vm.$attrs, ["class", "style"], true), false), [_c("div", {
229
- ref: "tagsGroup",
230
- class: ["tiny-base-select__tags-group", {
231
- "is-expand": _vm.state.isExpand
232
- }],
233
- style: _vm.state.selectFiexd
234
- }, [_vm._t("reference", function() {
235
- return [_vm.shape === "filter" ? _c("tiny-filter-box", {
236
- ref: "reference",
237
- attrs: {
238
- "show-close": _vm.clearable,
239
- "placeholder": _vm.placeholder,
240
- "disabled": _vm.state.selectDisabled,
241
- "label": _vm.label,
242
- "tip": _vm.tip,
243
- "value": _vm.multiple ? _vm.state.selected.map(function(item) {
244
- return item.state ? item.state.currentLabel : item.currentLabel;
245
- }).join("; ") : _vm.state.selectedLabel,
246
- "drop-down-visible": _vm.state.visible,
247
- "blank": _vm.blank
248
- },
249
- on: {
250
- "click": _vm.toggleMenu
251
- }
252
- }) : _vm._e(), _vm.multiple && !_vm.state.isDisplayOnly && !_vm.shape ? _c("div", {
253
- ref: "tags",
254
- class: ["tiny-base-select__tags", {
255
- "is-showicon": _vm.slots.prefix,
256
- "not-selected": !_vm.state.selected.length
257
- }, {
258
- "is-show-tag": !_vm.state.isShowTagText
259
- }],
260
- style: _vm.state.tagsStyle
261
- }, [!_vm.state.isShowTagText ? _c("span", [_vm.collapseTags && _vm.state.selected.length ? _c("span", [_c("tiny-tag", {
262
- key: _vm.state.key,
263
- attrs: {
264
- "closable": !_vm.state.selectDisabled,
265
- "size": _vm.state.collapseTagSize,
266
- "hit": _vm.state.selected[0].state ? _vm.state.selected[0].state.hitState : _vm.state.selected[0].hitState,
267
- "type": _vm.state.getTagType,
268
- "disable-transitions": ""
269
- },
270
- on: {
271
- "close": function close($event) {
272
- return _vm.deleteTag($event, _vm.state.selected[0]);
273
- }
274
- }
275
- }, [_c("tiny-tooltip", {
276
- attrs: {
277
- "effect": "light",
278
- "placement": "top"
279
- },
280
- nativeOn: {
281
- "mouseenter": function mouseenter($event) {
282
- _vm.handleEnterTag($event, _vm.getValueKey(_vm.state.selected[0]));
283
- }
284
- },
285
- scopedSlots: _vm._u([{
286
- key: "content",
287
- fn: function fn() {
288
- return [_vm.state.tooltipContent[_vm.getValueKey(_vm.state.selected[0])] ? _c("span", [_vm._t("label", function() {
289
- return [_vm._v(" " + _vm._s(_vm.state.selected[0].state ? _vm.state.selected[0].state.currentLabel : _vm.state.selected[0].currentLabel) + " ")];
290
- }, {
291
- "item": _vm.getLabelSlotValue(_vm.state.selected[0])
292
- })], 2) : _vm._e()];
293
- },
294
- proxy: true
295
- }], null, true)
296
- }, [_c("span", {
297
- staticClass: "tiny-base-select__tags-text"
298
- }, [_vm._t("label", function() {
299
- return [_vm._v(_vm._s(_vm.state.selected[0].state ? _vm.state.selected[0].state.currentLabel : _vm.state.selected[0].currentLabel))];
300
- }, {
301
- "item": _vm.getLabelSlotValue(_vm.state.selected[0])
302
- })], 2)])], 1), _vm.state.selected.length > 1 ? _c("tiny-tag", {
303
- staticClass: "tiny-base-select__tags-number",
304
- attrs: {
305
- "closable": false,
306
- "size": _vm.state.collapseTagSize,
307
- "type": _vm.state.getTagType,
308
- "disable-transitions": ""
309
- }
310
- }, [_c("span", {
311
- staticClass: "tiny-base-select__tags-text"
312
- }, [_vm._v("+ " + _vm._s(_vm.state.selected.length - 1))])]) : _vm._e()], 1) : _vm._e(), !_vm.collapseTags ? _c("span", {
313
- ref: "tags-content"
314
- }, [_vm.showAllTextTag && _vm.state.selectCls === "checked-sur" ? _c("tiny-tag", {
315
- key: "tags-all-text-tag",
316
- attrs: {
317
- "type": _vm.state.getTagType,
318
- "data-tag": "tags-all-text-tag",
319
- "disabled": _vm.state.isDisabled,
320
- "closable": true,
321
- "size": _vm.state.collapseTagSize
322
- },
323
- on: {
324
- "close": function close($event) {
325
- return _vm.toggleCheckAll(false);
326
- }
327
- }
328
- }, [_vm._v(" " + _vm._s(_vm.allText || _vm.t("ui.base.all")) + " ")]) : [_vm.hoverExpand || _vm.clickExpand ? _c("tiny-tag", {
329
- key: "tags-collapse",
330
- class: ["tiny-base-select__tags-collapse", {
331
- "is-hidden": _vm.state.isHidden || _vm.state.isDisabled
332
- }],
333
- attrs: {
334
- "type": _vm.state.getTagType,
335
- "data-tag": "tags-collapse",
336
- "only-icon": "",
337
- "closable": false,
338
- "size": _vm.state.collapseTagSize
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
- on: {
341
- "click": function click($event) {
342
- return _vm.onClickCollapseTag($event);
343
- }
344
- }
345
- }, [_vm.hoverExpand ? [_vm._v(" + " + _vm._s(_vm.state.collapseTagsLength) + " ")] : _c("icon-ellipsis")], 2) : _vm._e(), _vm._l(_vm.state.selected, function(item, index) {
346
- return _c("tiny-tag", {
347
- key: _vm.getValueKey(item),
348
- class: {
349
- "not-visible": _vm.state.toHideIndex <= index && !_vm.state.isExpand,
350
- "is-required": item.required
351
- },
352
- attrs: {
353
- "closable": _vm.isTagClosable(item),
354
- "disabled": _vm.state.isDisabled || item.disabled,
355
- "size": _vm.state.collapseTagSize,
356
- "hit": item.state ? item.state.hitState : item.hitState,
357
- "type": _vm.state.getTagType,
358
- "disable-transitions": ""
359
- },
360
- on: {
361
- "close": function close($event) {
362
- return _vm.deleteTag($event, item);
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
- "item": _vm.getLabelSlotValue(item)
382
- })], 2)];
379
+ "is-show-tag": !_ctx.state.isShowTagText
380
+ }]),
381
+ style: normalizeStyle(_ctx.state.tagsStyle)
383
382
  },
384
- proxy: true
385
- } : null], null, true)
386
- }, [!_vm.state.visible && _vm.state.overflow === index ? _c("span", {
387
- staticClass: "tiny-base-select__tags-text"
388
- }, [_vm._v(" " + _vm._s(item.state ? item.state.currentLabel + "... " : item.currentLabel + "... ") + " ")]) : _c("span", {
389
- staticClass: "tiny-base-select__tags-text"
390
- }, [_vm._t("label", function() {
391
- return [_vm._v(" " + _vm._s(item.state ? item.state.currentLabel : item.currentLabel) + " ")];
392
- }, {
393
- "item": _vm.getLabelSlotValue(item)
394
- })], 2)])], 1);
395
- }), _vm.clickExpand && _vm.state.showCollapseTag ? _c("span", {
396
- staticClass: "tiny-base-select__collapse-text",
397
- on: {
398
- "click": function click($event) {
399
- return _vm.onClickCollapseTag($event);
400
- }
401
- }
402
- }, [_vm._v(" " + _vm._s(_vm.t("ui.select.collapse")) + " "), _c("icon-chevron-up")], 1) : _vm._e()]], 2) : _vm._e()]) : _c("span", {
403
- staticClass: "tiny-base-select__tags-text is-disabled"
404
- }, [_c("tiny-tooltip", {
405
- attrs: {
406
- "effect": "light",
407
- "placement": "top",
408
- "disabled": !_vm.showTips
409
- },
410
- scopedSlots: _vm._u([{
411
- key: "content",
412
- fn: function fn() {
413
- return [_c("div", {
414
- class: [_vm.state.showTips && "tiny-base-select__show-tips", "tiny-base-select__show-common"]
415
- }, [_vm.slots.label ? _c("span", _vm._l(_vm.state.selected, function(item) {
416
- return _c("span", {
417
- key: _vm.getValueKey(item)
418
- }, [_vm._t("label", null, {
419
- "item": item
420
- })], 2);
421
- }), 0) : _c("span", [_vm._v(_vm._s(_vm.disabledTooltipContent || _vm.state.disabledTooltipContent))])])];
422
- },
423
- proxy: true
424
- }], null, true)
425
- }, [_c("span", _vm._l(_vm.state.selected, function(item) {
426
- return _c("span", {
427
- key: item.value
428
- }, [_vm._t("label", function() {
429
- return [_vm._v(_vm._s(item.state ? item.state.currentLabel : item.currentLabel))];
430
- }, {
431
- "item": item
432
- }), _vm._v("; ")], 2);
433
- }), 0)])], 1), _c("input", {
434
- directives: [{
435
- name: "show",
436
- rawName: "v-show",
437
- value: _vm.filterable && !_vm.searchable && !_vm.state.selectDisabled,
438
- expression: "filterable && !searchable && !state.selectDisabled"
439
- }, {
440
- name: "model",
441
- rawName: "v-model",
442
- value: _vm.state.query,
443
- expression: "state.query"
444
- }],
445
- ref: "input",
446
- staticClass: "tiny-base-select__input",
447
- class: [_vm.state.selectSize ? "is-" + _vm.state.selectSize : ""],
448
- style: {
449
- "flex-grow": "1",
450
- width: _vm.state.inputLength / (_vm.state.inputWidth - 32) + "%",
451
- "max-width": _vm.state.inputWidth - 42 + "px",
452
- height: "auto"
453
- },
454
- attrs: {
455
- "type": "text",
456
- "disabled": _vm.state.selectDisabled,
457
- "autocomplete": _vm.autocomplete
458
- },
459
- domProps: {
460
- "value": _vm.state.query
461
- },
462
- on: {
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
- "not-reverse": !_vm.state.getIcon.isDefault
601
- }],
602
- on: {
603
- "click": _vm.handleDropdownClick
604
- }
605
- })];
606
- },
607
- proxy: true
608
- }], null, true),
609
- model: {
610
- value: _vm.state.selectedLabel,
611
- callback: function callback($$v) {
612
- _vm.$set(_vm.state, "selectedLabel", $$v);
613
- },
614
- expression: "state.selectedLabel"
615
- }
616
- }) : _vm._e()];
617
- }), _c("transition", {
618
- attrs: {
619
- "name": "tiny-zoom-in-top"
620
- },
621
- on: {
622
- "before-enter": _vm.handleMenuEnter,
623
- "after-leave": _vm.doDestroy
624
- }
625
- }, [_c("tiny-select-dropdown", {
626
- directives: [{
627
- name: "show",
628
- rawName: "v-show",
629
- value: !_vm.onCopying() && !_vm.hideDrop && _vm.state.visible && _vm.state.emptyText !== false,
630
- expression: "!onCopying() && !hideDrop && state.visible && state.emptyText !== false"
631
- }],
632
- ref: "popper",
633
- style: _vm.dropStyle,
634
- attrs: {
635
- "is-drop-inherit-width": _vm.isDropInheritWidth,
636
- "placement": _vm.placement,
637
- "append-to-body": _vm.popperAppendToBody,
638
- "popper-options": _vm.popperOptions
639
- }
640
- }, [_vm.shape && _vm.filterable ? _c("div", {
641
- staticClass: "tiny-base-select__filter-input",
642
- class: [_vm.remote && !_vm.state.options.length ? "tiny-base-select__remote-input" : ""]
643
- }, [_c("tiny-input", {
644
- ref: "input",
645
- attrs: {
646
- "type": "text",
647
- "placeholder": _vm.placeholder,
648
- "autofocus": ""
649
- },
650
- on: {
651
- "input": _vm.debouncedQueryChange,
652
- "focus": _vm.handleFocus
653
- },
654
- model: {
655
- value: _vm.state.query,
656
- callback: function callback($$v) {
657
- _vm.$set(_vm.state, "query", $$v);
658
- },
659
- expression: "state.query"
660
- }
661
- })], 1) : _vm._e(), _vm.topCreate ? _c("div", {
662
- staticClass: "tiny-select__top-create"
663
- }, [_c("div", {
664
- on: {
665
- "click": function click($event) {
666
- return _vm.$emit("top-create-click", $event);
667
- }
668
- }
669
- }, [_c(((_vm$state$designConfi = _vm.state.designConfig) === null || _vm$state$designConfi === void 0 ? void 0 : (_vm$state$designConfi2 = _vm$state$designConfi.icons) === null || _vm$state$designConfi2 === void 0 ? void 0 : _vm$state$designConfi2.addIcon) || "icon-add-circle", {
670
- tag: "component"
671
- }), _c("span", [_vm._v(_vm._s(_vm.topCreateText))])], 1)]) : _vm._e(), _vm._t("panel", null, {
672
- "methods": {
673
- updateSelectedData: _vm.updateSelectedData,
674
- hidePanel: _vm.hidePanel
675
- }
676
- }), _vm.searchable ? _c("tiny-input", {
677
- staticClass: "tiny-select-dropdown__search",
678
- attrs: {
679
- "input-box-type": "underline",
680
- "placeholder": _vm.t("ui.search.placeholder")
681
- },
682
- on: {
683
- "update:modelValue": function updateModelValue($event) {
684
- return _vm.handleQueryChange(_vm.state.query);
685
- }
686
- },
687
- scopedSlots: _vm._u([{
688
- key: "prefix",
689
- fn: function fn() {
690
- return [_c("icon-search", {
691
- staticClass: "tiny-select-dropdown__search-prefix"
692
- })];
693
- },
694
- proxy: true
695
- }, {
696
- key: "suffix",
697
- fn: function fn() {
698
- return [_c("span", {
699
- directives: [{
700
- name: "show",
701
- rawName: "v-show",
702
- value: _vm.state.query,
703
- expression: "state.query"
704
- }],
705
- staticClass: "tiny-icon-close"
706
- }, [_c("icon-close", {
707
- on: {
708
- "click": _vm.clearSearchText
709
- }
710
- })], 1), _c("icon-search", {
711
- staticClass: "tiny-select-dropdown__search-suffix"
712
- })];
713
- },
714
- proxy: true
715
- }], null, false, 2405204655),
716
- model: {
717
- value: _vm.state.query,
718
- callback: function callback($$v) {
719
- _vm.$set(_vm.state, "query", $$v);
720
- },
721
- expression: "state.query"
722
- }
723
- }) : _vm._e(), _vm.optimization ? [_c("div", {
724
- style: {
725
- height: _vm.state.optimizeStore.recycleScrollerHeight + "px"
726
- }
727
- }, [_c("tiny-recycle-scroller", {
728
- directives: [{
729
- name: "show",
730
- rawName: "v-show",
731
- value: !_vm.state.emptyFlag && !_vm.loading,
732
- expression: "!state.emptyFlag && !loading"
733
- }],
734
- key: _vm.state.magicKey,
735
- ref: "scrollbar",
736
- staticStyle: {
737
- "height": "100%"
738
- },
739
- attrs: {
740
- "key-field": _vm.valueField,
741
- "list-class": ["tiny-select-dropdown__wrap"],
742
- "item-class": ["tiny-select-dropdown__item-view"],
743
- "items": _vm.state.datas,
744
- "item-size": _vm.state.optimizeOpts.optionHeight
745
- },
746
- scopedSlots: _vm._u([{
747
- key: "before",
748
- fn: function fn() {
749
- return [_vm.state.showNewOption ? _c("tiny-option", {
750
- attrs: {
751
- "value": _vm.state.query,
752
- "created": ""
753
- }
754
- }) : _vm._e()];
755
- },
756
- proxy: true
757
- }, {
758
- key: "default",
759
- fn: function fn(_ref) {
760
- var item = _ref.item;
761
- return [_vm._t("default", function() {
762
- return [_c("tiny-option", {
763
- key: "" + item[_vm.valueField],
764
- attrs: {
765
- "label": item[_vm.textField],
766
- "value": item[_vm.valueField],
767
- "disabled": item.disabled,
768
- "required": item.required,
769
- "highlight-class": item._highlightClass,
770
- "events": item.events,
771
- "icon": item.icon
772
- },
773
- on: {
774
- "mousedown": function mousedown($event) {
775
- $event.stopPropagation();
776
- }
777
- }
778
- })];
779
- }, {
780
- "item": item
781
- })];
782
- }
783
- }], null, true)
784
- })], 1)] : _vm._e(), !_vm.optimization ? _c("tiny-scrollbar", {
785
- directives: [{
786
- name: "show",
787
- rawName: "v-show",
788
- value: _vm.state.options.length > 0 && !_vm.loading,
789
- expression: "state.options.length > 0 && !loading"
790
- }],
791
- ref: "scrollbar",
792
- class: {
793
- "is-empty": !_vm.allowCreate && _vm.state.query && _vm.state.filteredOptionsCount === 0
794
- },
795
- attrs: {
796
- "show": "",
797
- "tag": "ul",
798
- "wrap-class": ["tiny-select-dropdown__wrap"],
799
- "view-class": ["tiny-select-dropdown__list"]
800
- },
801
- on: {
802
- "mousedown": function mousedown($event) {
803
- $event.stopPropagation();
804
- }
805
- }
806
- }, [_vm._t("dropdown"), _vm.multiple && _vm.showCheck && _vm.showAlloption && !_vm.state.multipleLimit && !_vm.state.query && !_vm.remote ? _c("li", {
807
- staticClass: "tiny-option tiny-select-dropdown__item",
808
- class: [{
809
- hover: _vm.state.hoverIndex === -9 && _vm.state.selectCls !== "checked-sur"
810
- }, {
811
- "selected": _vm.state.selectCls === "checked-sur"
812
- }],
813
- attrs: {
814
- "data-tag": "tiny-option"
815
- },
816
- on: {
817
- "click": function click($event) {
818
- $event.stopPropagation();
819
- return _vm.toggleCheckAll(false);
820
- },
821
- "mousedown": function mousedown($event) {
822
- $event.stopPropagation();
823
- },
824
- "mouseenter": function mouseenter($event) {
825
- _vm.state.hoverIndex = -9;
826
- }
827
- }
828
- }, [_c("icon-" + _vm.state.selectCls, {
829
- tag: "component",
830
- class: ["tiny-svg-size", _vm.state.selectCls]
831
- }), _c("span", [_vm._v(_vm._s(_vm.allText || _vm.t("ui.base.all")))])], 1) : _vm._e(), _vm.multiple && _vm.showCheck && _vm.showAlloption && !_vm.state.multipleLimit && _vm.state.query && !_vm.state.emptyText && !_vm.remote ? _c("li", {
832
- staticClass: "tiny-option tiny-select-dropdown__item",
833
- class: [{
834
- hover: _vm.state.hoverIndex === -9 && _vm.state.filteredSelectCls !== "checked-sur"
835
- }, {
836
- "selected": _vm.state.filteredSelectCls === "checked-sur"
837
- }],
838
- attrs: {
839
- "data-tag": "tiny-option"
840
- },
841
- on: {
842
- "click": function click($event) {
843
- $event.stopPropagation();
844
- return _vm.toggleCheckAll(true);
845
- },
846
- "mousedown": function mousedown($event) {
847
- $event.stopPropagation();
848
- },
849
- "mouseenter": function mouseenter($event) {
850
- _vm.state.hoverIndex = -9;
851
- }
852
- }
853
- }, [_c("icon-" + _vm.state.filteredSelectCls, {
854
- tag: "component",
855
- class: ["tiny-svg-size", _vm.state.filteredSelectCls]
856
- }), _c("span", [_vm._v(_vm._s(_vm.allText || _vm.t("ui.base.all")))])], 1) : _vm._e(), _vm.state.showNewOption ? _c("tiny-option", {
857
- attrs: {
858
- "value": _vm.state.query,
859
- "created": ""
860
- }
861
- }) : _vm._e(), _vm._t("default", function() {
862
- return _vm._l(_vm.state.datas, function(item) {
863
- return _c("tiny-option", {
864
- key: "" + item[_vm.valueField],
865
- attrs: {
866
- "label": item[_vm.textField],
867
- "value": item[_vm.valueField],
868
- "disabled": item.disabled,
869
- "required": item.required,
870
- "highlight-class": item._highlightClass,
871
- "events": item.events,
872
- "icon": item.icon
873
- },
874
- on: {
875
- "mousedown": function mousedown($event) {
876
- $event.stopPropagation();
877
- }
878
- }
879
- });
880
- });
881
- })], 2) : _vm._e(), !_vm.slots.panel && _vm.state.emptyText && (!_vm.allowCreate || _vm.loading || _vm.allowCreate && _vm.state.emptyFlag) ? [_vm.loadingText || _vm.slots.empty ? _c("div", {
882
- staticClass: "tiny-select-dropdown__empty-wrap"
883
- }, [_vm.slots.empty ? _vm._t("empty") : _vm.showEmptyImage ? _c("span", {
884
- staticClass: "tiny-select-dropdown__empty-images"
885
- }) : _c("p", {
886
- staticClass: "tiny-select-dropdown__empty"
887
- }, [_vm._v(" " + _vm._s(_vm.state.emptyText) + " ")])], 2) : _c("div", {
888
- staticClass: "tiny-select-dropdown__loading"
889
- }, [!_vm.loading ? [_vm.showEmptyImage ? _c("span", {
890
- staticClass: "tiny-select-dropdown__empty-images"
891
- }) : _c("span", {
892
- staticClass: "tiny-select-dropdown__empty"
893
- }, [_vm._v(" " + _vm._s(_vm.state.emptyText))])] : _c("svg", {
894
- staticClass: "circular",
895
- attrs: {
896
- "viewBox": "25 25 50 50"
897
- }
898
- }, [_c("circle", {
899
- staticClass: "path",
900
- attrs: {
901
- "cx": "50",
902
- "cy": "50",
903
- "r": "24",
904
- "fill": "none"
905
- }
906
- })])], 2)] : _vm._e(), _vm._t("footer")], 2)], 1)], 2), _vm.hoverExpand && !_vm.state.isDisplayOnly ? _c("div", {
907
- staticClass: "tiny-base-select__placeholder"
908
- }, [_c("input", {
909
- staticClass: "tiny-input__inner",
910
- attrs: {
911
- "disabled": ""
912
- }
913
- })]) : _vm._e()]);
914
- };
915
- var staticRenderFns = [];
916
- var __cssModules = {};
917
- var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
918
- function __vue2_injectStyles(context) {
919
- for (var o in __cssModules) {
920
- this[o] = __cssModules[o];
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__ */ function() {
924
- return __component__.exports;
925
- }();
1086
+ var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
926
1087
 
927
1088
  export { pc as default };