@opentinyvue/vue-base-select 2.21.0 → 3.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +1 -1
- package/lib/mobile-first.js +871 -699
- package/lib/pc.js +917 -756
- package/package.json +15 -15
- package/src/index.d.ts +691 -1
- package/src/mobile-first.vue.d.ts +270 -1
- package/src/pc.vue.d.ts +291 -1
package/lib/mobile-first.js
CHANGED
|
@@ -11,706 +11,56 @@ import Tree from '@opentinyvue/vue-tree';
|
|
|
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 { resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, mergeProps, withModifiers, createElementVNode, normalizeStyle, normalizeClass, createBlock, createCommentVNode, withCtx, createVNode, createSlots, renderSlot, createTextVNode, toDisplayString, Fragment, renderList, withKeys, vModelText, resolveDynamicComponent, vShow, Transition } from 'vue';
|
|
14
15
|
|
|
15
|
-
function
|
|
16
|
-
var
|
|
17
|
-
if (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
function _createForOfIteratorHelperLoose(r, e) {
|
|
17
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
18
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
19
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
20
|
+
t && (r = t);
|
|
21
|
+
var o = 0;
|
|
22
|
+
return function() {
|
|
23
|
+
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
24
|
+
};
|
|
21
25
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var originalRender = options.render;
|
|
30
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
31
|
-
hook.call(context);
|
|
32
|
-
return originalRender(h, context);
|
|
33
|
-
};
|
|
34
|
-
} else {
|
|
35
|
-
var existing = options.beforeCreate;
|
|
36
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
37
|
-
}
|
|
26
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
27
|
+
}
|
|
28
|
+
function _unsupportedIterableToArray(r, a) {
|
|
29
|
+
if (r) {
|
|
30
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
31
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
32
|
+
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;
|
|
38
33
|
}
|
|
39
|
-
return {
|
|
40
|
-
exports: scriptExports,
|
|
41
|
-
options
|
|
42
|
-
};
|
|
43
34
|
}
|
|
35
|
+
function _arrayLikeToArray(r, a) {
|
|
36
|
+
(null == a || a > r.length) && (a = r.length);
|
|
37
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
38
|
+
return n;
|
|
39
|
+
}
|
|
40
|
+
var _export_sfc = function _export_sfc2(sfc, props) {
|
|
41
|
+
var target = sfc.__vccOpts || sfc;
|
|
42
|
+
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
|
|
43
|
+
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
|
|
44
|
+
target[key] = val;
|
|
45
|
+
}
|
|
46
|
+
return target;
|
|
47
|
+
};
|
|
44
48
|
|
|
49
|
+
function _extends() {
|
|
50
|
+
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
51
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
52
|
+
var t = arguments[e];
|
|
53
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
54
|
+
}
|
|
55
|
+
return n;
|
|
56
|
+
}, _extends.apply(null, arguments);
|
|
57
|
+
}
|
|
45
58
|
var classes = {
|
|
46
59
|
"caret": "text-base rotate-0 transition-transform duration-300 fill-color-text-placeholder cursor-pointer ",
|
|
47
60
|
"select-tags": "absolute leading-normal whitespace-normal sm:pl-3 pr-2 z-[1] top-1/2 -translate-y-2/4 flex items-center flex-wrap [&_[data-tag=tiny-tag]]:my-0.5 [&_[data-tag=tiny-tag]]:h-7 [&_[data-tag=tiny-tag]]:text-sm [&_[data-tag=tiny-tag]]:sm:h-5 [&_[data-tag=tiny-tag]]:sm:text-sm [&_[data-tag=tiny-tag]_svg]:shrink-0",
|
|
48
61
|
"tags-text": "inline-block w-full whitespace-nowrap text-ellipsis overflow-hidden align-bottom",
|
|
49
62
|
"tag-info": "whitespace-nowrap text-ellipsis overflow-hidden inline-flex justify-start items-center border-transparent text-color-text-primary"
|
|
50
63
|
};
|
|
51
|
-
var render = function render2() {
|
|
52
|
-
var _vm = this;
|
|
53
|
-
var _h = _vm.$createElement;
|
|
54
|
-
var _c = _vm._self._c || _h;
|
|
55
|
-
return _c("div", _vm._b({
|
|
56
|
-
directives: [{
|
|
57
|
-
name: "popover",
|
|
58
|
-
rawName: "v-popover:popover",
|
|
59
|
-
arg: "popover"
|
|
60
|
-
}, {
|
|
61
|
-
name: "clickoutside",
|
|
62
|
-
rawName: "v-clickoutside",
|
|
63
|
-
value: _vm.handleClose,
|
|
64
|
-
expression: "handleClose"
|
|
65
|
-
}],
|
|
66
|
-
ref: "select",
|
|
67
|
-
staticClass: "inline-block relative w-full outline-0 group [&_[data-tag=tiny-tag]]:max-w-[144px]",
|
|
68
|
-
class: [_vm.hoverExpand ? "align-top" : "", _vm.$parent.$attrs.class],
|
|
69
|
-
on: {
|
|
70
|
-
"mouseleave": function mouseleave($event) {
|
|
71
|
-
if ($event.target !== $event.currentTarget) return null;
|
|
72
|
-
return (function() {
|
|
73
|
-
_vm.state.selectHover = false;
|
|
74
|
-
_vm.state.inputHovering = false;
|
|
75
|
-
}).apply(null, arguments);
|
|
76
|
-
},
|
|
77
|
-
"mouseenter": function mouseenter($event) {
|
|
78
|
-
if ($event.target !== $event.currentTarget) return null;
|
|
79
|
-
return (function() {
|
|
80
|
-
_vm.state.selectHover = true;
|
|
81
|
-
_vm.state.inputHovering = true;
|
|
82
|
-
}).apply(null, arguments);
|
|
83
|
-
},
|
|
84
|
-
"click": _vm.toggleMenu
|
|
85
|
-
}
|
|
86
|
-
}, "div", _vm.a(_vm.$attrs, ["class", "style"], true), false), [_c("div", {
|
|
87
|
-
ref: "tagsGroup",
|
|
88
|
-
class: [{
|
|
89
|
-
"absolute top-0 left-0 right-0": _vm.hoverExpand
|
|
90
|
-
}, {
|
|
91
|
-
"absolute w-full": _vm.state.isExpand && _vm.hoverExpand
|
|
92
|
-
}, {
|
|
93
|
-
"z-[2]": _vm.state.isExpand && _vm.hoverExpand && (_vm.state.inputHovering || _vm.state.visible)
|
|
94
|
-
}],
|
|
95
|
-
style: _vm.state.selectFiexd
|
|
96
|
-
}, [_vm.shape === "filter" ? _c("tiny-filter-box", {
|
|
97
|
-
ref: "reference",
|
|
98
|
-
attrs: {
|
|
99
|
-
"show-close": _vm.clearable,
|
|
100
|
-
"placeholder": _vm.placeholder,
|
|
101
|
-
"disabled": _vm.state.selectDisabled,
|
|
102
|
-
"label": _vm.label,
|
|
103
|
-
"tip": _vm.tip,
|
|
104
|
-
"value": _vm.multiple ? _vm.state.selected.map(function(item) {
|
|
105
|
-
return item.state ? item.state.currentLabel : item.currentLabel;
|
|
106
|
-
}).join("; ") : _vm.state.selectedLabel,
|
|
107
|
-
"drop-down-visible": _vm.state.visible,
|
|
108
|
-
"blank": _vm.blank
|
|
109
|
-
},
|
|
110
|
-
on: {
|
|
111
|
-
"click": _vm.toggleMenu
|
|
112
|
-
}
|
|
113
|
-
}) : _vm._e(), _vm.multiple && !_vm.state.isDisplayOnly && !_vm.shape ? _c("div", {
|
|
114
|
-
ref: "tags",
|
|
115
|
-
class: _vm.m(_vm.gcls("select-tags"), {
|
|
116
|
-
"pl-9 sm:pl-9": _vm.slots.prefix
|
|
117
|
-
}, {
|
|
118
|
-
"overflow-y-hidden": (_vm.state.inputHovering || _vm.state.visible) && !_vm.state.selected.length
|
|
119
|
-
}, {
|
|
120
|
-
"h-6 overflow-hidden": _vm.hoverExpand
|
|
121
|
-
}, {
|
|
122
|
-
"pr-6": _vm.state.selectDisabled
|
|
123
|
-
}, {
|
|
124
|
-
"overflow-y-auto max-h-28 h-auto": _vm.hoverExpand && (_vm.state.inputHovering || _vm.state.visible)
|
|
125
|
-
}),
|
|
126
|
-
style: _vm.state.tagsStyle
|
|
127
|
-
}, [!_vm.state.selectDisabled ? _c("span", {
|
|
128
|
-
class: [_vm.collapseTags ? _vm.filterable && _vm.state.device === "pc" ? "w-auto max-w-[76%] flex" : "w-full flex" : "contents"]
|
|
129
|
-
}, [(_vm.collapseTags || _vm.state.device === "mb") && _vm.state.selectedVal.length ? _c("span", {
|
|
130
|
-
class: ["contents", _vm.collapseTags && _vm.filterable ? "max-w-full flex-1" : ""]
|
|
131
|
-
}, [_c("tiny-tag", {
|
|
132
|
-
key: _vm.state.key,
|
|
133
|
-
class: _vm.gcls("tag-info"),
|
|
134
|
-
attrs: {
|
|
135
|
-
"closable": !_vm.state.selectDisabled && _vm.state.device !== "mb",
|
|
136
|
-
"size": _vm.state.collapseTagSize,
|
|
137
|
-
"hit": _vm.state.selectedVal[0].state ? _vm.state.selectedVal[0].state.hitState : _vm.state.selectedVal[0].hitState,
|
|
138
|
-
"type": "info",
|
|
139
|
-
"disable-transitions": ""
|
|
140
|
-
},
|
|
141
|
-
on: {
|
|
142
|
-
"close": function close($event) {
|
|
143
|
-
return _vm.deleteTag($event, _vm.state.selectedVal[0]);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}, [_c("tiny-tooltip", {
|
|
147
|
-
attrs: {
|
|
148
|
-
"effect": "light",
|
|
149
|
-
"placement": "top"
|
|
150
|
-
},
|
|
151
|
-
nativeOn: {
|
|
152
|
-
"mouseenter": function mouseenter($event) {
|
|
153
|
-
_vm.handleEnterTag($event, _vm.getValueKey(_vm.state.selectedVal[0]));
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
scopedSlots: _vm._u([_vm.state.tooltipContent[_vm.getValueKey(_vm.state.selectedVal[0])] ? {
|
|
157
|
-
key: "content",
|
|
158
|
-
fn: function fn() {
|
|
159
|
-
return [_c("span", {
|
|
160
|
-
class: _vm.gcls("tags-text")
|
|
161
|
-
}, [_vm._t("label", function() {
|
|
162
|
-
return [_vm._v(_vm._s(_vm.state.selectedVal[0].state ? _vm.state.selectedVal[0].state.currentLabel : _vm.state.selectedVal[0].currentLabel))];
|
|
163
|
-
}, {
|
|
164
|
-
"item": _vm.getLabelSlotValue(_vm.state.selectedVal[0])
|
|
165
|
-
})], 2)];
|
|
166
|
-
},
|
|
167
|
-
proxy: true
|
|
168
|
-
} : null], null, true)
|
|
169
|
-
}, [_c("span", {
|
|
170
|
-
class: _vm.gcls("tags-text")
|
|
171
|
-
}, [_vm._t("label", function() {
|
|
172
|
-
return [_vm._v(_vm._s(_vm.state.selectedVal[0].state ? _vm.state.selectedVal[0].state.currentLabel : _vm.state.selectedVal[0].currentLabel))];
|
|
173
|
-
}, {
|
|
174
|
-
"item": _vm.getLabelSlotValue(_vm.state.selectedVal[0])
|
|
175
|
-
})], 2)])], 1), _vm.state.selectedVal.length > 1 ? _c("tiny-tag", {
|
|
176
|
-
staticClass: "overflow-visible",
|
|
177
|
-
class: _vm.gcls("tag-info"),
|
|
178
|
-
attrs: {
|
|
179
|
-
"closable": false,
|
|
180
|
-
"size": _vm.state.collapseTagSize,
|
|
181
|
-
"type": "info",
|
|
182
|
-
"disable-transitions": ""
|
|
183
|
-
}
|
|
184
|
-
}, [_c("span", {
|
|
185
|
-
class: _vm.gcls("tags-text")
|
|
186
|
-
}, [_vm._v("+ " + _vm._s(_vm.state.selectedVal.length - 1))])]) : _vm._e()], 1) : _vm._e(), !_vm.collapseTags ? _c("span", {
|
|
187
|
-
ref: "tags-content",
|
|
188
|
-
staticClass: "sm:contents hidden"
|
|
189
|
-
}, [_vm.hoverExpand ? _c("tiny-tag", {
|
|
190
|
-
key: "tags-collapse",
|
|
191
|
-
class: _vm.m(_vm.gcls("tag-info"), {
|
|
192
|
-
"visible static": _vm.hoverExpand
|
|
193
|
-
}, {
|
|
194
|
-
"invisible absolute": _vm.hoverExpand && (_vm.state.inputHovering || _vm.state.visible || _vm.state.isHidden)
|
|
195
|
-
}),
|
|
196
|
-
attrs: {
|
|
197
|
-
"type": "info",
|
|
198
|
-
"data-tag": "tags-collapse",
|
|
199
|
-
"closable": false,
|
|
200
|
-
"size": _vm.state.collapseTagSize
|
|
201
|
-
}
|
|
202
|
-
}, [_vm._v("+ " + _vm._s(_vm.state.collapseTagsLength))]) : _vm._e(), _vm._l(_vm.state.selected, function(item, index) {
|
|
203
|
-
return _c("tiny-tag", {
|
|
204
|
-
key: _vm.getValueKey(item),
|
|
205
|
-
class: _vm.gcls("tag-info"),
|
|
206
|
-
attrs: {
|
|
207
|
-
"closable": !item.selectDisabled && !item.required && _vm.state.device !== "mb",
|
|
208
|
-
"size": _vm.state.collapseTagSize,
|
|
209
|
-
"hit": item.state ? item.state.hitState : item.hitState,
|
|
210
|
-
"type": "info",
|
|
211
|
-
"disable-transitions": ""
|
|
212
|
-
},
|
|
213
|
-
on: {
|
|
214
|
-
"close": function close($event) {
|
|
215
|
-
return _vm.deleteTag($event, item);
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}, [_c("tiny-tooltip", {
|
|
219
|
-
attrs: {
|
|
220
|
-
"effect": "light",
|
|
221
|
-
"placement": "top"
|
|
222
|
-
},
|
|
223
|
-
nativeOn: {
|
|
224
|
-
"mouseenter": function mouseenter($event) {
|
|
225
|
-
_vm.handleEnterTag($event, _vm.getValueKey(item));
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
scopedSlots: _vm._u([_vm.state.tooltipContent[_vm.getValueKey(item)] ? {
|
|
229
|
-
key: "content",
|
|
230
|
-
fn: function fn() {
|
|
231
|
-
return [!_vm.state.visible && _vm.state.overflow === index ? _c("span", {
|
|
232
|
-
class: _vm.gcls("tags-text")
|
|
233
|
-
}, [_vm._v(_vm._s(item.state ? item.state.currentLabel + "... " : item.currentLabel + "... "))]) : _c("span", {
|
|
234
|
-
class: _vm.gcls("tags-text")
|
|
235
|
-
}, [_vm._t("label", function() {
|
|
236
|
-
return [_vm._v(_vm._s(item.state ? item.state.currentLabel : item.currentLabel))];
|
|
237
|
-
}, {
|
|
238
|
-
"item": _vm.getLabelSlotValue(item)
|
|
239
|
-
})], 2)];
|
|
240
|
-
},
|
|
241
|
-
proxy: true
|
|
242
|
-
} : null], null, true)
|
|
243
|
-
}, [!_vm.state.visible && _vm.state.overflow === index ? _c("span", {
|
|
244
|
-
class: _vm.gcls("tags-text")
|
|
245
|
-
}, [_vm._v(_vm._s(item.state ? item.state.currentLabel + "... " : item.currentLabel + "... "))]) : _c("span", {
|
|
246
|
-
class: _vm.gcls("tags-text")
|
|
247
|
-
}, [_vm._t("label", function() {
|
|
248
|
-
return [_vm._v(_vm._s(item.state ? item.state.currentLabel : item.currentLabel))];
|
|
249
|
-
}, {
|
|
250
|
-
"item": _vm.getLabelSlotValue(item)
|
|
251
|
-
})], 2)])], 1);
|
|
252
|
-
})], 2) : _vm._e()]) : _c("span", {
|
|
253
|
-
class: [_vm.gcls("tags-text"), "flex"]
|
|
254
|
-
}, [_c("tiny-tooltip", {
|
|
255
|
-
attrs: {
|
|
256
|
-
"effect": "light",
|
|
257
|
-
"placement": "top",
|
|
258
|
-
"disabled": !_vm.showTips || _vm.state.device === "mb"
|
|
259
|
-
},
|
|
260
|
-
scopedSlots: _vm._u([{
|
|
261
|
-
key: "content",
|
|
262
|
-
fn: function fn() {
|
|
263
|
-
return [_c("div", {
|
|
264
|
-
class: [_vm.state.showTips && "max-h-[theme(spacing.72)] overflow-x-hidden w-full", "inline-block"]
|
|
265
|
-
}, [_vm.slots.label ? _c("span", _vm._l(_vm.state.selected, function(item) {
|
|
266
|
-
return _c("span", {
|
|
267
|
-
key: _vm.getValueKey(item)
|
|
268
|
-
}, [_vm._t("label", null, {
|
|
269
|
-
"item": item
|
|
270
|
-
})], 2);
|
|
271
|
-
}), 0) : _c("span", [_vm._v(_vm._s(_vm.disabledTooltipContent || _vm.state.disabledTooltipContent))])])];
|
|
272
|
-
},
|
|
273
|
-
proxy: true
|
|
274
|
-
}], null, true)
|
|
275
|
-
}, [_c("span", {
|
|
276
|
-
staticClass: "inline-block w-full whitespace-nowrap text-ellipsis overflow-hidden text-color-text-disabled"
|
|
277
|
-
}, _vm._l(_vm.state.selected, function(item) {
|
|
278
|
-
return _c("span", {
|
|
279
|
-
key: item.value
|
|
280
|
-
}, [_vm._t("label", function() {
|
|
281
|
-
return [_vm._v(_vm._s(item.state ? item.state.currentLabel : item.currentLabel))];
|
|
282
|
-
}, {
|
|
283
|
-
"item": item
|
|
284
|
-
}), _vm._v("; ")], 2);
|
|
285
|
-
}), 0)])], 1), _vm.filterable && !_vm.state.selectDisabled ? _c("input", {
|
|
286
|
-
directives: [{
|
|
287
|
-
name: "model",
|
|
288
|
-
rawName: "v-model",
|
|
289
|
-
value: _vm.state.query,
|
|
290
|
-
expression: "state.query"
|
|
291
|
-
}],
|
|
292
|
-
ref: "input",
|
|
293
|
-
staticClass: "hidden sm:inline-block border-none outline-0 p-0 ml-px text-color-text-primary text-xs h-7 appearance-none bg-transparent",
|
|
294
|
-
class: [_vm.state.selectSize === "mini" ? "h-6" : "", _vm.state.selectSize === "small" ? "h-9" : "", _vm.state.selectSize === "medium" ? "h-8" : ""],
|
|
295
|
-
style: {
|
|
296
|
-
"flex-grow": "1",
|
|
297
|
-
width: _vm.state.inputLength / (_vm.state.inputWidth - 32) + "%",
|
|
298
|
-
"max-width": _vm.state.inputWidth - 42 + "px",
|
|
299
|
-
height: "auto"
|
|
300
|
-
},
|
|
301
|
-
attrs: {
|
|
302
|
-
"type": "text",
|
|
303
|
-
"disabled": _vm.state.selectDisabled,
|
|
304
|
-
"autocomplete": _vm.autocomplete
|
|
305
|
-
},
|
|
306
|
-
domProps: {
|
|
307
|
-
"value": _vm.state.query
|
|
308
|
-
},
|
|
309
|
-
on: {
|
|
310
|
-
"focus": _vm.handleFocus,
|
|
311
|
-
"blur": _vm.handleBlur,
|
|
312
|
-
"keyup": _vm.managePlaceholder,
|
|
313
|
-
"keydown": [_vm.resetInputState, function($event) {
|
|
314
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "down", 40, $event.key, ["Down", "ArrowDown"])) return null;
|
|
315
|
-
$event.preventDefault();
|
|
316
|
-
return _vm.navigateOptions("next");
|
|
317
|
-
}, function($event) {
|
|
318
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])) return null;
|
|
319
|
-
$event.preventDefault();
|
|
320
|
-
return _vm.navigateOptions("prev");
|
|
321
|
-
}, function($event) {
|
|
322
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) return null;
|
|
323
|
-
$event.preventDefault();
|
|
324
|
-
return _vm.selectOption.apply(null, arguments);
|
|
325
|
-
}, function($event) {
|
|
326
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "esc", 27, $event.key, ["Esc", "Escape"])) return null;
|
|
327
|
-
$event.stopPropagation();
|
|
328
|
-
$event.preventDefault();
|
|
329
|
-
_vm.state.visible = false;
|
|
330
|
-
}, function($event) {
|
|
331
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "delete", [8, 46], $event.key, ["Backspace", "Delete", "Del"])) return null;
|
|
332
|
-
return _vm.deletePrevTag.apply(null, arguments);
|
|
333
|
-
}, function($event) {
|
|
334
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "tab", 9, $event.key, "Tab")) return null;
|
|
335
|
-
_vm.state.visible = false;
|
|
336
|
-
}],
|
|
337
|
-
"compositionstart": _vm.handleComposition,
|
|
338
|
-
"compositionupdate": _vm.handleComposition,
|
|
339
|
-
"compositionend": _vm.handleComposition,
|
|
340
|
-
"input": [function($event) {
|
|
341
|
-
if ($event.target.composing) return;
|
|
342
|
-
_vm.$set(_vm.state, "query", $event.target.value);
|
|
343
|
-
}, _vm.debouncedQueryChange]
|
|
344
|
-
}
|
|
345
|
-
}) : _vm._e()]) : _vm._e(), !_vm.shape ? _c("tiny-input", {
|
|
346
|
-
ref: "reference",
|
|
347
|
-
attrs: {
|
|
348
|
-
"type": "text",
|
|
349
|
-
"placeholder": _vm.state.currentPlaceholder,
|
|
350
|
-
"name": _vm.name,
|
|
351
|
-
"id": _vm.id,
|
|
352
|
-
"autocomplete": _vm.autocomplete,
|
|
353
|
-
"size": _vm.state.selectSize,
|
|
354
|
-
"disabled": _vm.state.selectDisabled,
|
|
355
|
-
"readonly": _vm.state.readonly,
|
|
356
|
-
"display-only": _vm.state.isDisplayOnly,
|
|
357
|
-
"display-only-content": _vm.state.displayOnlyContent,
|
|
358
|
-
"unselectable": _vm.state.readonly ? "on" : "off",
|
|
359
|
-
"validate-event": false,
|
|
360
|
-
"tabindex": _vm.multiple && _vm.filterable ? "-1" : _vm.tabindex
|
|
361
|
-
},
|
|
362
|
-
on: {
|
|
363
|
-
"focus": _vm.handleFocus,
|
|
364
|
-
"blur": _vm.handleBlur,
|
|
365
|
-
"keyup": _vm.debouncedOnInputChange,
|
|
366
|
-
"keydown": [function($event) {
|
|
367
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "down", 40, $event.key, ["Down", "ArrowDown"])) return null;
|
|
368
|
-
$event.stopPropagation();
|
|
369
|
-
$event.preventDefault();
|
|
370
|
-
return _vm.navigateOptions("next");
|
|
371
|
-
}, function($event) {
|
|
372
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])) return null;
|
|
373
|
-
$event.stopPropagation();
|
|
374
|
-
$event.preventDefault();
|
|
375
|
-
return _vm.navigateOptions("prev");
|
|
376
|
-
}, function($event) {
|
|
377
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) return null;
|
|
378
|
-
$event.preventDefault();
|
|
379
|
-
return _vm.selectOption.apply(null, arguments);
|
|
380
|
-
}, function($event) {
|
|
381
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "esc", 27, $event.key, ["Esc", "Escape"])) return null;
|
|
382
|
-
$event.stopPropagation();
|
|
383
|
-
$event.preventDefault();
|
|
384
|
-
_vm.state.visible = false;
|
|
385
|
-
}, function($event) {
|
|
386
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "tab", 9, $event.key, "Tab")) return null;
|
|
387
|
-
_vm.state.visible = false;
|
|
388
|
-
}],
|
|
389
|
-
"paste": _vm.debouncedOnInputChange,
|
|
390
|
-
"mouseenter": _vm.onMouseenterNative,
|
|
391
|
-
"mouseleave": _vm.onMouseleaveNative
|
|
392
|
-
},
|
|
393
|
-
nativeOn: {
|
|
394
|
-
"compositionend": function compositionend($event) {
|
|
395
|
-
return _vm.handleComposition.apply(null, arguments);
|
|
396
|
-
}
|
|
397
|
-
},
|
|
398
|
-
scopedSlots: _vm._u([_vm.slots.prefix ? {
|
|
399
|
-
key: "prefix",
|
|
400
|
-
fn: function fn() {
|
|
401
|
-
return [_vm._t("prefix")];
|
|
402
|
-
},
|
|
403
|
-
proxy: true
|
|
404
|
-
} : null, {
|
|
405
|
-
key: "suffix",
|
|
406
|
-
fn: function fn() {
|
|
407
|
-
return [_vm._t("suffix"), _vm.state.showCopy ? _c("span", {
|
|
408
|
-
staticClass: "h-4 cursor-pointer relative z-[1]",
|
|
409
|
-
on: {
|
|
410
|
-
"click": function click($event) {
|
|
411
|
-
$event.stopPropagation();
|
|
412
|
-
return _vm.handleCopyClick.apply(null, arguments);
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
}, [_c("icon-copy", {
|
|
416
|
-
class: [_vm.gcls("caret"), "align-top group-hover:fill-color-brand"]
|
|
417
|
-
})], 1) : _vm._e(), _vm.showProportion && _vm.state.selected.length > 0 && _vm.state.options.length > 1 ? _c("span", [_vm._v(" " + _vm._s(_vm.state.selected.length + "/" + _vm.state.options.length) + " ")]) : _vm._e(), _vm.state.showClose ? _c("icon-close", {
|
|
418
|
-
class: [_vm.gcls("caret"), "hidden sm:inline-block", {
|
|
419
|
-
"mr-2 fill-color-text-placeholder hover:fill-color-icon-primary": _vm.state.showClose
|
|
420
|
-
}, {
|
|
421
|
-
"mr-1": _vm.multiple && _vm.state.showClose
|
|
422
|
-
}],
|
|
423
|
-
on: {
|
|
424
|
-
"click": _vm.handleClearClick,
|
|
425
|
-
"mouseenter": function mouseenter($event) {
|
|
426
|
-
_vm.state.inputHovering = true;
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
}) : _vm._e(), _c(_vm.dropdownIcon, {
|
|
430
|
-
directives: [{
|
|
431
|
-
name: "show",
|
|
432
|
-
rawName: "v-show",
|
|
433
|
-
value: !(_vm.remote && _vm.filterable && !_vm.remoteConfig.showIcon),
|
|
434
|
-
expression: "!(remote && filterable && !remoteConfig.showIcon)"
|
|
435
|
-
}],
|
|
436
|
-
tag: "component",
|
|
437
|
-
class: _vm.m(_vm.gcls("caret"), "hidden sm:inline-block", _vm.state.iconClass, {
|
|
438
|
-
"hidden": _vm.state.selectDisabled
|
|
439
|
-
}, {
|
|
440
|
-
"fill-color-brand-hover rotate-180 ": _vm.state.visible
|
|
441
|
-
}),
|
|
442
|
-
on: {
|
|
443
|
-
"click": _vm.handleDropdownClick
|
|
444
|
-
}
|
|
445
|
-
}), _c("icon-chevron-right", {
|
|
446
|
-
staticClass: "inline-block sm:hidden",
|
|
447
|
-
class: [_vm.state.selectDisabled ? "fill-color-icon-placeholder sm:fill-color-icon-disabled" : "fill-color-icon-secondary"],
|
|
448
|
-
attrs: {
|
|
449
|
-
"custom-class": "h-5 w-5 sm:h-4 sm:w-4"
|
|
450
|
-
}
|
|
451
|
-
})];
|
|
452
|
-
},
|
|
453
|
-
proxy: true
|
|
454
|
-
}], null, true),
|
|
455
|
-
model: {
|
|
456
|
-
value: _vm.state.selectedLabel,
|
|
457
|
-
callback: function callback($$v) {
|
|
458
|
-
_vm.$set(_vm.state, "selectedLabel", $$v);
|
|
459
|
-
},
|
|
460
|
-
expression: "state.selectedLabel"
|
|
461
|
-
}
|
|
462
|
-
}) : _vm._e(), _c("transition", {
|
|
463
|
-
on: {
|
|
464
|
-
"before-enter": _vm.handleMenuEnter,
|
|
465
|
-
"after-leave": _vm.doDestroy
|
|
466
|
-
}
|
|
467
|
-
}, [_c("tiny-select-dropdown", {
|
|
468
|
-
directives: [{
|
|
469
|
-
name: "show",
|
|
470
|
-
rawName: "v-show",
|
|
471
|
-
value: !_vm.onCopying() && !_vm.hideDrop && _vm.state.visible && _vm.state.emptyText !== false,
|
|
472
|
-
expression: "!onCopying() && !hideDrop && state.visible && state.emptyText !== false"
|
|
473
|
-
}],
|
|
474
|
-
ref: "popper",
|
|
475
|
-
class: _vm.m("duration-300"),
|
|
476
|
-
style: _vm.dropStyle,
|
|
477
|
-
attrs: {
|
|
478
|
-
"title": _vm.title,
|
|
479
|
-
"close-by-mask": _vm.closeByMask,
|
|
480
|
-
"search-placeholder": _vm.searchPlaceholder,
|
|
481
|
-
"is-drop-inherit-width": _vm.isDropInheritWidth,
|
|
482
|
-
"placement": _vm.placement,
|
|
483
|
-
"append-to-body": _vm.popperAppendToBody,
|
|
484
|
-
"popper-options": _vm.popperOptions
|
|
485
|
-
}
|
|
486
|
-
}, [_vm.shape && _vm.filterable ? _c("div", {
|
|
487
|
-
staticClass: "px-3 pt-3 pb-1 hidden sm:block",
|
|
488
|
-
class: [_vm.remote && !_vm.state.options.length ? "pb-3" : ""]
|
|
489
|
-
}, [_c("tiny-input", {
|
|
490
|
-
ref: "input",
|
|
491
|
-
attrs: {
|
|
492
|
-
"type": "text",
|
|
493
|
-
"placeholder": _vm.placeholder,
|
|
494
|
-
"autofocus": ""
|
|
495
|
-
},
|
|
496
|
-
on: {
|
|
497
|
-
"input": _vm.debouncedQueryChange,
|
|
498
|
-
"focus": _vm.handleFocus
|
|
499
|
-
},
|
|
500
|
-
model: {
|
|
501
|
-
value: _vm.state.query,
|
|
502
|
-
callback: function callback($$v) {
|
|
503
|
-
_vm.$set(_vm.state, "query", $$v);
|
|
504
|
-
},
|
|
505
|
-
expression: "state.query"
|
|
506
|
-
}
|
|
507
|
-
})], 1) : _vm._e(), _vm.renderType === "tree" ? _c("tiny-tree", _vm._b({
|
|
508
|
-
ref: "selectTree",
|
|
509
|
-
staticClass: "[&_[data-tag=tiny-checkbox]_>span_>span]:p-1.5 sm:[&_[data-tag=tiny-checkbox]_>span_>span]:p-0",
|
|
510
|
-
attrs: {
|
|
511
|
-
"filter-node-method": _vm.filterMethod,
|
|
512
|
-
"props": Object.assign({
|
|
513
|
-
label: _vm.textField,
|
|
514
|
-
isLeaf: "isLeaf"
|
|
515
|
-
}, _vm.treeOp.props),
|
|
516
|
-
"expand-on-click-node": false,
|
|
517
|
-
"icon-trigger-click-node": false,
|
|
518
|
-
"node-key": _vm.valueField,
|
|
519
|
-
"default-expand-all": _vm.state.isExpandAll,
|
|
520
|
-
"check-strictly": _vm.treeOp.checkStrictly,
|
|
521
|
-
"default-checked-keys": _vm.multiple ? _vm.state.defaultCheckedKeys : [],
|
|
522
|
-
"current-node-key": !_vm.multiple ? _vm.state.currentKey : "",
|
|
523
|
-
"show-checkbox": _vm.multiple,
|
|
524
|
-
"show-checked-mark": _vm.state.device === "mb"
|
|
525
|
-
},
|
|
526
|
-
on: {
|
|
527
|
-
"load-data": _vm.loadTreeData,
|
|
528
|
-
"node-collapse": _vm.nodeCollapse,
|
|
529
|
-
"node-expand": _vm.nodeExpand,
|
|
530
|
-
"check": _vm.nodeCheckClick,
|
|
531
|
-
"node-click": _vm.treeNodeClick
|
|
532
|
-
}
|
|
533
|
-
}, "tiny-tree", _vm.treeOp, false)) : _vm._e(), _vm.optimization && _vm.renderType !== "tree" ? [_c("div", {
|
|
534
|
-
style: {
|
|
535
|
-
height: _vm.state.optimizeStore.recycleScrollerHeight + "px"
|
|
536
|
-
}
|
|
537
|
-
}, [_c("tiny-recycle-scroller", {
|
|
538
|
-
directives: [{
|
|
539
|
-
name: "show",
|
|
540
|
-
rawName: "v-show",
|
|
541
|
-
value: !_vm.state.emptyFlag && !_vm.loading,
|
|
542
|
-
expression: "!state.emptyFlag && !loading"
|
|
543
|
-
}],
|
|
544
|
-
key: _vm.state.magicKey,
|
|
545
|
-
ref: "scrollbar",
|
|
546
|
-
staticStyle: {
|
|
547
|
-
"height": "100%"
|
|
548
|
-
},
|
|
549
|
-
attrs: {
|
|
550
|
-
"key-field": _vm.valueField,
|
|
551
|
-
"list-class": ["tiny-select-dropdown__wrap sm:max-h-56 pb-1 sm:pb-0", _vm.state.device === "mb" ? "scrollbar-size-0" : ""],
|
|
552
|
-
"items": _vm.state.datas,
|
|
553
|
-
"item-size": _vm.state.optimizeOpts.optionHeight
|
|
554
|
-
},
|
|
555
|
-
scopedSlots: _vm._u([{
|
|
556
|
-
key: "before",
|
|
557
|
-
fn: function fn() {
|
|
558
|
-
return [_vm.state.showNewOption ? _c("tiny-option", {
|
|
559
|
-
attrs: {
|
|
560
|
-
"highlightClass": "sm:mb-0",
|
|
561
|
-
"created": "",
|
|
562
|
-
"value": _vm.state.device === "mb" ? _vm.state.queryValue : _vm.state.query
|
|
563
|
-
}
|
|
564
|
-
}) : _vm._e()];
|
|
565
|
-
},
|
|
566
|
-
proxy: true
|
|
567
|
-
}, {
|
|
568
|
-
key: "default",
|
|
569
|
-
fn: function fn(_ref) {
|
|
570
|
-
var item = _ref.item;
|
|
571
|
-
return [_vm._t("default", function() {
|
|
572
|
-
return [_c("tiny-option", {
|
|
573
|
-
key: "" + item[_vm.valueField],
|
|
574
|
-
class: ["absolute w-full"],
|
|
575
|
-
attrs: {
|
|
576
|
-
"label": item[_vm.textField],
|
|
577
|
-
"value": item[_vm.valueField],
|
|
578
|
-
"disabled": item.disabled,
|
|
579
|
-
"required": item.required,
|
|
580
|
-
"highlight-class": item._highlightClass,
|
|
581
|
-
"events": item.events
|
|
582
|
-
},
|
|
583
|
-
on: {
|
|
584
|
-
"mousedown": function mousedown($event) {
|
|
585
|
-
$event.stopPropagation();
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
})];
|
|
589
|
-
}, {
|
|
590
|
-
"item": item
|
|
591
|
-
})];
|
|
592
|
-
}
|
|
593
|
-
}], null, true)
|
|
594
|
-
})], 1)] : _vm._e(), !_vm.optimization && _vm.renderType !== "tree" ? _c("tiny-scrollbar", {
|
|
595
|
-
directives: [{
|
|
596
|
-
name: "show",
|
|
597
|
-
rawName: "v-show",
|
|
598
|
-
value: _vm.state.options.length > 0 && !_vm.loading,
|
|
599
|
-
expression: "state.options.length > 0 && !loading"
|
|
600
|
-
}],
|
|
601
|
-
ref: "scrollbar",
|
|
602
|
-
attrs: {
|
|
603
|
-
"tag": "ul",
|
|
604
|
-
"wrap-class": ["tiny-select-dropdown__wrap sm:max-h-56 pb-1 sm:pb-0", _vm.state.device === "mb" ? "scrollbar-size-0" : ""],
|
|
605
|
-
"view-class": ["tiny-select-dropdown__list"]
|
|
606
|
-
},
|
|
607
|
-
on: {
|
|
608
|
-
"mousedown": function mousedown($event) {
|
|
609
|
-
$event.stopPropagation();
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
}, [_vm._t("dropdown"), _vm.multiple && _vm.showCheck && _vm.showAlloption && !_vm.state.multipleLimit && !_vm.state.query && !_vm.remote ? _c("div", {
|
|
613
|
-
staticClass: "whitespace-nowrap box-border py-0 h-10 leading-10 sm:h-8 sm:leading-8 text-sm sm:text-xs pl-0 pr-3 sm:px-3 my-1 sm:m-1 rounded cursor-pointer",
|
|
614
|
-
class: [{
|
|
615
|
-
hover: _vm.state.hoverIndex === -9 && _vm.state.selectCls !== "checked-sur"
|
|
616
|
-
}, {
|
|
617
|
-
"text-color-brand sm:bg-color-fill-6 bg-color-bg-1": _vm.state.selectCls === "checked-sur"
|
|
618
|
-
}],
|
|
619
|
-
attrs: {
|
|
620
|
-
"data-tag": "tiny-option"
|
|
621
|
-
},
|
|
622
|
-
on: {
|
|
623
|
-
"click": function click($event) {
|
|
624
|
-
$event.stopPropagation();
|
|
625
|
-
return _vm.toggleCheckAll(false);
|
|
626
|
-
},
|
|
627
|
-
"mousedown": function mousedown($event) {
|
|
628
|
-
$event.stopPropagation();
|
|
629
|
-
},
|
|
630
|
-
"mouseenter": function mouseenter($event) {
|
|
631
|
-
_vm.state.hoverIndex = -9;
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
}, [_c("icon-" + _vm.state.selectCls, {
|
|
635
|
-
tag: "component",
|
|
636
|
-
class: _vm.m(["-mt-0.5 mr-2 fill-color-icon-secondary", _vm.state.selectCls !== "check" && "fill-color-brand"])
|
|
637
|
-
}), _c("span", {
|
|
638
|
-
class: [_vm.state.selectCls === "checked-sur" ? "text-color-brand" : "text-color-text-primary"]
|
|
639
|
-
}, [_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("div", {
|
|
640
|
-
staticClass: "whitespace-nowrap box-border py-0 h-10 leading-10 sm:h-8 sm:leading-8 text-sm sm:text-xs pl-0 pr-3 sm:px-3 my-1 sm:m-1 rounded cursor-pointer",
|
|
641
|
-
class: [{
|
|
642
|
-
hover: _vm.state.hoverIndex === -9 && _vm.state.filteredSelectCls !== "checked-sur"
|
|
643
|
-
}, {
|
|
644
|
-
"text-color-brand sm:bg-color-fill-6 bg-color-bg-1": _vm.state.filteredSelectCls === "checked-sur"
|
|
645
|
-
}],
|
|
646
|
-
attrs: {
|
|
647
|
-
"data-tag": "tiny-option"
|
|
648
|
-
},
|
|
649
|
-
on: {
|
|
650
|
-
"click": function click($event) {
|
|
651
|
-
$event.stopPropagation();
|
|
652
|
-
return _vm.toggleCheckAll(true);
|
|
653
|
-
},
|
|
654
|
-
"mousedown": function mousedown($event) {
|
|
655
|
-
$event.stopPropagation();
|
|
656
|
-
},
|
|
657
|
-
"mouseenter": function mouseenter($event) {
|
|
658
|
-
_vm.state.hoverIndex = -9;
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
}, [_c("icon-" + _vm.state.filteredSelectCls, {
|
|
662
|
-
tag: "component",
|
|
663
|
-
class: _vm.m(["-mt-0.5 mr-2 fill-color-icon-secondary", _vm.state.filteredSelectCls !== "check" && "fill-color-brand"])
|
|
664
|
-
}), _c("span", {
|
|
665
|
-
class: [_vm.state.filteredSelectCls === "checked-sur" ? "text-color-brand" : "text-color-text-primary"]
|
|
666
|
-
}, [_vm._v(_vm._s(_vm.allText || _vm.t("ui.base.all")))])], 1) : _vm._e(), _vm.state.showNewOption ? _c("tiny-option", {
|
|
667
|
-
attrs: {
|
|
668
|
-
"value": _vm.state.device === "mb" ? _vm.state.queryValue : _vm.state.query,
|
|
669
|
-
"created": ""
|
|
670
|
-
}
|
|
671
|
-
}) : _vm._e(), _vm._t("default", function() {
|
|
672
|
-
return _vm._l(_vm.state.datas, function(item) {
|
|
673
|
-
return _c("tiny-option", {
|
|
674
|
-
key: "" + item[_vm.valueField],
|
|
675
|
-
class: ["relative"],
|
|
676
|
-
attrs: {
|
|
677
|
-
"label": item[_vm.textField],
|
|
678
|
-
"value": item[_vm.valueField],
|
|
679
|
-
"disabled": item.disabled,
|
|
680
|
-
"required": item.required,
|
|
681
|
-
"highlight-class": item._highlightClass,
|
|
682
|
-
"events": item.events
|
|
683
|
-
},
|
|
684
|
-
on: {
|
|
685
|
-
"mousedown": function mousedown($event) {
|
|
686
|
-
$event.stopPropagation();
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
});
|
|
690
|
-
});
|
|
691
|
-
})], 2) : _vm._e(), _vm.renderType !== "tree" && _vm.state.emptyText && (!_vm.allowCreate || _vm.loading || _vm.allowCreate && _vm.state.emptyFlag) ? [_vm.loadingText || _vm.slots.empty ? _c("div", [_vm.slots.empty ? _vm._t("empty") : _c("p", {
|
|
692
|
-
staticClass: "py-2.5 px-0 m-0 text-center text-color-text-secondary text-xs"
|
|
693
|
-
}, [_vm._v(" " + _vm._s(_vm.state.emptyText) + " ")])], 2) : _c("div", {
|
|
694
|
-
staticClass: "text-center py-2.5 px-0"
|
|
695
|
-
}, [!_vm.loading ? _c("span", {
|
|
696
|
-
staticClass: "py-2.5 px-0 m-0 text-center text-color-text-secondary text-xs"
|
|
697
|
-
}, [_vm._v(" " + _vm._s(_vm.state.emptyText) + " ")]) : _c("icon-loading", {
|
|
698
|
-
staticClass: "fill-color-brand h-4 w-4 inline-block align-top animate-spin"
|
|
699
|
-
})], 1)] : _vm._e()], 2)], 1)], 1), _vm.hoverExpand && !_vm.state.isDisplayOnly ? _c("div", {
|
|
700
|
-
class: _vm.m("h-7 invisible", {
|
|
701
|
-
"h-6": _vm.state.selectSize === "mini"
|
|
702
|
-
}, {
|
|
703
|
-
"h-7": _vm.state.selectSize === "small"
|
|
704
|
-
}, {
|
|
705
|
-
"h-8": _vm.state.selectSize === "medium"
|
|
706
|
-
})
|
|
707
|
-
}, [_c("input", {
|
|
708
|
-
attrs: {
|
|
709
|
-
"disabled": ""
|
|
710
|
-
}
|
|
711
|
-
})]) : _vm._e()]);
|
|
712
|
-
};
|
|
713
|
-
var staticRenderFns = [];
|
|
714
64
|
var getReference = function getReference2(el, binding, vnode) {
|
|
715
65
|
var _ref = binding.expression ? binding.value : binding.arg;
|
|
716
66
|
var popper = vnode.context.$refs[_ref];
|
|
@@ -722,7 +72,7 @@ var getReference = function getReference2(el, binding, vnode) {
|
|
|
722
72
|
}
|
|
723
73
|
}
|
|
724
74
|
};
|
|
725
|
-
var
|
|
75
|
+
var _sfc_main = defineComponent({
|
|
726
76
|
inheritAttrs: false,
|
|
727
77
|
emits: ["update:modelValue", "change", "focus", "blur", "clear", "remove-tag", "visible-change", "handleDropdownClick", "dropdown-click", "confirm"],
|
|
728
78
|
directives: directive({
|
|
@@ -765,15 +115,837 @@ var __vue2_script = defineComponent({
|
|
|
765
115
|
});
|
|
766
116
|
}
|
|
767
117
|
});
|
|
768
|
-
var
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
118
|
+
var _hoisted_1 = {
|
|
119
|
+
key: 1,
|
|
120
|
+
ref: "tags-content",
|
|
121
|
+
class: "sm:contents hidden"
|
|
122
|
+
};
|
|
123
|
+
var _hoisted_2 = {
|
|
124
|
+
class: "inline-block w-full whitespace-nowrap text-ellipsis overflow-hidden text-color-text-disabled"
|
|
125
|
+
};
|
|
126
|
+
var _hoisted_3 = {
|
|
127
|
+
key: 0
|
|
128
|
+
};
|
|
129
|
+
var _hoisted_4 = {
|
|
130
|
+
key: 1
|
|
131
|
+
};
|
|
132
|
+
var _hoisted_5 = ["disabled", "autocomplete"];
|
|
133
|
+
var _hoisted_6 = {
|
|
134
|
+
key: 1
|
|
135
|
+
};
|
|
136
|
+
var _hoisted_7 = {
|
|
137
|
+
key: 0
|
|
138
|
+
};
|
|
139
|
+
var _hoisted_8 = {
|
|
140
|
+
key: 1,
|
|
141
|
+
class: "py-2.5 px-0 m-0 text-center text-color-text-secondary text-xs"
|
|
142
|
+
};
|
|
143
|
+
var _hoisted_9 = {
|
|
144
|
+
key: 1,
|
|
145
|
+
class: "text-center py-2.5 px-0"
|
|
146
|
+
};
|
|
147
|
+
var _hoisted_10 = {
|
|
148
|
+
key: 0,
|
|
149
|
+
class: "py-2.5 px-0 m-0 text-center text-color-text-secondary text-xs"
|
|
150
|
+
};
|
|
151
|
+
var _hoisted_11 = /* @__PURE__ */ createElementVNode(
|
|
152
|
+
"input",
|
|
153
|
+
{
|
|
154
|
+
disabled: ""
|
|
155
|
+
},
|
|
156
|
+
null,
|
|
157
|
+
-1
|
|
158
|
+
/* HOISTED */
|
|
159
|
+
);
|
|
160
|
+
var _hoisted_12 = [_hoisted_11];
|
|
161
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
162
|
+
var _component_tiny_filter_box = resolveComponent("tiny-filter-box");
|
|
163
|
+
var _component_tiny_tooltip = resolveComponent("tiny-tooltip");
|
|
164
|
+
var _component_tiny_tag = resolveComponent("tiny-tag");
|
|
165
|
+
var _component_icon_copy = resolveComponent("icon-copy");
|
|
166
|
+
var _component_icon_close = resolveComponent("icon-close");
|
|
167
|
+
var _component_icon_chevron_right = resolveComponent("icon-chevron-right");
|
|
168
|
+
var _component_tiny_input = resolveComponent("tiny-input");
|
|
169
|
+
var _component_tiny_tree = resolveComponent("tiny-tree");
|
|
170
|
+
var _component_tiny_option = resolveComponent("tiny-option");
|
|
171
|
+
var _component_tiny_recycle_scroller = resolveComponent("tiny-recycle-scroller");
|
|
172
|
+
var _component_tiny_scrollbar = resolveComponent("tiny-scrollbar");
|
|
173
|
+
var _component_icon_loading = resolveComponent("icon-loading");
|
|
174
|
+
var _component_tiny_select_dropdown = resolveComponent("tiny-select-dropdown");
|
|
175
|
+
var _directive_popover = resolveDirective("popover");
|
|
176
|
+
var _directive_clickoutside = resolveDirective("clickoutside");
|
|
177
|
+
return withDirectives((openBlock(), createElementBlock(
|
|
178
|
+
"div",
|
|
179
|
+
mergeProps({
|
|
180
|
+
ref: "select",
|
|
181
|
+
class: ["inline-block relative w-full outline-0 group [&_[data-tag=tiny-tag]]:max-w-[144px]", [_ctx.hoverExpand ? "align-top" : "", _ctx.$parent.$attrs.class]],
|
|
182
|
+
onMouseleave: _cache[34] || (_cache[34] = withModifiers(function() {
|
|
183
|
+
_ctx.state.selectHover = false;
|
|
184
|
+
_ctx.state.inputHovering = false;
|
|
185
|
+
}, ["self"])),
|
|
186
|
+
onMouseenter: _cache[35] || (_cache[35] = withModifiers(function() {
|
|
187
|
+
_ctx.state.selectHover = true;
|
|
188
|
+
_ctx.state.inputHovering = true;
|
|
189
|
+
}, ["self"])),
|
|
190
|
+
onClick: _cache[36] || (_cache[36] = function() {
|
|
191
|
+
return _ctx.toggleMenu && _ctx.toggleMenu.apply(_ctx, arguments);
|
|
192
|
+
})
|
|
193
|
+
}, _ctx.a(_ctx.$attrs, ["class", "style"], true)),
|
|
194
|
+
[createElementVNode(
|
|
195
|
+
"div",
|
|
196
|
+
{
|
|
197
|
+
ref: "tagsGroup",
|
|
198
|
+
style: normalizeStyle(_ctx.state.selectFiexd),
|
|
199
|
+
class: normalizeClass([{
|
|
200
|
+
"absolute top-0 left-0 right-0": _ctx.hoverExpand
|
|
201
|
+
}, {
|
|
202
|
+
"absolute w-full": _ctx.state.isExpand && _ctx.hoverExpand
|
|
203
|
+
}, {
|
|
204
|
+
"z-[2]": _ctx.state.isExpand && _ctx.hoverExpand && (_ctx.state.inputHovering || _ctx.state.visible)
|
|
205
|
+
}])
|
|
206
|
+
},
|
|
207
|
+
[_ctx.shape === "filter" ? (openBlock(), createBlock(_component_tiny_filter_box, {
|
|
208
|
+
key: 0,
|
|
209
|
+
ref: "reference",
|
|
210
|
+
onClick: _ctx.toggleMenu,
|
|
211
|
+
"show-close": _ctx.clearable,
|
|
212
|
+
placeholder: _ctx.placeholder,
|
|
213
|
+
disabled: _ctx.state.selectDisabled,
|
|
214
|
+
label: _ctx.label,
|
|
215
|
+
tip: _ctx.tip,
|
|
216
|
+
value: _ctx.multiple ? _ctx.state.selected.map(function(item) {
|
|
217
|
+
return item.state ? item.state.currentLabel : item.currentLabel;
|
|
218
|
+
}).join("; ") : _ctx.state.selectedLabel,
|
|
219
|
+
"drop-down-visible": _ctx.state.visible,
|
|
220
|
+
blank: _ctx.blank
|
|
221
|
+
}, 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(
|
|
222
|
+
"div",
|
|
223
|
+
{
|
|
224
|
+
key: 1,
|
|
225
|
+
ref: "tags",
|
|
226
|
+
class: normalizeClass(_ctx.m(_ctx.gcls("select-tags"), {
|
|
227
|
+
"pl-9 sm:pl-9": _ctx.slots.prefix
|
|
228
|
+
}, {
|
|
229
|
+
"overflow-y-hidden": (_ctx.state.inputHovering || _ctx.state.visible) && !_ctx.state.selected.length
|
|
230
|
+
}, {
|
|
231
|
+
"h-6 overflow-hidden": _ctx.hoverExpand
|
|
232
|
+
}, {
|
|
233
|
+
"pr-6": _ctx.state.selectDisabled
|
|
234
|
+
}, {
|
|
235
|
+
"overflow-y-auto max-h-28 h-auto": _ctx.hoverExpand && (_ctx.state.inputHovering || _ctx.state.visible)
|
|
236
|
+
})),
|
|
237
|
+
style: normalizeStyle(_ctx.state.tagsStyle)
|
|
238
|
+
},
|
|
239
|
+
[!_ctx.state.selectDisabled ? (openBlock(), createElementBlock(
|
|
240
|
+
"span",
|
|
241
|
+
{
|
|
242
|
+
key: 0,
|
|
243
|
+
class: normalizeClass([_ctx.collapseTags ? _ctx.filterable && _ctx.state.device === "pc" ? "w-auto max-w-[76%] flex" : "w-full flex" : "contents"])
|
|
244
|
+
},
|
|
245
|
+
[(_ctx.collapseTags || _ctx.state.device === "mb") && _ctx.state.selectedVal.length ? (openBlock(), createElementBlock(
|
|
246
|
+
"span",
|
|
247
|
+
{
|
|
248
|
+
key: 0,
|
|
249
|
+
class: normalizeClass(["contents", _ctx.collapseTags && _ctx.filterable ? "max-w-full flex-1" : ""])
|
|
250
|
+
},
|
|
251
|
+
[(openBlock(), createBlock(_component_tiny_tag, {
|
|
252
|
+
closable: !_ctx.state.selectDisabled && _ctx.state.device !== "mb",
|
|
253
|
+
size: _ctx.state.collapseTagSize,
|
|
254
|
+
hit: _ctx.state.selectedVal[0].state ? _ctx.state.selectedVal[0].state.hitState : _ctx.state.selectedVal[0].hitState,
|
|
255
|
+
key: _ctx.state.key,
|
|
256
|
+
type: "info",
|
|
257
|
+
class: normalizeClass(_ctx.gcls("tag-info")),
|
|
258
|
+
onClose: _cache[1] || (_cache[1] = function($event) {
|
|
259
|
+
return _ctx.deleteTag($event, _ctx.state.selectedVal[0]);
|
|
260
|
+
}),
|
|
261
|
+
"disable-transitions": ""
|
|
262
|
+
}, {
|
|
263
|
+
default: withCtx(function() {
|
|
264
|
+
return [createVNode(
|
|
265
|
+
_component_tiny_tooltip,
|
|
266
|
+
{
|
|
267
|
+
effect: "light",
|
|
268
|
+
placement: "top",
|
|
269
|
+
onMouseenter: _cache[0] || (_cache[0] = function($event) {
|
|
270
|
+
return _ctx.handleEnterTag($event, _ctx.getValueKey(_ctx.state.selectedVal[0]));
|
|
271
|
+
})
|
|
272
|
+
},
|
|
273
|
+
createSlots({
|
|
274
|
+
default: withCtx(function() {
|
|
275
|
+
return [createElementVNode(
|
|
276
|
+
"span",
|
|
277
|
+
{
|
|
278
|
+
class: normalizeClass(_ctx.gcls("tags-text"))
|
|
279
|
+
},
|
|
280
|
+
[renderSlot(_ctx.$slots, "label", {
|
|
281
|
+
item: _ctx.getLabelSlotValue(_ctx.state.selectedVal[0])
|
|
282
|
+
}, function() {
|
|
283
|
+
return [createTextVNode(
|
|
284
|
+
toDisplayString(_ctx.state.selectedVal[0].state ? _ctx.state.selectedVal[0].state.currentLabel : _ctx.state.selectedVal[0].currentLabel),
|
|
285
|
+
1
|
|
286
|
+
/* TEXT */
|
|
287
|
+
)];
|
|
288
|
+
})],
|
|
289
|
+
2
|
|
290
|
+
/* CLASS */
|
|
291
|
+
)];
|
|
292
|
+
}),
|
|
293
|
+
_: 2
|
|
294
|
+
/* DYNAMIC */
|
|
295
|
+
}, [_ctx.state.tooltipContent[_ctx.getValueKey(_ctx.state.selectedVal[0])] ? {
|
|
296
|
+
name: "content",
|
|
297
|
+
fn: withCtx(function() {
|
|
298
|
+
return [createElementVNode(
|
|
299
|
+
"span",
|
|
300
|
+
{
|
|
301
|
+
class: normalizeClass(_ctx.gcls("tags-text"))
|
|
302
|
+
},
|
|
303
|
+
[renderSlot(_ctx.$slots, "label", {
|
|
304
|
+
item: _ctx.getLabelSlotValue(_ctx.state.selectedVal[0])
|
|
305
|
+
}, function() {
|
|
306
|
+
return [createTextVNode(
|
|
307
|
+
toDisplayString(_ctx.state.selectedVal[0].state ? _ctx.state.selectedVal[0].state.currentLabel : _ctx.state.selectedVal[0].currentLabel),
|
|
308
|
+
1
|
|
309
|
+
/* TEXT */
|
|
310
|
+
)];
|
|
311
|
+
})],
|
|
312
|
+
2
|
|
313
|
+
/* CLASS */
|
|
314
|
+
)];
|
|
315
|
+
}),
|
|
316
|
+
key: "0"
|
|
317
|
+
} : void 0]),
|
|
318
|
+
1024
|
|
319
|
+
/* DYNAMIC_SLOTS */
|
|
320
|
+
)];
|
|
321
|
+
}),
|
|
322
|
+
_: 3
|
|
323
|
+
/* FORWARDED */
|
|
324
|
+
}, 8, ["closable", "size", "hit", "class"])), _ctx.state.selectedVal.length > 1 ? (openBlock(), createBlock(_component_tiny_tag, {
|
|
325
|
+
key: 0,
|
|
326
|
+
closable: false,
|
|
327
|
+
size: _ctx.state.collapseTagSize,
|
|
328
|
+
class: normalizeClass(["overflow-visible", _ctx.gcls("tag-info")]),
|
|
329
|
+
type: "info",
|
|
330
|
+
"disable-transitions": ""
|
|
331
|
+
}, {
|
|
332
|
+
default: withCtx(function() {
|
|
333
|
+
return [createElementVNode(
|
|
334
|
+
"span",
|
|
335
|
+
{
|
|
336
|
+
class: normalizeClass(_ctx.gcls("tags-text"))
|
|
337
|
+
},
|
|
338
|
+
"+ " + toDisplayString(_ctx.state.selectedVal.length - 1),
|
|
339
|
+
3
|
|
340
|
+
/* TEXT, CLASS */
|
|
341
|
+
)];
|
|
342
|
+
}),
|
|
343
|
+
_: 1
|
|
344
|
+
/* STABLE */
|
|
345
|
+
}, 8, ["size", "class"])) : createCommentVNode("v-if", true)],
|
|
346
|
+
2
|
|
347
|
+
/* CLASS */
|
|
348
|
+
)) : createCommentVNode("v-if", true), !_ctx.collapseTags ? (openBlock(), createElementBlock(
|
|
349
|
+
"span",
|
|
350
|
+
_hoisted_1,
|
|
351
|
+
[_ctx.hoverExpand ? (openBlock(), createBlock(_component_tiny_tag, {
|
|
352
|
+
class: normalizeClass(_ctx.m(_ctx.gcls("tag-info"), {
|
|
353
|
+
"visible static": _ctx.hoverExpand
|
|
354
|
+
}, {
|
|
355
|
+
"invisible absolute": _ctx.hoverExpand && (_ctx.state.inputHovering || _ctx.state.visible || _ctx.state.isHidden)
|
|
356
|
+
})),
|
|
357
|
+
type: "info",
|
|
358
|
+
"data-tag": "tags-collapse",
|
|
359
|
+
key: "tags-collapse",
|
|
360
|
+
closable: false,
|
|
361
|
+
size: _ctx.state.collapseTagSize
|
|
362
|
+
}, {
|
|
363
|
+
default: withCtx(function() {
|
|
364
|
+
return [createTextVNode(
|
|
365
|
+
"+ " + toDisplayString(_ctx.state.collapseTagsLength),
|
|
366
|
+
1
|
|
367
|
+
/* TEXT */
|
|
368
|
+
)];
|
|
369
|
+
}),
|
|
370
|
+
_: 1
|
|
371
|
+
/* STABLE */
|
|
372
|
+
}, 8, ["class", "size"])) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(
|
|
373
|
+
Fragment,
|
|
374
|
+
null,
|
|
375
|
+
renderList(_ctx.state.selected, function(item, index) {
|
|
376
|
+
return openBlock(), createBlock(_component_tiny_tag, {
|
|
377
|
+
key: _ctx.getValueKey(item),
|
|
378
|
+
closable: !item.selectDisabled && !item.required && _ctx.state.device !== "mb",
|
|
379
|
+
size: _ctx.state.collapseTagSize,
|
|
380
|
+
hit: item.state ? item.state.hitState : item.hitState,
|
|
381
|
+
class: normalizeClass(_ctx.gcls("tag-info")),
|
|
382
|
+
type: "info",
|
|
383
|
+
onClose: function onClose($event) {
|
|
384
|
+
return _ctx.deleteTag($event, item);
|
|
385
|
+
},
|
|
386
|
+
"disable-transitions": ""
|
|
387
|
+
}, {
|
|
388
|
+
default: withCtx(function() {
|
|
389
|
+
return [createVNode(_component_tiny_tooltip, {
|
|
390
|
+
effect: "light",
|
|
391
|
+
placement: "top",
|
|
392
|
+
onMouseenter: function onMouseenter($event) {
|
|
393
|
+
return _ctx.handleEnterTag($event, _ctx.getValueKey(item));
|
|
394
|
+
}
|
|
395
|
+
}, createSlots({
|
|
396
|
+
default: withCtx(function() {
|
|
397
|
+
return [!_ctx.state.visible && _ctx.state.overflow === index ? (openBlock(), createElementBlock(
|
|
398
|
+
"span",
|
|
399
|
+
{
|
|
400
|
+
key: 0,
|
|
401
|
+
class: normalizeClass(_ctx.gcls("tags-text"))
|
|
402
|
+
},
|
|
403
|
+
toDisplayString(item.state ? item.state.currentLabel + "... " : item.currentLabel + "... "),
|
|
404
|
+
3
|
|
405
|
+
/* TEXT, CLASS */
|
|
406
|
+
)) : (openBlock(), createElementBlock(
|
|
407
|
+
"span",
|
|
408
|
+
{
|
|
409
|
+
key: 1,
|
|
410
|
+
class: normalizeClass(_ctx.gcls("tags-text"))
|
|
411
|
+
},
|
|
412
|
+
[renderSlot(_ctx.$slots, "label", {
|
|
413
|
+
item: _ctx.getLabelSlotValue(item)
|
|
414
|
+
}, function() {
|
|
415
|
+
return [createTextVNode(
|
|
416
|
+
toDisplayString(item.state ? item.state.currentLabel : item.currentLabel),
|
|
417
|
+
1
|
|
418
|
+
/* TEXT */
|
|
419
|
+
)];
|
|
420
|
+
})],
|
|
421
|
+
2
|
|
422
|
+
/* CLASS */
|
|
423
|
+
))];
|
|
424
|
+
}),
|
|
425
|
+
_: 2
|
|
426
|
+
/* DYNAMIC */
|
|
427
|
+
}, [_ctx.state.tooltipContent[_ctx.getValueKey(item)] ? {
|
|
428
|
+
name: "content",
|
|
429
|
+
fn: withCtx(function() {
|
|
430
|
+
return [!_ctx.state.visible && _ctx.state.overflow === index ? (openBlock(), createElementBlock(
|
|
431
|
+
"span",
|
|
432
|
+
{
|
|
433
|
+
key: 0,
|
|
434
|
+
class: normalizeClass(_ctx.gcls("tags-text"))
|
|
435
|
+
},
|
|
436
|
+
toDisplayString(item.state ? item.state.currentLabel + "... " : item.currentLabel + "... "),
|
|
437
|
+
3
|
|
438
|
+
/* TEXT, CLASS */
|
|
439
|
+
)) : (openBlock(), createElementBlock(
|
|
440
|
+
"span",
|
|
441
|
+
{
|
|
442
|
+
key: 1,
|
|
443
|
+
class: normalizeClass(_ctx.gcls("tags-text"))
|
|
444
|
+
},
|
|
445
|
+
[renderSlot(_ctx.$slots, "label", {
|
|
446
|
+
item: _ctx.getLabelSlotValue(item)
|
|
447
|
+
}, function() {
|
|
448
|
+
return [createTextVNode(
|
|
449
|
+
toDisplayString(item.state ? item.state.currentLabel : item.currentLabel),
|
|
450
|
+
1
|
|
451
|
+
/* TEXT */
|
|
452
|
+
)];
|
|
453
|
+
})],
|
|
454
|
+
2
|
|
455
|
+
/* CLASS */
|
|
456
|
+
))];
|
|
457
|
+
}),
|
|
458
|
+
key: "0"
|
|
459
|
+
} : void 0]), 1032, ["onMouseenter"])];
|
|
460
|
+
}),
|
|
461
|
+
_: 2
|
|
462
|
+
/* DYNAMIC */
|
|
463
|
+
}, 1032, ["closable", "size", "hit", "class", "onClose"]);
|
|
464
|
+
}),
|
|
465
|
+
128
|
|
466
|
+
/* KEYED_FRAGMENT */
|
|
467
|
+
))],
|
|
468
|
+
512
|
|
469
|
+
/* NEED_PATCH */
|
|
470
|
+
)) : createCommentVNode("v-if", true)],
|
|
471
|
+
2
|
|
472
|
+
/* CLASS */
|
|
473
|
+
)) : (openBlock(), createElementBlock(
|
|
474
|
+
"span",
|
|
475
|
+
{
|
|
476
|
+
key: 1,
|
|
477
|
+
class: normalizeClass([_ctx.gcls("tags-text"), "flex"])
|
|
478
|
+
},
|
|
479
|
+
[createVNode(_component_tiny_tooltip, {
|
|
480
|
+
effect: "light",
|
|
481
|
+
placement: "top",
|
|
482
|
+
disabled: !_ctx.showTips || _ctx.state.device === "mb"
|
|
483
|
+
}, {
|
|
484
|
+
content: withCtx(function() {
|
|
485
|
+
return [createElementVNode(
|
|
486
|
+
"div",
|
|
487
|
+
{
|
|
488
|
+
class: normalizeClass([_ctx.state.showTips && "max-h-[theme(spacing.72)] overflow-x-hidden w-full", "inline-block"])
|
|
489
|
+
},
|
|
490
|
+
[_ctx.slots.label ? (openBlock(), createElementBlock("span", _hoisted_3, [(openBlock(true), createElementBlock(
|
|
491
|
+
Fragment,
|
|
492
|
+
null,
|
|
493
|
+
renderList(_ctx.state.selected, function(item) {
|
|
494
|
+
return openBlock(), createElementBlock("span", {
|
|
495
|
+
key: _ctx.getValueKey(item)
|
|
496
|
+
}, [renderSlot(_ctx.$slots, "label", {
|
|
497
|
+
item
|
|
498
|
+
})]);
|
|
499
|
+
}),
|
|
500
|
+
128
|
|
501
|
+
/* KEYED_FRAGMENT */
|
|
502
|
+
))])) : (openBlock(), createElementBlock(
|
|
503
|
+
"span",
|
|
504
|
+
_hoisted_4,
|
|
505
|
+
toDisplayString(_ctx.disabledTooltipContent || _ctx.state.disabledTooltipContent),
|
|
506
|
+
1
|
|
507
|
+
/* TEXT */
|
|
508
|
+
))],
|
|
509
|
+
2
|
|
510
|
+
/* CLASS */
|
|
511
|
+
)];
|
|
512
|
+
}),
|
|
513
|
+
default: withCtx(function() {
|
|
514
|
+
return [createElementVNode("span", _hoisted_2, [(openBlock(true), createElementBlock(
|
|
515
|
+
Fragment,
|
|
516
|
+
null,
|
|
517
|
+
renderList(_ctx.state.selected, function(item) {
|
|
518
|
+
return openBlock(), createElementBlock("span", {
|
|
519
|
+
key: item.value
|
|
520
|
+
}, [renderSlot(_ctx.$slots, "label", {
|
|
521
|
+
item
|
|
522
|
+
}, function() {
|
|
523
|
+
return [createTextVNode(
|
|
524
|
+
toDisplayString(item.state ? item.state.currentLabel : item.currentLabel),
|
|
525
|
+
1
|
|
526
|
+
/* TEXT */
|
|
527
|
+
)];
|
|
528
|
+
}), createTextVNode("; ")]);
|
|
529
|
+
}),
|
|
530
|
+
128
|
|
531
|
+
/* KEYED_FRAGMENT */
|
|
532
|
+
))])];
|
|
533
|
+
}),
|
|
534
|
+
_: 3
|
|
535
|
+
/* FORWARDED */
|
|
536
|
+
}, 8, ["disabled"])],
|
|
537
|
+
2
|
|
538
|
+
/* CLASS */
|
|
539
|
+
)), _ctx.filterable && !_ctx.state.selectDisabled ? withDirectives((openBlock(), createElementBlock("input", {
|
|
540
|
+
key: 2,
|
|
541
|
+
ref: "input",
|
|
542
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = function($event) {
|
|
543
|
+
return _ctx.state.query = $event;
|
|
544
|
+
}),
|
|
545
|
+
type: "text",
|
|
546
|
+
class: normalizeClass(["hidden sm:inline-block border-none outline-0 p-0 ml-px text-color-text-primary text-xs h-7 appearance-none bg-transparent", [_ctx.state.selectSize === "mini" ? "h-6" : "", _ctx.state.selectSize === "small" ? "h-9" : "", _ctx.state.selectSize === "medium" ? "h-8" : ""]]),
|
|
547
|
+
disabled: _ctx.state.selectDisabled,
|
|
548
|
+
autocomplete: _ctx.autocomplete,
|
|
549
|
+
onFocus: _cache[3] || (_cache[3] = function() {
|
|
550
|
+
return _ctx.handleFocus && _ctx.handleFocus.apply(_ctx, arguments);
|
|
551
|
+
}),
|
|
552
|
+
onBlur: _cache[4] || (_cache[4] = function() {
|
|
553
|
+
return _ctx.handleBlur && _ctx.handleBlur.apply(_ctx, arguments);
|
|
554
|
+
}),
|
|
555
|
+
onKeyup: _cache[5] || (_cache[5] = function() {
|
|
556
|
+
return _ctx.managePlaceholder && _ctx.managePlaceholder.apply(_ctx, arguments);
|
|
557
|
+
}),
|
|
558
|
+
onKeydown: [_cache[6] || (_cache[6] = function() {
|
|
559
|
+
return _ctx.resetInputState && _ctx.resetInputState.apply(_ctx, arguments);
|
|
560
|
+
}), _cache[7] || (_cache[7] = withKeys(withModifiers(function($event) {
|
|
561
|
+
return _ctx.navigateOptions("next");
|
|
562
|
+
}, ["prevent"]), ["down"])), _cache[8] || (_cache[8] = withKeys(withModifiers(function($event) {
|
|
563
|
+
return _ctx.navigateOptions("prev");
|
|
564
|
+
}, ["prevent"]), ["up"])), _cache[9] || (_cache[9] = withKeys(withModifiers(function() {
|
|
565
|
+
return _ctx.selectOption && _ctx.selectOption.apply(_ctx, arguments);
|
|
566
|
+
}, ["prevent"]), ["enter"])), _cache[10] || (_cache[10] = withKeys(withModifiers(function($event) {
|
|
567
|
+
return _ctx.state.visible = false;
|
|
568
|
+
}, ["stop", "prevent"]), ["esc"])), _cache[11] || (_cache[11] = withKeys(function() {
|
|
569
|
+
return _ctx.deletePrevTag && _ctx.deletePrevTag.apply(_ctx, arguments);
|
|
570
|
+
}, ["delete"])), _cache[12] || (_cache[12] = withKeys(function($event) {
|
|
571
|
+
return _ctx.state.visible = false;
|
|
572
|
+
}, ["tab"]))],
|
|
573
|
+
onCompositionstart: _cache[13] || (_cache[13] = function() {
|
|
574
|
+
return _ctx.handleComposition && _ctx.handleComposition.apply(_ctx, arguments);
|
|
575
|
+
}),
|
|
576
|
+
onCompositionupdate: _cache[14] || (_cache[14] = function() {
|
|
577
|
+
return _ctx.handleComposition && _ctx.handleComposition.apply(_ctx, arguments);
|
|
578
|
+
}),
|
|
579
|
+
onCompositionend: _cache[15] || (_cache[15] = function() {
|
|
580
|
+
return _ctx.handleComposition && _ctx.handleComposition.apply(_ctx, arguments);
|
|
581
|
+
}),
|
|
582
|
+
onInput: _cache[16] || (_cache[16] = function() {
|
|
583
|
+
return _ctx.debouncedQueryChange && _ctx.debouncedQueryChange.apply(_ctx, arguments);
|
|
584
|
+
}),
|
|
585
|
+
style: normalizeStyle({
|
|
586
|
+
"flex-grow": "1",
|
|
587
|
+
width: _ctx.state.inputLength / (_ctx.state.inputWidth - 32) + "%",
|
|
588
|
+
"max-width": _ctx.state.inputWidth - 42 + "px",
|
|
589
|
+
height: "auto"
|
|
590
|
+
})
|
|
591
|
+
}, null, 46, _hoisted_5)), [[vModelText, _ctx.state.query]]) : createCommentVNode("v-if", true)],
|
|
592
|
+
6
|
|
593
|
+
/* CLASS, STYLE */
|
|
594
|
+
)) : createCommentVNode("v-if", true), !_ctx.shape ? (openBlock(), createBlock(_component_tiny_input, {
|
|
595
|
+
key: 2,
|
|
596
|
+
ref: "reference",
|
|
597
|
+
modelValue: _ctx.state.selectedLabel,
|
|
598
|
+
"onUpdate:modelValue": _cache[19] || (_cache[19] = function($event) {
|
|
599
|
+
return _ctx.state.selectedLabel = $event;
|
|
600
|
+
}),
|
|
601
|
+
type: "text",
|
|
602
|
+
placeholder: _ctx.state.currentPlaceholder,
|
|
603
|
+
name: _ctx.name,
|
|
604
|
+
id: _ctx.id,
|
|
605
|
+
autocomplete: _ctx.autocomplete,
|
|
606
|
+
size: _ctx.state.selectSize,
|
|
607
|
+
disabled: _ctx.state.selectDisabled,
|
|
608
|
+
readonly: _ctx.state.readonly,
|
|
609
|
+
"display-only": _ctx.state.isDisplayOnly,
|
|
610
|
+
"display-only-content": _ctx.state.displayOnlyContent,
|
|
611
|
+
unselectable: _ctx.state.readonly ? "on" : "off",
|
|
612
|
+
"validate-event": false,
|
|
613
|
+
tabindex: _ctx.multiple && _ctx.filterable ? "-1" : _ctx.tabindex,
|
|
614
|
+
onFocus: _ctx.handleFocus,
|
|
615
|
+
onBlur: _ctx.handleBlur,
|
|
616
|
+
onKeyup: _ctx.debouncedOnInputChange,
|
|
617
|
+
onKeydown: [_cache[20] || (_cache[20] = withKeys(withModifiers(function($event) {
|
|
618
|
+
return _ctx.navigateOptions("next");
|
|
619
|
+
}, ["stop", "prevent"]), ["down"])), _cache[21] || (_cache[21] = withKeys(withModifiers(function($event) {
|
|
620
|
+
return _ctx.navigateOptions("prev");
|
|
621
|
+
}, ["stop", "prevent"]), ["up"])), withKeys(withModifiers(_ctx.selectOption, ["prevent"]), ["enter"]), _cache[22] || (_cache[22] = withKeys(withModifiers(function($event) {
|
|
622
|
+
return _ctx.state.visible = false;
|
|
623
|
+
}, ["stop", "prevent"]), ["esc"])), _cache[23] || (_cache[23] = withKeys(function($event) {
|
|
624
|
+
return _ctx.state.visible = false;
|
|
625
|
+
}, ["tab"]))],
|
|
626
|
+
onPaste: _ctx.debouncedOnInputChange,
|
|
627
|
+
onMouseenter: _ctx.onMouseenterNative,
|
|
628
|
+
onMouseleave: _ctx.onMouseleaveNative,
|
|
629
|
+
onCompositionend: _ctx.handleComposition
|
|
630
|
+
}, createSlots({
|
|
631
|
+
suffix: withCtx(function() {
|
|
632
|
+
return [renderSlot(_ctx.$slots, "suffix"), _ctx.state.showCopy ? (openBlock(), createElementBlock("span", {
|
|
633
|
+
key: 0,
|
|
634
|
+
class: "h-4 cursor-pointer relative z-[1]",
|
|
635
|
+
onClick: _cache[17] || (_cache[17] = withModifiers(function() {
|
|
636
|
+
return _ctx.handleCopyClick && _ctx.handleCopyClick.apply(_ctx, arguments);
|
|
637
|
+
}, ["stop"]))
|
|
638
|
+
}, [createVNode(_component_icon_copy, {
|
|
639
|
+
class: normalizeClass([_ctx.gcls("caret"), "align-top group-hover:fill-color-brand"])
|
|
640
|
+
}, null, 8, ["class"])])) : createCommentVNode("v-if", true), _ctx.showProportion && _ctx.state.selected.length > 0 && _ctx.state.options.length > 1 ? (openBlock(), createElementBlock(
|
|
641
|
+
"span",
|
|
642
|
+
_hoisted_6,
|
|
643
|
+
toDisplayString(_ctx.state.selected.length + "/" + _ctx.state.options.length),
|
|
644
|
+
1
|
|
645
|
+
/* TEXT */
|
|
646
|
+
)) : createCommentVNode("v-if", true), _ctx.state.showClose ? (openBlock(), createBlock(_component_icon_close, {
|
|
647
|
+
key: 2,
|
|
648
|
+
class: normalizeClass([_ctx.gcls("caret"), "hidden sm:inline-block", {
|
|
649
|
+
"mr-2 fill-color-text-placeholder hover:fill-color-icon-primary": _ctx.state.showClose
|
|
650
|
+
}, {
|
|
651
|
+
"mr-1": _ctx.multiple && _ctx.state.showClose
|
|
652
|
+
}]),
|
|
653
|
+
onClick: _ctx.handleClearClick,
|
|
654
|
+
onMouseenter: _cache[18] || (_cache[18] = function($event) {
|
|
655
|
+
return _ctx.state.inputHovering = true;
|
|
656
|
+
})
|
|
657
|
+
}, null, 8, ["class", "onClick"])) : createCommentVNode("v-if", true), withDirectives((openBlock(), createBlock(resolveDynamicComponent(_ctx.dropdownIcon), {
|
|
658
|
+
class: normalizeClass(_ctx.m(_ctx.gcls("caret"), "hidden sm:inline-block", _ctx.state.iconClass, {
|
|
659
|
+
"hidden": _ctx.state.selectDisabled
|
|
660
|
+
}, {
|
|
661
|
+
"fill-color-brand-hover rotate-180 ": _ctx.state.visible
|
|
662
|
+
})),
|
|
663
|
+
onClick: _ctx.handleDropdownClick
|
|
664
|
+
}, null, 8, ["class", "onClick"])), [[vShow, !(_ctx.remote && _ctx.filterable && !_ctx.remoteConfig.showIcon)]]), createVNode(_component_icon_chevron_right, {
|
|
665
|
+
"custom-class": "h-5 w-5 sm:h-4 sm:w-4",
|
|
666
|
+
class: normalizeClass(["inline-block sm:hidden", [_ctx.state.selectDisabled ? "fill-color-icon-placeholder sm:fill-color-icon-disabled" : "fill-color-icon-secondary"]])
|
|
667
|
+
}, null, 8, ["class"])];
|
|
668
|
+
}),
|
|
669
|
+
_: 2
|
|
670
|
+
/* DYNAMIC */
|
|
671
|
+
}, [_ctx.slots.prefix ? {
|
|
672
|
+
name: "prefix",
|
|
673
|
+
fn: withCtx(function() {
|
|
674
|
+
return [renderSlot(_ctx.$slots, "prefix")];
|
|
675
|
+
}),
|
|
676
|
+
key: "0"
|
|
677
|
+
} : void 0]), 1032, ["modelValue", "placeholder", "name", "id", "autocomplete", "size", "disabled", "readonly", "display-only", "display-only-content", "unselectable", "tabindex", "onFocus", "onBlur", "onKeyup", "onKeydown", "onPaste", "onMouseenter", "onMouseleave", "onCompositionend"])) : createCommentVNode("v-if", true), createVNode(Transition, {
|
|
678
|
+
onBeforeEnter: _ctx.handleMenuEnter,
|
|
679
|
+
onAfterLeave: _ctx.doDestroy,
|
|
680
|
+
persisted: ""
|
|
681
|
+
}, {
|
|
682
|
+
default: withCtx(function() {
|
|
683
|
+
return [withDirectives(createVNode(_component_tiny_select_dropdown, {
|
|
684
|
+
ref: "popper",
|
|
685
|
+
title: _ctx.title,
|
|
686
|
+
"close-by-mask": _ctx.closeByMask,
|
|
687
|
+
"search-placeholder": _ctx.searchPlaceholder,
|
|
688
|
+
"is-drop-inherit-width": _ctx.isDropInheritWidth,
|
|
689
|
+
placement: _ctx.placement,
|
|
690
|
+
"append-to-body": _ctx.popperAppendToBody,
|
|
691
|
+
style: normalizeStyle(_ctx.dropStyle),
|
|
692
|
+
"popper-options": _ctx.popperOptions,
|
|
693
|
+
class: normalizeClass(_ctx.m("duration-300"))
|
|
694
|
+
}, {
|
|
695
|
+
default: withCtx(function() {
|
|
696
|
+
return [_ctx.shape && _ctx.filterable ? (openBlock(), createElementBlock(
|
|
697
|
+
"div",
|
|
698
|
+
{
|
|
699
|
+
key: 0,
|
|
700
|
+
class: normalizeClass(["px-3 pt-3 pb-1 hidden sm:block", [_ctx.remote && !_ctx.state.options.length ? "pb-3" : ""]])
|
|
701
|
+
},
|
|
702
|
+
[createVNode(_component_tiny_input, {
|
|
703
|
+
ref: "input",
|
|
704
|
+
type: "text",
|
|
705
|
+
modelValue: _ctx.state.query,
|
|
706
|
+
"onUpdate:modelValue": _cache[24] || (_cache[24] = function($event) {
|
|
707
|
+
return _ctx.state.query = $event;
|
|
708
|
+
}),
|
|
709
|
+
placeholder: _ctx.placeholder,
|
|
710
|
+
onInput: _ctx.debouncedQueryChange,
|
|
711
|
+
onFocus: _ctx.handleFocus,
|
|
712
|
+
autofocus: ""
|
|
713
|
+
}, null, 8, ["modelValue", "placeholder", "onInput", "onFocus"])],
|
|
714
|
+
2
|
|
715
|
+
/* CLASS */
|
|
716
|
+
)) : createCommentVNode("v-if", true), _ctx.renderType === "tree" ? (openBlock(), createBlock(_component_tiny_tree, mergeProps({
|
|
717
|
+
key: 1,
|
|
718
|
+
class: "[&_[data-tag=tiny-checkbox]_>span_>span]:p-1.5 sm:[&_[data-tag=tiny-checkbox]_>span_>span]:p-0",
|
|
719
|
+
"filter-node-method": _ctx.filterMethod,
|
|
720
|
+
props: _extends({
|
|
721
|
+
label: _ctx.textField,
|
|
722
|
+
isLeaf: "isLeaf"
|
|
723
|
+
}, _ctx.treeOp.props),
|
|
724
|
+
"expand-on-click-node": false,
|
|
725
|
+
"icon-trigger-click-node": false,
|
|
726
|
+
"node-key": _ctx.valueField,
|
|
727
|
+
"default-expand-all": _ctx.state.isExpandAll,
|
|
728
|
+
"check-strictly": _ctx.treeOp.checkStrictly,
|
|
729
|
+
"default-checked-keys": _ctx.multiple ? _ctx.state.defaultCheckedKeys : [],
|
|
730
|
+
ref: "selectTree",
|
|
731
|
+
"current-node-key": !_ctx.multiple ? _ctx.state.currentKey : "",
|
|
732
|
+
"show-checkbox": _ctx.multiple,
|
|
733
|
+
onLoadData: _ctx.loadTreeData,
|
|
734
|
+
onNodeCollapse: _ctx.nodeCollapse,
|
|
735
|
+
onNodeExpand: _ctx.nodeExpand,
|
|
736
|
+
onCheck: _ctx.nodeCheckClick,
|
|
737
|
+
onNodeClick: _ctx.treeNodeClick,
|
|
738
|
+
"show-checked-mark": _ctx.state.device === "mb"
|
|
739
|
+
}, _ctx.treeOp), null, 16, ["filter-node-method", "props", "node-key", "default-expand-all", "check-strictly", "default-checked-keys", "current-node-key", "show-checkbox", "onLoadData", "onNodeCollapse", "onNodeExpand", "onCheck", "onNodeClick", "show-checked-mark"])) : createCommentVNode("v-if", true), _ctx.optimization && _ctx.renderType !== "tree" ? (openBlock(), createElementBlock(
|
|
740
|
+
"div",
|
|
741
|
+
{
|
|
742
|
+
key: 2,
|
|
743
|
+
style: normalizeStyle({
|
|
744
|
+
height: _ctx.state.optimizeStore.recycleScrollerHeight + "px"
|
|
745
|
+
})
|
|
746
|
+
},
|
|
747
|
+
[withDirectives((openBlock(), createBlock(_component_tiny_recycle_scroller, {
|
|
748
|
+
ref: "scrollbar",
|
|
749
|
+
style: {
|
|
750
|
+
"height": "100%"
|
|
751
|
+
},
|
|
752
|
+
"key-field": _ctx.valueField,
|
|
753
|
+
key: _ctx.state.magicKey,
|
|
754
|
+
"list-class": ["tiny-select-dropdown__wrap sm:max-h-56 pb-1 sm:pb-0", _ctx.state.device === "mb" ? "scrollbar-size-0" : ""],
|
|
755
|
+
items: _ctx.state.datas,
|
|
756
|
+
"item-size": _ctx.state.optimizeOpts.optionHeight
|
|
757
|
+
}, {
|
|
758
|
+
before: withCtx(function() {
|
|
759
|
+
return [_ctx.state.showNewOption ? (openBlock(), createBlock(_component_tiny_option, {
|
|
760
|
+
key: 0,
|
|
761
|
+
highlightClass: "sm:mb-0",
|
|
762
|
+
created: "",
|
|
763
|
+
value: _ctx.state.device === "mb" ? _ctx.state.queryValue : _ctx.state.query
|
|
764
|
+
}, null, 8, ["value"])) : createCommentVNode("v-if", true)];
|
|
765
|
+
}),
|
|
766
|
+
default: withCtx(function(_ref2) {
|
|
767
|
+
var item = _ref2.item;
|
|
768
|
+
return [renderSlot(_ctx.$slots, "default", {
|
|
769
|
+
item
|
|
770
|
+
}, function() {
|
|
771
|
+
return [(openBlock(), createBlock(_component_tiny_option, {
|
|
772
|
+
class: normalizeClass(["absolute w-full"]),
|
|
773
|
+
key: "" + item[_ctx.valueField],
|
|
774
|
+
label: item[_ctx.textField],
|
|
775
|
+
value: item[_ctx.valueField],
|
|
776
|
+
disabled: item.disabled,
|
|
777
|
+
required: item.required,
|
|
778
|
+
"highlight-class": item._highlightClass,
|
|
779
|
+
events: item.events,
|
|
780
|
+
onMousedown: _cache[25] || (_cache[25] = withModifiers(function() {
|
|
781
|
+
}, ["stop"]))
|
|
782
|
+
}, null, 8, ["label", "value", "disabled", "required", "highlight-class", "events"]))];
|
|
783
|
+
})];
|
|
784
|
+
}),
|
|
785
|
+
_: 3
|
|
786
|
+
/* FORWARDED */
|
|
787
|
+
}, 8, ["key-field", "list-class", "items", "item-size"])), [[vShow, !_ctx.state.emptyFlag && !_ctx.loading]])],
|
|
788
|
+
4
|
|
789
|
+
/* STYLE */
|
|
790
|
+
)) : createCommentVNode("v-if", true), !_ctx.optimization && _ctx.renderType !== "tree" ? withDirectives((openBlock(), createBlock(_component_tiny_scrollbar, {
|
|
791
|
+
key: 3,
|
|
792
|
+
ref: "scrollbar",
|
|
793
|
+
tag: "ul",
|
|
794
|
+
"wrap-class": ["tiny-select-dropdown__wrap sm:max-h-56 pb-1 sm:pb-0", _ctx.state.device === "mb" ? "scrollbar-size-0" : ""],
|
|
795
|
+
"view-class": ["tiny-select-dropdown__list"],
|
|
796
|
+
onMousedown: _cache[33] || (_cache[33] = withModifiers(function() {
|
|
797
|
+
}, ["stop"]))
|
|
798
|
+
}, {
|
|
799
|
+
default: withCtx(function() {
|
|
800
|
+
return [renderSlot(_ctx.$slots, "dropdown"), _ctx.multiple && _ctx.showCheck && _ctx.showAlloption && !_ctx.state.multipleLimit && !_ctx.state.query && !_ctx.remote ? (openBlock(), createElementBlock(
|
|
801
|
+
"div",
|
|
802
|
+
{
|
|
803
|
+
key: 0,
|
|
804
|
+
class: normalizeClass(["whitespace-nowrap box-border py-0 h-10 leading-10 sm:h-8 sm:leading-8 text-sm sm:text-xs pl-0 pr-3 sm:px-3 my-1 sm:m-1 rounded cursor-pointer", [{
|
|
805
|
+
hover: _ctx.state.hoverIndex === -9 && _ctx.state.selectCls !== "checked-sur"
|
|
806
|
+
}, {
|
|
807
|
+
"text-color-brand sm:bg-color-fill-6 bg-color-bg-1": _ctx.state.selectCls === "checked-sur"
|
|
808
|
+
}]]),
|
|
809
|
+
"data-tag": "tiny-option",
|
|
810
|
+
onClick: _cache[26] || (_cache[26] = withModifiers(function($event) {
|
|
811
|
+
return _ctx.toggleCheckAll(false);
|
|
812
|
+
}, ["stop"])),
|
|
813
|
+
onMousedown: _cache[27] || (_cache[27] = withModifiers(function() {
|
|
814
|
+
}, ["stop"])),
|
|
815
|
+
onMouseenter: _cache[28] || (_cache[28] = function($event) {
|
|
816
|
+
return _ctx.state.hoverIndex = -9;
|
|
817
|
+
})
|
|
818
|
+
},
|
|
819
|
+
[(openBlock(), createBlock(resolveDynamicComponent("icon-" + _ctx.state.selectCls), {
|
|
820
|
+
class: normalizeClass(_ctx.m(["-mt-0.5 mr-2 fill-color-icon-secondary", _ctx.state.selectCls !== "check" && "fill-color-brand"]))
|
|
821
|
+
}, null, 8, ["class"])), createElementVNode(
|
|
822
|
+
"span",
|
|
823
|
+
{
|
|
824
|
+
class: normalizeClass([_ctx.state.selectCls === "checked-sur" ? "text-color-brand" : "text-color-text-primary"])
|
|
825
|
+
},
|
|
826
|
+
toDisplayString(_ctx.allText || _ctx.t("ui.base.all")),
|
|
827
|
+
3
|
|
828
|
+
/* TEXT, CLASS */
|
|
829
|
+
)],
|
|
830
|
+
34
|
|
831
|
+
/* CLASS, NEED_HYDRATION */
|
|
832
|
+
)) : createCommentVNode("v-if", true), _ctx.multiple && _ctx.showCheck && _ctx.showAlloption && !_ctx.state.multipleLimit && _ctx.state.query && !_ctx.state.emptyText && !_ctx.remote ? (openBlock(), createElementBlock(
|
|
833
|
+
"div",
|
|
834
|
+
{
|
|
835
|
+
key: 1,
|
|
836
|
+
class: normalizeClass(["whitespace-nowrap box-border py-0 h-10 leading-10 sm:h-8 sm:leading-8 text-sm sm:text-xs pl-0 pr-3 sm:px-3 my-1 sm:m-1 rounded cursor-pointer", [{
|
|
837
|
+
hover: _ctx.state.hoverIndex === -9 && _ctx.state.filteredSelectCls !== "checked-sur"
|
|
838
|
+
}, {
|
|
839
|
+
"text-color-brand sm:bg-color-fill-6 bg-color-bg-1": _ctx.state.filteredSelectCls === "checked-sur"
|
|
840
|
+
}]]),
|
|
841
|
+
"data-tag": "tiny-option",
|
|
842
|
+
onClick: _cache[29] || (_cache[29] = withModifiers(function($event) {
|
|
843
|
+
return _ctx.toggleCheckAll(true);
|
|
844
|
+
}, ["stop"])),
|
|
845
|
+
onMousedown: _cache[30] || (_cache[30] = withModifiers(function() {
|
|
846
|
+
}, ["stop"])),
|
|
847
|
+
onMouseenter: _cache[31] || (_cache[31] = function($event) {
|
|
848
|
+
return _ctx.state.hoverIndex = -9;
|
|
849
|
+
})
|
|
850
|
+
},
|
|
851
|
+
[(openBlock(), createBlock(resolveDynamicComponent("icon-" + _ctx.state.filteredSelectCls), {
|
|
852
|
+
class: normalizeClass(_ctx.m(["-mt-0.5 mr-2 fill-color-icon-secondary", _ctx.state.filteredSelectCls !== "check" && "fill-color-brand"]))
|
|
853
|
+
}, null, 8, ["class"])), createElementVNode(
|
|
854
|
+
"span",
|
|
855
|
+
{
|
|
856
|
+
class: normalizeClass([_ctx.state.filteredSelectCls === "checked-sur" ? "text-color-brand" : "text-color-text-primary"])
|
|
857
|
+
},
|
|
858
|
+
toDisplayString(_ctx.allText || _ctx.t("ui.base.all")),
|
|
859
|
+
3
|
|
860
|
+
/* TEXT, CLASS */
|
|
861
|
+
)],
|
|
862
|
+
34
|
|
863
|
+
/* CLASS, NEED_HYDRATION */
|
|
864
|
+
)) : createCommentVNode("v-if", true), _ctx.state.showNewOption ? (openBlock(), createBlock(_component_tiny_option, {
|
|
865
|
+
key: 2,
|
|
866
|
+
value: _ctx.state.device === "mb" ? _ctx.state.queryValue : _ctx.state.query,
|
|
867
|
+
created: ""
|
|
868
|
+
}, null, 8, ["value"])) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", {}, function() {
|
|
869
|
+
return [(openBlock(true), createElementBlock(
|
|
870
|
+
Fragment,
|
|
871
|
+
null,
|
|
872
|
+
renderList(_ctx.state.datas, function(item) {
|
|
873
|
+
return openBlock(), createBlock(_component_tiny_option, {
|
|
874
|
+
class: normalizeClass(["relative"]),
|
|
875
|
+
key: "" + item[_ctx.valueField],
|
|
876
|
+
label: item[_ctx.textField],
|
|
877
|
+
value: item[_ctx.valueField],
|
|
878
|
+
disabled: item.disabled,
|
|
879
|
+
required: item.required,
|
|
880
|
+
"highlight-class": item._highlightClass,
|
|
881
|
+
events: item.events,
|
|
882
|
+
onMousedown: _cache[32] || (_cache[32] = withModifiers(function() {
|
|
883
|
+
}, ["stop"]))
|
|
884
|
+
}, null, 8, ["label", "value", "disabled", "required", "highlight-class", "events"]);
|
|
885
|
+
}),
|
|
886
|
+
128
|
|
887
|
+
/* KEYED_FRAGMENT */
|
|
888
|
+
))];
|
|
889
|
+
})];
|
|
890
|
+
}),
|
|
891
|
+
_: 3
|
|
892
|
+
/* FORWARDED */
|
|
893
|
+
}, 8, ["wrap-class"])), [[vShow, _ctx.state.options.length > 0 && !_ctx.loading]]) : createCommentVNode("v-if", true), _ctx.renderType !== "tree" && _ctx.state.emptyText && (!_ctx.allowCreate || _ctx.loading || _ctx.allowCreate && _ctx.state.emptyFlag) ? (openBlock(), createElementBlock(
|
|
894
|
+
Fragment,
|
|
895
|
+
{
|
|
896
|
+
key: 4
|
|
897
|
+
},
|
|
898
|
+
[_ctx.loadingText || _ctx.slots.empty ? (openBlock(), createElementBlock("div", _hoisted_7, [_ctx.slots.empty ? renderSlot(_ctx.$slots, "empty", {
|
|
899
|
+
key: 0
|
|
900
|
+
}) : (openBlock(), createElementBlock(
|
|
901
|
+
"p",
|
|
902
|
+
_hoisted_8,
|
|
903
|
+
toDisplayString(_ctx.state.emptyText),
|
|
904
|
+
1
|
|
905
|
+
/* TEXT */
|
|
906
|
+
))])) : (openBlock(), createElementBlock("div", _hoisted_9, [!_ctx.loading ? (openBlock(), createElementBlock(
|
|
907
|
+
"span",
|
|
908
|
+
_hoisted_10,
|
|
909
|
+
toDisplayString(_ctx.state.emptyText),
|
|
910
|
+
1
|
|
911
|
+
/* TEXT */
|
|
912
|
+
)) : (openBlock(), createBlock(_component_icon_loading, {
|
|
913
|
+
key: 1,
|
|
914
|
+
class: "fill-color-brand h-4 w-4 inline-block align-top animate-spin"
|
|
915
|
+
}))]))],
|
|
916
|
+
64
|
|
917
|
+
/* STABLE_FRAGMENT */
|
|
918
|
+
)) : createCommentVNode("v-if", true)];
|
|
919
|
+
}),
|
|
920
|
+
_: 3
|
|
921
|
+
/* FORWARDED */
|
|
922
|
+
}, 8, ["title", "close-by-mask", "search-placeholder", "is-drop-inherit-width", "placement", "append-to-body", "style", "popper-options", "class"]), [[vShow, !_ctx.onCopying() && !_ctx.hideDrop && _ctx.state.visible && _ctx.state.emptyText !== false]])];
|
|
923
|
+
}),
|
|
924
|
+
_: 3
|
|
925
|
+
/* FORWARDED */
|
|
926
|
+
}, 8, ["onBeforeEnter", "onAfterLeave"])],
|
|
927
|
+
6
|
|
928
|
+
/* CLASS, STYLE */
|
|
929
|
+
), _ctx.hoverExpand && !_ctx.state.isDisplayOnly ? (openBlock(), createElementBlock(
|
|
930
|
+
"div",
|
|
931
|
+
{
|
|
932
|
+
key: 0,
|
|
933
|
+
class: normalizeClass(_ctx.m("h-7 invisible", {
|
|
934
|
+
"h-6": _ctx.state.selectSize === "mini"
|
|
935
|
+
}, {
|
|
936
|
+
"h-7": _ctx.state.selectSize === "small"
|
|
937
|
+
}, {
|
|
938
|
+
"h-8": _ctx.state.selectSize === "medium"
|
|
939
|
+
}))
|
|
940
|
+
},
|
|
941
|
+
_hoisted_12,
|
|
942
|
+
2
|
|
943
|
+
/* CLASS */
|
|
944
|
+
)) : createCommentVNode("v-if", true)],
|
|
945
|
+
16
|
|
946
|
+
/* FULL_PROPS */
|
|
947
|
+
)), [[_directive_popover, void 0, "popover"], [_directive_clickoutside, _ctx.handleClose]]);
|
|
774
948
|
}
|
|
775
|
-
var mobileFirst = /* @__PURE__ */
|
|
776
|
-
return __component__.exports;
|
|
777
|
-
}();
|
|
949
|
+
var mobileFirst = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
778
950
|
|
|
779
951
|
export { mobileFirst as default };
|