@opentinyvue/vue-base-select 3.26.0 → 3.28.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 +31 -8
- package/lib/mobile-first.js +248 -203
- package/lib/pc.js +171 -182
- package/package.json +18 -18
- package/src/index.d.ts +59 -6
- package/src/mobile-first.vue.d.ts +32 -13
- package/src/pc.vue.d.ts +18 -3
package/lib/pc.js
CHANGED
|
@@ -6,15 +6,14 @@ import Option from '@opentinyvue/vue-option';
|
|
|
6
6
|
import Scrollbar from '@opentinyvue/vue-scrollbar';
|
|
7
7
|
import SelectDropdown from '@opentinyvue/vue-select-dropdown';
|
|
8
8
|
import Button from '@opentinyvue/vue-button';
|
|
9
|
-
import { Clickoutside } from '@opentinyvue/vue-directive';
|
|
10
|
-
import {
|
|
9
|
+
import { Clickoutside, AutoTip } from '@opentinyvue/vue-directive';
|
|
10
|
+
import { iconClose, iconCopy, iconAddCircle, iconLoadingShadow, iconHalfselect, iconCheck, iconCheckedSur, iconSearch, iconDownWard, iconEllipsis, iconChevronUp } from '@opentinyvue/vue-icon';
|
|
11
11
|
import Tooltip from '@opentinyvue/vue-tooltip';
|
|
12
12
|
import FilterBox from '@opentinyvue/vue-filter-box';
|
|
13
13
|
import RecycleScroller from '@opentinyvue/vue-recycle-scroller';
|
|
14
|
-
import Checkbox from '@opentinyvue/vue-checkbox';
|
|
15
14
|
import '@opentinyvue/vue-theme/select/index.css';
|
|
16
15
|
import '@opentinyvue/vue-theme/base-select/index.css';
|
|
17
|
-
import { resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, mergeProps, withModifiers,
|
|
16
|
+
import { resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, mergeProps, withModifiers, normalizeStyle, normalizeClass, renderSlot, createBlock, createCommentVNode, withCtx, createVNode, createTextVNode, toDisplayString, createElementVNode, Fragment, renderList, createSlots, withKeys, vShow, vModelText, resolveDynamicComponent, Transition } from 'vue';
|
|
18
17
|
|
|
19
18
|
function _createForOfIteratorHelperLoose(r, e) {
|
|
20
19
|
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
@@ -65,6 +64,7 @@ var _sfc_main = defineComponent({
|
|
|
65
64
|
emits: ["update:modelValue", "change", "focus", "blur", "clear", "remove-tag", "visible-change", "handleDropdownClick", "dropdown-click", "top-create-click"],
|
|
66
65
|
directives: directive({
|
|
67
66
|
Clickoutside,
|
|
67
|
+
AutoTip,
|
|
68
68
|
popover: {
|
|
69
69
|
bind: function bind(el, binding, vnode) {
|
|
70
70
|
getReference(el, binding, vnode);
|
|
@@ -79,25 +79,24 @@ var _sfc_main = defineComponent({
|
|
|
79
79
|
TinyInput: Input,
|
|
80
80
|
TinyOption: Option,
|
|
81
81
|
TinyButton: Button,
|
|
82
|
-
IconClose:
|
|
82
|
+
IconClose: iconClose(),
|
|
83
83
|
TinyScrollbar: Scrollbar,
|
|
84
|
-
IconCopy:
|
|
84
|
+
IconCopy: iconCopy(),
|
|
85
85
|
IconAddCircle: iconAddCircle(),
|
|
86
86
|
IconLoadingShadow: iconLoadingShadow(),
|
|
87
87
|
TinySelectDropdown: SelectDropdown,
|
|
88
|
-
IconHalfselect:
|
|
89
|
-
IconCheck:
|
|
90
|
-
IconCheckedSur:
|
|
88
|
+
IconHalfselect: iconHalfselect(),
|
|
89
|
+
IconCheck: iconCheck(),
|
|
90
|
+
IconCheckedSur: iconCheckedSur(),
|
|
91
91
|
TinyFilterBox: FilterBox,
|
|
92
92
|
TinyTooltip: Tooltip,
|
|
93
93
|
TinyRecycleScroller: RecycleScroller,
|
|
94
94
|
// tiny 新增,
|
|
95
|
-
IconSearch:
|
|
96
|
-
|
|
95
|
+
IconSearch: iconSearch(),
|
|
96
|
+
IconDownWard: iconDownWard(),
|
|
97
97
|
// 默认下拉图标
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
IconChevronUp: IconChevronUp()
|
|
98
|
+
IconEllipsis: iconEllipsis(),
|
|
99
|
+
IconChevronUp: iconChevronUp()
|
|
101
100
|
},
|
|
102
101
|
props: [].concat(props, [
|
|
103
102
|
"id",
|
|
@@ -170,7 +169,11 @@ var _sfc_main = defineComponent({
|
|
|
170
169
|
"topCreate",
|
|
171
170
|
"topCreateText",
|
|
172
171
|
"keepFocus",
|
|
172
|
+
"initLabel",
|
|
173
173
|
"blank",
|
|
174
|
+
"tooltipConfig",
|
|
175
|
+
"showEmptyValue",
|
|
176
|
+
"stopPropagation",
|
|
174
177
|
// 以下为 tiny 新增
|
|
175
178
|
"searchable",
|
|
176
179
|
"showEmptyImage",
|
|
@@ -182,7 +185,8 @@ var _sfc_main = defineComponent({
|
|
|
182
185
|
"clickExpand",
|
|
183
186
|
"maxVisibleRows",
|
|
184
187
|
"showAllTextTag",
|
|
185
|
-
"allText"
|
|
188
|
+
"allText",
|
|
189
|
+
"maxTagWidth"
|
|
186
190
|
]),
|
|
187
191
|
setup: function setup$1(props2, context) {
|
|
188
192
|
return setup({
|
|
@@ -226,80 +230,65 @@ var _hoisted_9 = {
|
|
|
226
230
|
var _hoisted_10 = {
|
|
227
231
|
key: 1
|
|
228
232
|
};
|
|
229
|
-
var _hoisted_11 =
|
|
230
|
-
key: 1,
|
|
231
|
-
class: "tiny-base-select__tags-text is-disabled"
|
|
232
|
-
};
|
|
233
|
+
var _hoisted_11 = ["disabled", "autocomplete"];
|
|
233
234
|
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
235
|
key: 0,
|
|
242
236
|
class: "tiny-base-select__limit-txt"
|
|
243
237
|
};
|
|
244
|
-
var
|
|
238
|
+
var _hoisted_13 = {
|
|
245
239
|
key: 1,
|
|
246
240
|
class: "tiny-base-select__proportion-txt"
|
|
247
241
|
};
|
|
248
|
-
var
|
|
242
|
+
var _hoisted_14 = {
|
|
249
243
|
key: 1,
|
|
250
244
|
class: "tiny-select__top-create"
|
|
251
245
|
};
|
|
252
|
-
var
|
|
246
|
+
var _hoisted_15 = {
|
|
253
247
|
class: "tiny-icon-close"
|
|
254
248
|
};
|
|
249
|
+
var _hoisted_16 = {
|
|
250
|
+
class: "tiny-option__checkbox-wrap tiny-select-dropdown__item-checkbox"
|
|
251
|
+
};
|
|
252
|
+
var _hoisted_17 = {
|
|
253
|
+
class: "tiny-option-wrapper calc-width"
|
|
254
|
+
};
|
|
255
|
+
var _hoisted_18 = {
|
|
256
|
+
class: "tiny-option-label"
|
|
257
|
+
};
|
|
255
258
|
var _hoisted_19 = {
|
|
256
|
-
|
|
257
|
-
class: "tiny-select-dropdown__empty-wrap"
|
|
259
|
+
class: "tiny-option__checkbox-wrap tiny-select-dropdown__item-checkbox"
|
|
258
260
|
};
|
|
259
261
|
var _hoisted_20 = {
|
|
260
|
-
|
|
261
|
-
class: "tiny-select-dropdown__empty-images"
|
|
262
|
+
class: "tiny-option-wrapper calc-width"
|
|
262
263
|
};
|
|
263
264
|
var _hoisted_21 = {
|
|
264
|
-
|
|
265
|
-
class: "tiny-select-dropdown__empty"
|
|
265
|
+
class: "tiny-option-label"
|
|
266
266
|
};
|
|
267
267
|
var _hoisted_22 = {
|
|
268
|
-
key:
|
|
269
|
-
class: "tiny-select-
|
|
268
|
+
key: 0,
|
|
269
|
+
class: "tiny-select-dropdown__empty-wrap"
|
|
270
270
|
};
|
|
271
271
|
var _hoisted_23 = {
|
|
272
|
-
key:
|
|
272
|
+
key: 1,
|
|
273
273
|
class: "tiny-select-dropdown__empty-images"
|
|
274
274
|
};
|
|
275
275
|
var _hoisted_24 = {
|
|
276
|
-
key:
|
|
276
|
+
key: 2,
|
|
277
277
|
class: "tiny-select-dropdown__empty"
|
|
278
278
|
};
|
|
279
279
|
var _hoisted_25 = {
|
|
280
|
+
key: 0,
|
|
281
|
+
class: "tiny-select-dropdown__empty-images"
|
|
282
|
+
};
|
|
283
|
+
var _hoisted_26 = {
|
|
280
284
|
key: 1,
|
|
281
|
-
class: "
|
|
282
|
-
viewBox: "25 25 50 50"
|
|
285
|
+
class: "tiny-select-dropdown__empty"
|
|
283
286
|
};
|
|
284
|
-
var
|
|
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 = {
|
|
287
|
+
var _hoisted_27 = {
|
|
299
288
|
key: 0,
|
|
300
289
|
class: "tiny-base-select__placeholder"
|
|
301
290
|
};
|
|
302
|
-
var
|
|
291
|
+
var _hoisted_28 = /* @__PURE__ */ createElementVNode(
|
|
303
292
|
"input",
|
|
304
293
|
{
|
|
305
294
|
class: "tiny-input__inner",
|
|
@@ -309,7 +298,7 @@ var _hoisted_29 = /* @__PURE__ */ createElementVNode(
|
|
|
309
298
|
-1
|
|
310
299
|
/* HOISTED */
|
|
311
300
|
);
|
|
312
|
-
var
|
|
301
|
+
var _hoisted_29 = [_hoisted_28];
|
|
313
302
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
314
303
|
var _component_tiny_filter_box = resolveComponent("tiny-filter-box");
|
|
315
304
|
var _component_tiny_tooltip = resolveComponent("tiny-tooltip");
|
|
@@ -324,26 +313,26 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
324
313
|
var _component_tiny_recycle_scroller = resolveComponent("tiny-recycle-scroller");
|
|
325
314
|
var _component_tiny_scrollbar = resolveComponent("tiny-scrollbar");
|
|
326
315
|
var _component_tiny_select_dropdown = resolveComponent("tiny-select-dropdown");
|
|
316
|
+
var _directive_auto_tip = resolveDirective("auto-tip");
|
|
327
317
|
var _directive_popover = resolveDirective("popover");
|
|
328
318
|
var _directive_clickoutside = resolveDirective("clickoutside");
|
|
329
319
|
return withDirectives((openBlock(), createElementBlock(
|
|
330
320
|
"div",
|
|
331
321
|
mergeProps({
|
|
332
322
|
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.
|
|
323
|
+
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.isDisabled ? "is-disabled" : "", _ctx.$parent.$attrs.class]],
|
|
334
324
|
onMouseleave: _cache[40] || (_cache[40] = withModifiers(function() {
|
|
335
325
|
_ctx.state.selectHover = false;
|
|
336
326
|
_ctx.state.inputHovering = false;
|
|
337
327
|
}, ["self"])),
|
|
338
328
|
onMouseenter: _cache[41] || (_cache[41] = withModifiers(function() {
|
|
339
|
-
_ctx.
|
|
340
|
-
_ctx.state.inputHovering = true;
|
|
329
|
+
return _ctx.onMouseenterSelf && _ctx.onMouseenterSelf.apply(_ctx, arguments);
|
|
341
330
|
}, ["self"])),
|
|
342
331
|
onClick: _cache[42] || (_cache[42] = function() {
|
|
343
332
|
return _ctx.toggleMenu && _ctx.toggleMenu.apply(_ctx, arguments);
|
|
344
333
|
})
|
|
345
334
|
}, _ctx.a(_ctx.$attrs, ["class", "style"], true)),
|
|
346
|
-
[
|
|
335
|
+
[withDirectives((openBlock(), createElementBlock(
|
|
347
336
|
"div",
|
|
348
337
|
{
|
|
349
338
|
ref: "tagsGroup",
|
|
@@ -381,20 +370,26 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
381
370
|
style: normalizeStyle(_ctx.state.tagsStyle)
|
|
382
371
|
},
|
|
383
372
|
[!_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
|
-
|
|
373
|
+
class: normalizeClass({
|
|
374
|
+
"is-required": _ctx.state.selected[0].required
|
|
375
|
+
}),
|
|
376
|
+
closable: _ctx.isTagClosable(_ctx.state.selected[0]),
|
|
385
377
|
size: _ctx.state.collapseTagSize,
|
|
386
378
|
hit: _ctx.state.selected[0].state ? _ctx.state.selected[0].state.hitState : _ctx.state.selected[0].hitState,
|
|
387
379
|
key: _ctx.state.key,
|
|
380
|
+
disabled: _ctx.state.selected[0].disabled || _ctx.state.isDisabled,
|
|
388
381
|
type: _ctx.state.getTagType,
|
|
389
382
|
onClose: _cache[1] || (_cache[1] = function($event) {
|
|
390
383
|
return _ctx.deleteTag($event, _ctx.state.selected[0]);
|
|
391
384
|
}),
|
|
392
|
-
"disable-transitions": ""
|
|
385
|
+
"disable-transitions": "",
|
|
386
|
+
maxWidth: _ctx.maxTagWidth
|
|
393
387
|
}, {
|
|
394
388
|
default: withCtx(function() {
|
|
395
389
|
return [createVNode(_component_tiny_tooltip, {
|
|
396
|
-
effect: "light",
|
|
397
|
-
placement: "top",
|
|
390
|
+
effect: _ctx.tooltipConfig.effect || "light",
|
|
391
|
+
placement: _ctx.tooltipConfig.placement || "top",
|
|
392
|
+
"popper-class": _ctx.tooltipConfig.popperClass || "",
|
|
398
393
|
onMouseenter: _cache[0] || (_cache[0] = function($event) {
|
|
399
394
|
return _ctx.handleEnterTag($event, _ctx.getValueKey(_ctx.state.selected[0]));
|
|
400
395
|
})
|
|
@@ -423,17 +418,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
423
418
|
}),
|
|
424
419
|
_: 3
|
|
425
420
|
/* FORWARDED */
|
|
426
|
-
})];
|
|
421
|
+
}, 8, ["effect", "placement", "popper-class"])];
|
|
427
422
|
}),
|
|
428
423
|
_: 3
|
|
429
424
|
/* FORWARDED */
|
|
430
|
-
}, 8, ["closable", "size", "hit", "type"])), _ctx.state.selected.length > 1 ? (openBlock(), createBlock(_component_tiny_tag, {
|
|
425
|
+
}, 8, ["class", "closable", "size", "hit", "disabled", "type", "maxWidth"])), _ctx.state.selected.length > 1 ? (openBlock(), createBlock(_component_tiny_tag, {
|
|
431
426
|
key: 0,
|
|
432
427
|
closable: false,
|
|
433
428
|
size: _ctx.state.collapseTagSize,
|
|
434
429
|
type: _ctx.state.getTagType,
|
|
430
|
+
disabled: _ctx.state.isDisabled,
|
|
435
431
|
"disable-transitions": "",
|
|
436
|
-
class: "tiny-base-select__tags-number"
|
|
432
|
+
class: "tiny-base-select__tags-number",
|
|
433
|
+
maxWidth: _ctx.maxTagWidth
|
|
437
434
|
}, {
|
|
438
435
|
default: withCtx(function() {
|
|
439
436
|
return [createElementVNode(
|
|
@@ -446,7 +443,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
446
443
|
}),
|
|
447
444
|
_: 1
|
|
448
445
|
/* STABLE */
|
|
449
|
-
}, 8, ["size", "type"])) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true), !_ctx.collapseTags ? (openBlock(), createElementBlock(
|
|
446
|
+
}, 8, ["size", "type", "disabled", "maxWidth"])) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true), !_ctx.collapseTags ? (openBlock(), createElementBlock(
|
|
450
447
|
"span",
|
|
451
448
|
_hoisted_6,
|
|
452
449
|
[_ctx.showAllTextTag && _ctx.state.selectCls === "checked-sur" ? (openBlock(), createBlock(_component_tiny_tag, {
|
|
@@ -458,7 +455,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
458
455
|
size: _ctx.state.collapseTagSize,
|
|
459
456
|
onClose: _cache[2] || (_cache[2] = function($event) {
|
|
460
457
|
return _ctx.toggleCheckAll(false);
|
|
461
|
-
})
|
|
458
|
+
}),
|
|
459
|
+
maxWidth: _ctx.maxTagWidth
|
|
462
460
|
}, {
|
|
463
461
|
default: withCtx(function() {
|
|
464
462
|
return [createTextVNode(
|
|
@@ -469,24 +467,25 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
469
467
|
}),
|
|
470
468
|
_: 1
|
|
471
469
|
/* STABLE */
|
|
472
|
-
}, 8, ["type", "disabled", "size"])) : (openBlock(), createElementBlock(
|
|
470
|
+
}, 8, ["type", "disabled", "size", "maxWidth"])) : (openBlock(), createElementBlock(
|
|
473
471
|
Fragment,
|
|
474
472
|
{
|
|
475
473
|
key: 1
|
|
476
474
|
},
|
|
477
|
-
[_ctx.hoverExpand || _ctx.clickExpand ? (openBlock(), createBlock(_component_tiny_tag, {
|
|
478
|
-
class: normalizeClass(["tiny-base-select__tags-collapse", {
|
|
475
|
+
[_ctx.hoverExpand || _ctx.clickExpand && !_ctx.state.showCollapseTag ? (openBlock(), createBlock(_component_tiny_tag, {
|
|
476
|
+
class: normalizeClass(["tiny-base-select__tags-collapse", "cursor-pointer", {
|
|
479
477
|
"is-hidden": _ctx.state.isHidden || _ctx.state.isDisabled
|
|
480
478
|
}]),
|
|
481
479
|
type: _ctx.state.getTagType,
|
|
482
480
|
key: "tags-collapse",
|
|
483
481
|
"data-tag": "tags-collapse",
|
|
484
|
-
"only-icon":
|
|
482
|
+
"only-icon": !_ctx.hoverExpand,
|
|
485
483
|
closable: false,
|
|
486
484
|
size: _ctx.state.collapseTagSize,
|
|
487
485
|
onClick: _cache[3] || (_cache[3] = function($event) {
|
|
488
486
|
return _ctx.onClickCollapseTag($event);
|
|
489
|
-
})
|
|
487
|
+
}),
|
|
488
|
+
maxWidth: _ctx.maxTagWidth
|
|
490
489
|
}, {
|
|
491
490
|
default: withCtx(function() {
|
|
492
491
|
return [_ctx.hoverExpand ? (openBlock(), createElementBlock(
|
|
@@ -507,7 +506,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
507
506
|
}),
|
|
508
507
|
_: 1
|
|
509
508
|
/* STABLE */
|
|
510
|
-
}, 8, ["class", "type", "size"])) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(
|
|
509
|
+
}, 8, ["class", "type", "only-icon", "size", "maxWidth"])) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(
|
|
511
510
|
Fragment,
|
|
512
511
|
null,
|
|
513
512
|
renderList(_ctx.state.selected, function(item, index) {
|
|
@@ -525,12 +524,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
525
524
|
onClose: function onClose($event) {
|
|
526
525
|
return _ctx.deleteTag($event, item);
|
|
527
526
|
},
|
|
528
|
-
"disable-transitions": ""
|
|
527
|
+
"disable-transitions": "",
|
|
528
|
+
maxWidth: _ctx.maxTagWidth
|
|
529
529
|
}, {
|
|
530
530
|
default: withCtx(function() {
|
|
531
531
|
return [createVNode(_component_tiny_tooltip, {
|
|
532
|
-
effect: "light",
|
|
533
|
-
placement: "top",
|
|
532
|
+
effect: _ctx.tooltipConfig.effect || "light",
|
|
533
|
+
placement: _ctx.tooltipConfig.placement || "top",
|
|
534
|
+
"popper-class": _ctx.tooltipConfig.popperClass || "",
|
|
534
535
|
onMouseenter: function onMouseenter($event) {
|
|
535
536
|
return _ctx.handleEnterTag($event, _ctx.getValueKey(item));
|
|
536
537
|
}
|
|
@@ -574,11 +575,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
574
575
|
})]))];
|
|
575
576
|
}),
|
|
576
577
|
key: "0"
|
|
577
|
-
} : void 0]), 1032, ["onMouseenter"])];
|
|
578
|
+
} : void 0]), 1032, ["effect", "placement", "popper-class", "onMouseenter"])];
|
|
578
579
|
}),
|
|
579
580
|
_: 2
|
|
580
581
|
/* DYNAMIC */
|
|
581
|
-
}, 1032, ["class", "closable", "disabled", "size", "hit", "type", "onClose"]);
|
|
582
|
+
}, 1032, ["class", "closable", "disabled", "size", "hit", "type", "onClose", "maxWidth"]);
|
|
582
583
|
}),
|
|
583
584
|
128
|
|
584
585
|
/* KEYED_FRAGMENT */
|
|
@@ -598,64 +599,36 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
598
599
|
))],
|
|
599
600
|
512
|
|
600
601
|
/* NEED_PATCH */
|
|
601
|
-
)) : createCommentVNode("v-if", true)])) : (openBlock(), createElementBlock(
|
|
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
|
-
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", {
|
|
602
|
+
)) : createCommentVNode("v-if", true)])) : (openBlock(), createElementBlock(
|
|
603
|
+
"span",
|
|
604
|
+
{
|
|
605
|
+
key: 1,
|
|
606
|
+
class: normalizeClass(["tiny-base-select__tags-text", "is-display-only", {
|
|
607
|
+
"is-disabled": _ctx.state.isDisabled
|
|
608
|
+
}])
|
|
609
|
+
},
|
|
610
|
+
[createElementVNode("span", null, [(openBlock(true), createElementBlock(
|
|
611
|
+
Fragment,
|
|
612
|
+
null,
|
|
613
|
+
renderList(_ctx.state.selected, function(item) {
|
|
614
|
+
return openBlock(), createElementBlock("span", {
|
|
615
|
+
key: item.value
|
|
616
|
+
}, [renderSlot(_ctx.$slots, "label", {
|
|
617
|
+
item
|
|
618
|
+
}, function() {
|
|
619
|
+
return [createTextVNode(
|
|
620
|
+
toDisplayString(item.state ? item.state.currentLabel : item.currentLabel),
|
|
621
|
+
1
|
|
622
|
+
/* TEXT */
|
|
623
|
+
)];
|
|
624
|
+
}), createTextVNode("; ")]);
|
|
625
|
+
}),
|
|
626
|
+
128
|
|
627
|
+
/* KEYED_FRAGMENT */
|
|
628
|
+
))])],
|
|
629
|
+
2
|
|
630
|
+
/* CLASS */
|
|
631
|
+
)), withDirectives(createElementVNode("input", {
|
|
659
632
|
ref: "input",
|
|
660
633
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = function($event) {
|
|
661
634
|
return _ctx.state.query = $event;
|
|
@@ -702,11 +675,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
702
675
|
}),
|
|
703
676
|
style: normalizeStyle({
|
|
704
677
|
"flex-grow": "1",
|
|
705
|
-
width: _ctx.state.inputLength / (_ctx.state.inputWidth - 32) + "%",
|
|
706
|
-
"max-width": _ctx.state.inputWidth - 42 + "px",
|
|
678
|
+
width: _ctx.state.inputWidth > 0 ? _ctx.state.inputLength / (_ctx.state.inputWidth - 32) + "%" : "auto",
|
|
679
|
+
"max-width": _ctx.state.inputWidth > 0 ? _ctx.state.inputWidth - 42 + "px" : "none",
|
|
707
680
|
height: "auto"
|
|
708
681
|
})
|
|
709
|
-
}, null, 46,
|
|
682
|
+
}, null, 46, _hoisted_11), [[vShow, _ctx.filterable && !_ctx.searchable && !_ctx.state.selectDisabled], [vModelText, _ctx.state.query]])],
|
|
710
683
|
6
|
|
711
684
|
/* CLASS, STYLE */
|
|
712
685
|
)) : createCommentVNode("v-if", true), !_ctx.shape ? (openBlock(), createBlock(_component_tiny_input, {
|
|
@@ -723,17 +696,21 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
723
696
|
id: _ctx.id,
|
|
724
697
|
autocomplete: _ctx.autocomplete,
|
|
725
698
|
size: _ctx.state.selectSize,
|
|
699
|
+
showTooltip: false,
|
|
726
700
|
disabled: _ctx.state.selectDisabled,
|
|
727
701
|
readonly: _ctx.state.readonly,
|
|
728
702
|
"display-only": _ctx.state.isDisplayOnly,
|
|
729
703
|
"display-only-content": _ctx.state.displayOnlyContent,
|
|
730
704
|
unselectable: _ctx.state.readonly ? "on" : "off",
|
|
731
705
|
"validate-event": false,
|
|
706
|
+
"show-empty-value": _ctx.showEmptyValue,
|
|
732
707
|
"input-box-type": _ctx.inputBoxType,
|
|
733
708
|
class: normalizeClass({
|
|
734
709
|
"is-focus": _ctx.state.visible,
|
|
735
710
|
overflow: _ctx.state.overflow,
|
|
736
|
-
"is-show-close": _ctx.state.showClose
|
|
711
|
+
"is-show-close": _ctx.state.showClose,
|
|
712
|
+
"show-copy": _ctx.copyable,
|
|
713
|
+
"show-clear": _ctx.clearable
|
|
737
714
|
}),
|
|
738
715
|
tabindex: _ctx.multiple && _ctx.filterable ? "-1" : _ctx.tabindex,
|
|
739
716
|
onFocus: _ctx.handleFocus,
|
|
@@ -754,15 +731,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
754
731
|
onCompositionend: _ctx.handleComposition
|
|
755
732
|
}, createSlots({
|
|
756
733
|
suffix: withCtx(function() {
|
|
757
|
-
return [renderSlot(_ctx.$slots, "suffix"), _ctx.showLimitText && _ctx.multiple && _ctx.multipleLimit ? (openBlock(), createElementBlock(
|
|
734
|
+
return [renderSlot(_ctx.$slots, "suffix"), _ctx.showLimitText && _ctx.multiple && _ctx.multipleLimit && !_ctx.state.showCopy ? (openBlock(), createElementBlock(
|
|
758
735
|
"span",
|
|
759
|
-
|
|
736
|
+
_hoisted_12,
|
|
760
737
|
toDisplayString(_ctx.state.selected.length) + "/" + toDisplayString(_ctx.multipleLimit),
|
|
761
738
|
1
|
|
762
739
|
/* TEXT */
|
|
763
740
|
)) : _ctx.showProportion && _ctx.state.selected.length > 0 && _ctx.state.options.length > 1 ? (openBlock(), createElementBlock(
|
|
764
741
|
"span",
|
|
765
|
-
|
|
742
|
+
_hoisted_13,
|
|
766
743
|
toDisplayString(_ctx.state.selected.length + "/" + _ctx.state.options.length),
|
|
767
744
|
1
|
|
768
745
|
/* TEXT */
|
|
@@ -798,7 +775,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
798
775
|
return [renderSlot(_ctx.$slots, "prefix")];
|
|
799
776
|
}),
|
|
800
777
|
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)];
|
|
778
|
+
} : void 0]), 1032, ["modelValue", "placeholder", "name", "id", "autocomplete", "size", "disabled", "readonly", "display-only", "display-only-content", "unselectable", "show-empty-value", "input-box-type", "class", "tabindex", "onFocus", "onBlur", "onKeyup", "onKeydown", "onPaste", "onMouseenter", "onMouseleave", "onCompositionend"])) : createCommentVNode("v-if", true)];
|
|
802
779
|
}), createVNode(Transition, {
|
|
803
780
|
name: "tiny-zoom-in-top",
|
|
804
781
|
onBeforeEnter: _ctx.handleMenuEnter,
|
|
@@ -824,7 +801,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
824
801
|
},
|
|
825
802
|
[createVNode(_component_tiny_input, {
|
|
826
803
|
ref: "input",
|
|
827
|
-
type: "text",
|
|
828
804
|
modelValue: _ctx.state.query,
|
|
829
805
|
"onUpdate:modelValue": _cache[27] || (_cache[27] = function($event) {
|
|
830
806
|
return _ctx.state.query = $event;
|
|
@@ -836,7 +812,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
836
812
|
}, null, 8, ["modelValue", "placeholder", "onInput", "onFocus"])],
|
|
837
813
|
2
|
|
838
814
|
/* CLASS */
|
|
839
|
-
)) : createCommentVNode("v-if", true), _ctx.topCreate ? (openBlock(), createElementBlock("div",
|
|
815
|
+
)) : createCommentVNode("v-if", true), _ctx.topCreate ? (openBlock(), createElementBlock("div", _hoisted_14, [createElementVNode("div", {
|
|
840
816
|
onClick: _cache[28] || (_cache[28] = function($event) {
|
|
841
817
|
return _ctx.$emit("top-create-click", $event);
|
|
842
818
|
})
|
|
@@ -858,7 +834,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
858
834
|
"onUpdate:modelValue": [_cache[29] || (_cache[29] = function($event) {
|
|
859
835
|
return _ctx.state.query = $event;
|
|
860
836
|
}), _cache[30] || (_cache[30] = function($event) {
|
|
861
|
-
return _ctx.handleQueryChange(_ctx.state.query);
|
|
837
|
+
return _ctx.handleQueryChange(_ctx.state.query, false, true);
|
|
862
838
|
})],
|
|
863
839
|
placeholder: _ctx.t("ui.search.placeholder"),
|
|
864
840
|
class: "tiny-select-dropdown__search"
|
|
@@ -871,7 +847,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
871
847
|
suffix: withCtx(function() {
|
|
872
848
|
return [withDirectives(createElementVNode(
|
|
873
849
|
"span",
|
|
874
|
-
|
|
850
|
+
_hoisted_15,
|
|
875
851
|
[createVNode(_component_icon_close, {
|
|
876
852
|
onClick: _ctx.clearSearchText
|
|
877
853
|
}, null, 8, ["onClick"])],
|
|
@@ -891,12 +867,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
891
867
|
height: _ctx.state.optimizeStore.recycleScrollerHeight + "px"
|
|
892
868
|
})
|
|
893
869
|
},
|
|
894
|
-
[withDirectives((
|
|
870
|
+
[withDirectives(createVNode(_component_tiny_recycle_scroller, {
|
|
895
871
|
ref: "scrollbar",
|
|
896
872
|
style: {
|
|
897
873
|
"height": "100%"
|
|
898
874
|
},
|
|
899
|
-
key: _ctx.state.magicKey,
|
|
900
875
|
"key-field": _ctx.valueField,
|
|
901
876
|
"list-class": ["tiny-select-dropdown__wrap"],
|
|
902
877
|
"item-class": ["tiny-select-dropdown__item-view"],
|
|
@@ -931,10 +906,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
931
906
|
}),
|
|
932
907
|
_: 3
|
|
933
908
|
/* FORWARDED */
|
|
934
|
-
}, 8, ["key-field", "items", "item-size"])
|
|
909
|
+
}, 8, ["key-field", "items", "item-size"]), [[vShow, !_ctx.state.emptyFlag && !_ctx.loading]])],
|
|
935
910
|
4
|
|
936
911
|
/* STYLE */
|
|
937
|
-
)) : createCommentVNode("v-if", true), !_ctx.optimization ? withDirectives((openBlock(), createBlock(_component_tiny_scrollbar, {
|
|
912
|
+
)) : createCommentVNode("v-if", true), !_ctx.optimization && !(_ctx.state.isDisplayOnly && _ctx.options) ? withDirectives((openBlock(), createBlock(_component_tiny_scrollbar, {
|
|
938
913
|
key: 4,
|
|
939
914
|
ref: "scrollbar",
|
|
940
915
|
show: "",
|
|
@@ -967,15 +942,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
967
942
|
return _ctx.state.hoverIndex = -9;
|
|
968
943
|
})
|
|
969
944
|
},
|
|
970
|
-
[(openBlock(), createBlock(resolveDynamicComponent("icon-" + _ctx.state.selectCls), {
|
|
945
|
+
[createElementVNode("span", _hoisted_16, [(openBlock(), createBlock(resolveDynamicComponent("icon-" + _ctx.state.selectCls), {
|
|
971
946
|
class: normalizeClass(["tiny-svg-size", _ctx.state.selectCls])
|
|
972
|
-
}, null, 8, ["class"])), createElementVNode(
|
|
947
|
+
}, null, 8, ["class"]))]), createElementVNode("div", _hoisted_17, [createElementVNode(
|
|
973
948
|
"span",
|
|
974
|
-
|
|
949
|
+
_hoisted_18,
|
|
975
950
|
toDisplayString(_ctx.allText || _ctx.t("ui.base.all")),
|
|
976
951
|
1
|
|
977
952
|
/* TEXT */
|
|
978
|
-
)],
|
|
953
|
+
)])],
|
|
979
954
|
34
|
|
980
955
|
/* CLASS, NEED_HYDRATION */
|
|
981
956
|
)) : createCommentVNode("v-if", true), _ctx.multiple && _ctx.showCheck && _ctx.showAlloption && !_ctx.state.multipleLimit && _ctx.state.query && !_ctx.state.emptyText && !_ctx.remote ? (openBlock(), createElementBlock(
|
|
@@ -997,15 +972,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
997
972
|
return _ctx.state.hoverIndex = -9;
|
|
998
973
|
})
|
|
999
974
|
},
|
|
1000
|
-
[(openBlock(), createBlock(resolveDynamicComponent("icon-" + _ctx.state.filteredSelectCls), {
|
|
975
|
+
[createElementVNode("span", _hoisted_19, [(openBlock(), createBlock(resolveDynamicComponent("icon-" + _ctx.state.filteredSelectCls), {
|
|
1001
976
|
class: normalizeClass(["tiny-svg-size", _ctx.state.filteredSelectCls])
|
|
1002
|
-
}, null, 8, ["class"])), createElementVNode(
|
|
977
|
+
}, null, 8, ["class"]))]), createElementVNode("div", _hoisted_20, [createElementVNode(
|
|
1003
978
|
"span",
|
|
1004
|
-
|
|
979
|
+
_hoisted_21,
|
|
1005
980
|
toDisplayString(_ctx.allText || _ctx.t("ui.base.all")),
|
|
1006
981
|
1
|
|
1007
982
|
/* TEXT */
|
|
1008
|
-
)],
|
|
983
|
+
)])],
|
|
1009
984
|
34
|
|
1010
985
|
/* CLASS, NEED_HYDRATION */
|
|
1011
986
|
)) : createCommentVNode("v-if", true), _ctx.state.showNewOption ? (openBlock(), createBlock(_component_tiny_option, {
|
|
@@ -1042,43 +1017,57 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1042
1017
|
{
|
|
1043
1018
|
key: 5
|
|
1044
1019
|
},
|
|
1045
|
-
[_ctx.loadingText || _ctx.slots.empty ? (openBlock(), createElementBlock("div",
|
|
1020
|
+
[_ctx.loadingText || _ctx.slots.empty ? (openBlock(), createElementBlock("div", _hoisted_22, [_ctx.slots.empty ? renderSlot(_ctx.$slots, "empty", {
|
|
1046
1021
|
key: 0
|
|
1047
|
-
}) : _ctx.showEmptyImage ? (openBlock(), createElementBlock("span",
|
|
1022
|
+
}) : _ctx.showEmptyImage ? (openBlock(), createElementBlock("span", _hoisted_23)) : (openBlock(), createElementBlock(
|
|
1048
1023
|
"p",
|
|
1049
|
-
|
|
1024
|
+
_hoisted_24,
|
|
1050
1025
|
toDisplayString(_ctx.state.emptyText),
|
|
1051
1026
|
1
|
|
1052
1027
|
/* TEXT */
|
|
1053
|
-
))])) : (openBlock(), createElementBlock(
|
|
1054
|
-
|
|
1028
|
+
))])) : (openBlock(), createElementBlock(
|
|
1029
|
+
"div",
|
|
1055
1030
|
{
|
|
1056
|
-
key:
|
|
1031
|
+
key: 1,
|
|
1032
|
+
class: normalizeClass(["tiny-select-dropdown__loading", {
|
|
1033
|
+
"show-loading-icon": _ctx.loading
|
|
1034
|
+
}])
|
|
1057
1035
|
},
|
|
1058
|
-
[_ctx.
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1036
|
+
[!_ctx.loading ? (openBlock(), createElementBlock(
|
|
1037
|
+
Fragment,
|
|
1038
|
+
{
|
|
1039
|
+
key: 0
|
|
1040
|
+
},
|
|
1041
|
+
[_ctx.showEmptyImage ? (openBlock(), createElementBlock("span", _hoisted_25)) : (openBlock(), createElementBlock(
|
|
1042
|
+
"span",
|
|
1043
|
+
_hoisted_26,
|
|
1044
|
+
toDisplayString(_ctx.state.emptyText),
|
|
1045
|
+
1
|
|
1046
|
+
/* TEXT */
|
|
1047
|
+
))],
|
|
1048
|
+
64
|
|
1049
|
+
/* STABLE_FRAGMENT */
|
|
1050
|
+
)) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.state.designConfig && _ctx.state.designConfig.icons && _ctx.state.designConfig.icons.loadingIcon || "icon-loading-shadow"), {
|
|
1051
|
+
key: 1,
|
|
1052
|
+
class: "circular"
|
|
1053
|
+
}))],
|
|
1054
|
+
2
|
|
1055
|
+
/* CLASS */
|
|
1056
|
+
))],
|
|
1068
1057
|
64
|
|
1069
1058
|
/* STABLE_FRAGMENT */
|
|
1070
1059
|
)) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "footer")];
|
|
1071
1060
|
}),
|
|
1072
1061
|
_: 3
|
|
1073
1062
|
/* 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]])];
|
|
1063
|
+
}, 8, ["is-drop-inherit-width", "placement", "append-to-body", "style", "popper-options"]), [[vShow, !_ctx.onCopying() && !_ctx.hideDrop && _ctx.state.visible && (_ctx.slots.panel || _ctx.state.emptyText !== false)]])];
|
|
1075
1064
|
}),
|
|
1076
1065
|
_: 3
|
|
1077
1066
|
/* FORWARDED */
|
|
1078
1067
|
}, 8, ["onBeforeEnter", "onAfterLeave"])],
|
|
1079
1068
|
6
|
|
1080
1069
|
/* CLASS, STYLE */
|
|
1081
|
-
), _ctx.hoverExpand && !_ctx.state.isDisplayOnly ? (openBlock(), createElementBlock("div",
|
|
1070
|
+
)), [[_directive_auto_tip, _ctx.state.rootAutoTipConfig]]), _ctx.hoverExpand && !_ctx.state.isDisplayOnly ? (openBlock(), createElementBlock("div", _hoisted_27, _hoisted_29)) : createCommentVNode("v-if", true)],
|
|
1082
1071
|
16
|
|
1083
1072
|
/* FULL_PROPS */
|
|
1084
1073
|
)), [[_directive_popover, void 0, "popover"], [_directive_clickoutside, _ctx.handleClose]]);
|