@opentinyvue/vue-cascader 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/pc.js CHANGED
@@ -10,36 +10,40 @@ import FilterBox from '@opentinyvue/vue-filter-box';
10
10
  import Tooltip from '@opentinyvue/vue-tooltip';
11
11
  import { iconClose, IconTriangleDown, IconUpWard, iconYes } from '@opentinyvue/vue-icon';
12
12
  import '@opentinyvue/vue-theme/cascader/index.css';
13
+ import { resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, normalizeClass, createBlock, withModifiers, createCommentVNode, createElementVNode, withCtx, resolveDynamicComponent, createTextVNode, toDisplayString, Fragment, renderList, withKeys, vModelText, createVNode, Transition, vShow, createSlots, renderSlot } from 'vue';
13
14
 
14
- function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
15
- var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
16
- if (render) {
17
- options.render = render;
18
- options.staticRenderFns = staticRenderFns;
19
- options._compiled = true;
20
- }
21
- var hook;
22
- if (injectStyles) {
23
- hook = injectStyles;
15
+ function _createForOfIteratorHelperLoose(r, e) {
16
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
17
+ if (t) return (t = t.call(r)).next.bind(t);
18
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
19
+ t && (r = t);
20
+ var o = 0;
21
+ return function() {
22
+ return o >= r.length ? { done: true } : { done: false, value: r[o++] };
23
+ };
24
24
  }
25
- if (hook) {
26
- if (options.functional) {
27
- options._injectStyles = hook;
28
- var originalRender = options.render;
29
- options.render = function renderWithStyleInjection(h, context) {
30
- hook.call(context);
31
- return originalRender(h, context);
32
- };
33
- } else {
34
- var existing = options.beforeCreate;
35
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
36
- }
25
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
26
+ }
27
+ function _unsupportedIterableToArray(r, a) {
28
+ if (r) {
29
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
30
+ var t = {}.toString.call(r).slice(8, -1);
31
+ 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;
37
32
  }
38
- return {
39
- exports: scriptExports,
40
- options
41
- };
42
33
  }
34
+ function _arrayLikeToArray(r, a) {
35
+ (null == a || a > r.length) && (a = r.length);
36
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
37
+ return n;
38
+ }
39
+ var _export_sfc = function _export_sfc2(sfc, props) {
40
+ var target = sfc.__vccOpts || sfc;
41
+ for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
42
+ var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
43
+ target[key] = val;
44
+ }
45
+ return target;
46
+ };
43
47
 
44
48
  function _extends() {
45
49
  return _extends = Object.assign ? Object.assign.bind() : function(n) {
@@ -50,7 +54,7 @@ function _extends() {
50
54
  return n;
51
55
  }, _extends.apply(null, arguments);
52
56
  }
53
- var __vue2_script = defineComponent({
57
+ var _sfc_main = defineComponent({
54
58
  props: [].concat(props, ["modelValue", "options", "props", "size", "placeholder", "disabled", "clearable", "filterable", "filterMethod", "separator", "showAllLevels", "collapseTags", "debounce", "beforeFilter", "popperClass", "placement", "popperOptions", "visibleArrow", "offset", "boundariesPadding", "arrowOffset", "popperAppendToBody", "autoSize", "displayOnly", "shape", "label", "tip", "hoverExpand", "blank"]),
55
59
  emits: ["update:modelValue", "change", "visible-change", "focus", "blur", "expand-change", "active-item-change", "remove-tag", "created"],
56
60
  directives: _extends({}, directive({
@@ -84,322 +88,300 @@ var __vue2_script = defineComponent({
84
88
  });
85
89
  }
86
90
  });
87
- var render = function render2() {
88
- var _vm = this;
89
- var _h = _vm.$createElement;
90
- var _c = _vm._self._c || _h;
91
- return _c("div", {
92
- directives: [{
93
- name: "clickoutside",
94
- rawName: "v-clickoutside",
95
- value: function value() {
96
- return _vm.toggleDropDownVisible(false);
97
- },
98
- expression: "() => toggleDropDownVisible(false)"
99
- }],
100
- ref: "reference",
101
- class: ["tiny-cascader", _vm.state.realSize && "tiny-cascader--" + _vm.state.realSize, {
102
- "is-disabled": _vm.state.isDisabled
103
- }, {
104
- "tiny-cascader-multiple": _vm.state.multiple
105
- }, {
106
- "is-display-only": _vm.state.isDisplayOnly
107
- }, {
108
- "show-auto-width": _vm.state.showAutoWidth
109
- }, {
110
- "is-hover-expand": _vm.hoverExpand
111
- }],
112
- on: {
113
- "mouseenter": function mouseenter($event) {
114
- _vm.state.inputHover = true;
115
- },
116
- "mouseleave": function mouseleave($event) {
117
- _vm.state.inputHover = false;
118
- },
119
- "click": function click() {
120
- return _vm.toggleDropDownVisible(_vm.state.readonly ? void 0 : true);
121
- },
122
- "keydown": _vm.handleKeyDown
123
- }
124
- }, [_vm.shape === "filter" ? _c("tiny-filter-box", {
125
- attrs: {
126
- "show-close": _vm.clearable,
127
- "placeholder": _vm.placeholder,
128
- "disabled": _vm.state.isDisabled,
129
- "label": _vm.label,
130
- "tip": _vm.tip,
131
- "value": _vm.state.multiple ? _vm.state.presentTags.map(function(item) {
132
- return item.text;
133
- }).join("; ") : _vm.state.inputValue,
134
- "drop-down-visible": _vm.state.dropDownVisible,
135
- "blank": _vm.blank
136
- },
137
- on: {
138
- "click": function click($event) {
139
- $event.stopPropagation();
140
- return _vm.toggleDropDownVisible();
141
- }
142
- }
143
- }) : _vm._e(), _c("div", {
144
- staticClass: "tiny-cascader-content"
145
- }, [_vm.shape !== "filter" ? _c("tiny-input", {
146
- ref: "input",
147
- class: {
148
- "is-focus": _vm.state.dropDownVisible
91
+ var _hoisted_1 = {
92
+ class: "tiny-cascader-content"
93
+ };
94
+ var _hoisted_2 = ["placeholder"];
95
+ var _hoisted_3 = ["onClick"];
96
+ var _hoisted_4 = {
97
+ class: "tiny-cascader__empty-text"
98
+ };
99
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
100
+ var _component_tiny_filter_box = resolveComponent("tiny-filter-box");
101
+ var _component_icon_close = resolveComponent("icon-close");
102
+ var _component_tiny_input = resolveComponent("tiny-input");
103
+ var _component_tiny_tag = resolveComponent("tiny-tag");
104
+ var _component_tiny_tooltip = resolveComponent("tiny-tooltip");
105
+ var _component_tiny_cascader_panel = resolveComponent("tiny-cascader-panel");
106
+ var _component_icon_yes = resolveComponent("icon-yes");
107
+ var _component_tiny_scrollbar = resolveComponent("tiny-scrollbar");
108
+ var _directive_highlight_query = resolveDirective("highlight-query");
109
+ var _directive_clickoutside = resolveDirective("clickoutside");
110
+ return withDirectives((openBlock(), createElementBlock(
111
+ "div",
112
+ {
113
+ ref: "reference",
114
+ class: normalizeClass(["tiny-cascader", _ctx.state.realSize && "tiny-cascader--" + _ctx.state.realSize, {
115
+ "is-disabled": _ctx.state.isDisabled
116
+ }, {
117
+ "tiny-cascader-multiple": _ctx.state.multiple
118
+ }, {
119
+ "is-display-only": _ctx.state.isDisplayOnly
120
+ }, {
121
+ "show-auto-width": _ctx.state.showAutoWidth
122
+ }, {
123
+ "is-hover-expand": _ctx.hoverExpand
124
+ }]),
125
+ onMouseenter: _cache[11] || (_cache[11] = function($event) {
126
+ return _ctx.state.inputHover = true;
127
+ }),
128
+ onMouseleave: _cache[12] || (_cache[12] = function($event) {
129
+ return _ctx.state.inputHover = false;
130
+ }),
131
+ onClick: _cache[13] || (_cache[13] = function() {
132
+ return _ctx.toggleDropDownVisible(_ctx.state.readonly ? void 0 : true);
133
+ }),
134
+ onKeydown: _cache[14] || (_cache[14] = function() {
135
+ return _ctx.handleKeyDown && _ctx.handleKeyDown.apply(_ctx, arguments);
136
+ })
149
137
  },
150
- attrs: {
151
- "model-value": _vm.state.multiple ? _vm.state.presentText : _vm.state.inputValue,
152
- "size": _vm.state.realSize,
153
- "placeholder": _vm.state.placeholder,
154
- "readonly": _vm.state.readonly,
155
- "disabled": _vm.state.isDisabled,
156
- "display-only": _vm.displayOnly,
157
- "display-only-content": _vm.state.multiple ? _vm.state.presentTags.map(function(item) {
138
+ [_ctx.shape === "filter" ? (openBlock(), createBlock(_component_tiny_filter_box, {
139
+ key: 0,
140
+ onClick: _cache[0] || (_cache[0] = withModifiers(function($event) {
141
+ return _ctx.toggleDropDownVisible();
142
+ }, ["stop"])),
143
+ "show-close": _ctx.clearable,
144
+ placeholder: _ctx.placeholder,
145
+ disabled: _ctx.state.isDisabled,
146
+ label: _ctx.label,
147
+ tip: _ctx.tip,
148
+ value: _ctx.state.multiple ? _ctx.state.presentTags.map(function(item) {
149
+ return item.text;
150
+ }).join("; ") : _ctx.state.inputValue,
151
+ "drop-down-visible": _ctx.state.dropDownVisible,
152
+ blank: _ctx.blank
153
+ }, null, 8, ["show-close", "placeholder", "disabled", "label", "tip", "value", "drop-down-visible", "blank"])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_1, [_ctx.shape !== "filter" ? (openBlock(), createBlock(_component_tiny_input, {
154
+ key: 0,
155
+ ref: "input",
156
+ "model-value": _ctx.state.multiple ? _ctx.state.presentText : _ctx.state.inputValue,
157
+ size: _ctx.state.realSize,
158
+ placeholder: _ctx.state.placeholder,
159
+ readonly: _ctx.state.readonly,
160
+ disabled: _ctx.state.isDisabled,
161
+ "display-only": _ctx.displayOnly,
162
+ "display-only-content": _ctx.state.multiple ? _ctx.state.presentTags.map(function(item) {
158
163
  return item.text;
159
164
  }).join("; ") : "",
160
- "validate-event": false
161
- },
162
- on: {
163
- "focus": _vm.handleFocus,
164
- "blur": _vm.handleBlur,
165
- "update:modelValue": function updateModelValue(val) {
166
- return _vm.handleInput(val, {});
167
- }
168
- },
169
- scopedSlots: _vm._u([{
170
- key: "suffix",
171
- fn: function fn() {
172
- return [_vm.state.clearBtnVisible ? _c("icon-close", {
165
+ "validate-event": false,
166
+ class: normalizeClass({
167
+ "is-focus": _ctx.state.dropDownVisible
168
+ }),
169
+ onFocus: _ctx.handleFocus,
170
+ onBlur: _ctx.handleBlur,
171
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = function(val) {
172
+ return _ctx.handleInput(val, {});
173
+ })
174
+ }, {
175
+ suffix: withCtx(function() {
176
+ return [_ctx.state.clearBtnVisible ? (openBlock(), createBlock(_component_icon_close, {
173
177
  key: "clear",
174
- class: ["tiny-input__icon", "tiny-input__icon-close"],
175
- on: {
176
- "click": function click($event) {
177
- $event.stopPropagation();
178
- return _vm.handleClear.apply(null, arguments);
179
- }
180
- }
181
- }) : _c(_vm.state.dropDownVisible ? "icon-chevron-up" : "icon-chevron-down", {
178
+ class: normalizeClass(["tiny-input__icon", "tiny-input__icon-close"]),
179
+ onClick: withModifiers(_ctx.handleClear, ["stop"])
180
+ }, null, 8, ["onClick"])) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.state.dropDownVisible ? "icon-chevron-up" : "icon-chevron-down"), {
182
181
  key: "arrow-down",
183
- tag: "component",
184
- class: ["tiny-input__icon", _vm.state.dropDownVisible && "is-reverse"],
185
- on: {
186
- "click": function click($event) {
187
- $event.stopPropagation();
188
- return _vm.toggleDropDownVisible();
189
- }
190
- }
191
- })];
182
+ class: normalizeClass(["tiny-input__icon", _ctx.state.dropDownVisible && "is-reverse"]),
183
+ onClick: _cache[1] || (_cache[1] = withModifiers(function($event) {
184
+ return _ctx.toggleDropDownVisible();
185
+ }, ["stop"]))
186
+ }, null, 8, ["class"]))];
187
+ }),
188
+ _: 1
189
+ /* STABLE */
190
+ }, 8, ["model-value", "size", "placeholder", "readonly", "disabled", "display-only", "display-only-content", "class", "onFocus", "onBlur"])) : createCommentVNode("v-if", true), _ctx.state.multiple && !_ctx.state.isDisplayOnly && !_ctx.shape ? (openBlock(), createElementBlock(
191
+ "div",
192
+ {
193
+ key: 1,
194
+ ref: "tags-content",
195
+ class: normalizeClass(["tiny-cascader__tags", {
196
+ "is-expand-content": _ctx.hoverExpand && !_ctx.state.isDisabled && (_ctx.state.inputHover || _ctx.state.dropDownVisible)
197
+ }])
192
198
  },
193
- proxy: true
194
- }], null, false, 1295602185)
195
- }) : _vm._e(), _vm.state.multiple && !_vm.state.isDisplayOnly && !_vm.shape ? _c("div", {
196
- ref: "tags-content",
197
- staticClass: "tiny-cascader__tags",
198
- class: {
199
- "is-expand-content": _vm.hoverExpand && !_vm.state.isDisabled && (_vm.state.inputHover || _vm.state.dropDownVisible)
200
- }
201
- }, [_vm.hoverExpand ? _c("tiny-tag", {
202
- class: ["tiny-cascader__tags-collapse", {
203
- "is-hidden": _vm.state.isHidden
204
- }],
205
- attrs: {
206
- "type": _vm.state.tagTypeWhenMultiple,
207
- "closable": false,
208
- "size": _vm.state.tagSize
209
- }
210
- }, [_vm._v("+ " + _vm._s(_vm.state.collapseTagsLength) + " ")]) : _vm._e(), _vm._l(_vm.state.presentTags, function(tag, index) {
211
- return _c("tiny-tag", {
212
- key: tag.key,
213
- attrs: {
214
- "type": _vm.state.tagTypeWhenMultiple,
215
- "size": _vm.state.tagSize,
216
- "hit": tag.hitState,
217
- "closable": tag.closable,
218
- "disable-transitions": ""
219
- },
220
- on: {
221
- "close": function close($event) {
222
- return _vm.deleteTag(index);
223
- }
224
- },
225
- nativeOn: {
226
- "mouseenter": function mouseenter($event) {
227
- return _vm.handleMouseenter.apply(null, arguments);
228
- },
229
- "mouseleave": function mouseleave($event) {
230
- return _vm.handleMouseleave.apply(null, arguments);
231
- }
232
- }
233
- }, [_c("span", [_vm._v(_vm._s(tag.text))])]);
234
- }), _vm.filterable && !_vm.state.isDisabled ? _c("input", {
235
- directives: [{
236
- name: "model",
237
- rawName: "v-model.trim",
238
- value: _vm.state.inputValue,
239
- expression: "state.inputValue",
240
- modifiers: {
241
- "trim": true
242
- }
243
- }],
244
- staticClass: "tiny-cascader__search-input",
245
- attrs: {
246
- "type": "text",
247
- "placeholder": _vm.state.presentTags.length ? "" : _vm.placeholder
248
- },
249
- domProps: {
250
- "value": _vm.state.inputValue
251
- },
252
- on: {
253
- "input": [function($event) {
254
- if ($event.target.composing) return;
255
- _vm.$set(_vm.state, "inputValue", $event.target.value.trim());
256
- }, function(e) {
257
- return _vm.handleInput(_vm.state.inputValue, e);
258
- }],
259
- "click": function click($event) {
260
- $event.stopPropagation();
261
- return _vm.toggleDropDownVisible(true);
262
- },
263
- "keydown": function keydown($event) {
264
- if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "delete", [8, 46], $event.key, ["Backspace", "Delete", "Del"])) return null;
265
- return _vm.handleDelete.apply(null, arguments);
266
- },
267
- "blur": function blur($event) {
268
- return _vm.$forceUpdate();
269
- }
270
- }
271
- }) : _vm._e()], 2) : _vm._e()], 1), _c("tiny-tooltip", {
272
- ref: "tooltip",
273
- attrs: {
274
- "manual": true,
275
- "effect": "light",
276
- "content": _vm.state.tooltipContent,
277
- "placement": "top"
278
- },
279
- model: {
280
- value: _vm.state.tooltipVisible,
281
- callback: function callback($$v) {
282
- _vm.$set(_vm.state, "tooltipVisible", $$v);
283
- },
284
- expression: "state.tooltipVisible"
285
- }
286
- }), _c("transition", {
287
- attrs: {
288
- "name": "tiny-zoom-in-top"
289
- },
290
- on: {
291
- "after-leave": _vm.handleDropdownLeave
292
- }
293
- }, [_c("div", {
294
- directives: [{
295
- name: "show",
296
- rawName: "v-show",
297
- value: _vm.state.dropDownVisible,
298
- expression: "state.dropDownVisible"
299
- }],
300
- ref: "popper",
301
- class: ["tiny-popper", "tiny-cascader-dropdown", "tiny-cascader__dropdown", _vm.popperClass, {
302
- "is-auto-size": _vm.autoSize,
303
- "is-multiple": _vm.state.multiple
304
- }],
305
- on: {
306
- "mousedown": function mousedown($event) {
307
- $event.stopPropagation();
308
- }
309
- }
310
- }, [_c("tiny-cascader-panel", {
311
- directives: [{
312
- name: "show",
313
- rawName: "v-show",
314
- value: !_vm.state.filtering,
315
- expression: "!state.filtering"
316
- }],
317
- ref: "panel",
318
- attrs: {
319
- "options": _vm.options,
320
- "props": _vm.state.config,
321
- "border": false,
322
- "render-label": _vm.slots.default,
323
- "onlyUsePanel": false
324
- },
325
- on: {
326
- "expand-change": _vm.handleExpandChange,
327
- "close": function close($event) {
328
- return _vm.toggleDropDownVisible(false);
329
- },
330
- "load-data": _vm.computePresentContent
331
- },
332
- model: {
333
- value: _vm.state.checkedValue,
334
- callback: function callback($$v) {
335
- _vm.$set(_vm.state, "checkedValue", $$v);
336
- },
337
- expression: "state.checkedValue"
338
- }
339
- }), _vm.filterable ? _c("tiny-scrollbar", {
340
- directives: [{
341
- name: "show",
342
- rawName: "v-show",
343
- value: _vm.state.filtering,
344
- expression: "state.filtering"
345
- }],
346
- ref: "suggestionPanel",
347
- staticClass: "tiny-cascader__suggestion-panel",
348
- attrs: {
349
- "tag": "ul",
350
- "view-class": "tiny-cascader__suggestion-list"
351
- },
352
- on: {
353
- "keydown": _vm.handleSuggestionKeyDown
354
- },
355
- scopedSlots: _vm._u([_vm.state.suggestions.length ? {
356
- key: "default",
357
- fn: function fn() {
358
- return _vm._l(_vm.state.suggestions, function(item, index) {
359
- return _c("li", {
360
- directives: [{
361
- name: "highlight-query",
362
- rawName: "v-highlight-query",
363
- value: _vm.state.multiple ? _vm.state.presentText : _vm.state.inputValue,
364
- expression: "state.multiple ? state.presentText : state.inputValue"
365
- }],
366
- key: item.uid,
367
- class: ["tiny-cascader__suggestion-item", item.checked && "is-checked"],
368
- attrs: {
369
- "tabindex": -1
199
+ [_ctx.hoverExpand ? (openBlock(), createBlock(_component_tiny_tag, {
200
+ key: 0,
201
+ class: normalizeClass(["tiny-cascader__tags-collapse", {
202
+ "is-hidden": _ctx.state.isHidden
203
+ }]),
204
+ type: _ctx.state.tagTypeWhenMultiple,
205
+ closable: false,
206
+ size: _ctx.state.tagSize
207
+ }, {
208
+ default: withCtx(function() {
209
+ return [createTextVNode(
210
+ "+ " + toDisplayString(_ctx.state.collapseTagsLength),
211
+ 1
212
+ /* TEXT */
213
+ )];
214
+ }),
215
+ _: 1
216
+ /* STABLE */
217
+ }, 8, ["class", "type", "size"])) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(
218
+ Fragment,
219
+ null,
220
+ renderList(_ctx.state.presentTags, function(tag, index) {
221
+ return openBlock(), createBlock(_component_tiny_tag, {
222
+ key: tag.key,
223
+ type: _ctx.state.tagTypeWhenMultiple,
224
+ size: _ctx.state.tagSize,
225
+ hit: tag.hitState,
226
+ closable: tag.closable,
227
+ "disable-transitions": "",
228
+ onClose: function onClose($event) {
229
+ return _ctx.deleteTag(index);
370
230
  },
371
- on: {
372
- "click": function click($event) {
373
- return _vm.handleSuggestionClick(index);
374
- }
375
- }
376
- }, [_vm._t("filter", function() {
377
- return [_c("span", [_vm._v(_vm._s(item.text))])];
231
+ onMouseenter: _ctx.handleMouseenter,
232
+ onMouseleave: _ctx.handleMouseleave
378
233
  }, {
379
- "item": item.text
380
- }), item.checked ? _c("icon-yes", {
381
- staticClass: "icon-check"
382
- }) : _vm._e()], 2);
383
- });
384
- },
385
- proxy: true
386
- } : null], null, true)
387
- }, [!_vm.state.suggestions.length ? _vm._t("empty", function() {
388
- return [_c("li", {
389
- staticClass: "tiny-cascader__empty-text"
390
- }, [_vm._v(" " + _vm._s(_vm.t("ui.cascader.noMatch")) + " ")])];
391
- }) : _vm._e()], 2) : _vm._e()], 1)])], 1);
392
- };
393
- var staticRenderFns = [];
394
- var __cssModules = {};
395
- var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
396
- function __vue2_injectStyles(context) {
397
- for (var o in __cssModules) {
398
- this[o] = __cssModules[o];
399
- }
234
+ default: withCtx(function() {
235
+ return [createElementVNode(
236
+ "span",
237
+ null,
238
+ toDisplayString(tag.text),
239
+ 1
240
+ /* TEXT */
241
+ )];
242
+ }),
243
+ _: 2
244
+ /* DYNAMIC */
245
+ }, 1032, ["type", "size", "hit", "closable", "onClose", "onMouseenter", "onMouseleave"]);
246
+ }),
247
+ 128
248
+ /* KEYED_FRAGMENT */
249
+ )), _ctx.filterable && !_ctx.state.isDisabled ? withDirectives((openBlock(), createElementBlock("input", {
250
+ key: 1,
251
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = function($event) {
252
+ return _ctx.state.inputValue = $event;
253
+ }),
254
+ type: "text",
255
+ class: "tiny-cascader__search-input",
256
+ placeholder: _ctx.state.presentTags.length ? "" : _ctx.placeholder,
257
+ onInput: _cache[4] || (_cache[4] = function(e) {
258
+ return _ctx.handleInput(_ctx.state.inputValue, e);
259
+ }),
260
+ onClick: _cache[5] || (_cache[5] = withModifiers(function($event) {
261
+ return _ctx.toggleDropDownVisible(true);
262
+ }, ["stop"])),
263
+ onKeydown: _cache[6] || (_cache[6] = withKeys(function() {
264
+ return _ctx.handleDelete && _ctx.handleDelete.apply(_ctx, arguments);
265
+ }, ["delete"]))
266
+ }, null, 40, _hoisted_2)), [[vModelText, _ctx.state.inputValue, void 0, {
267
+ trim: true
268
+ }]]) : createCommentVNode("v-if", true)],
269
+ 2
270
+ /* CLASS */
271
+ )) : createCommentVNode("v-if", true)]), createVNode(_component_tiny_tooltip, {
272
+ ref: "tooltip",
273
+ modelValue: _ctx.state.tooltipVisible,
274
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = function($event) {
275
+ return _ctx.state.tooltipVisible = $event;
276
+ }),
277
+ manual: true,
278
+ effect: "light",
279
+ content: _ctx.state.tooltipContent,
280
+ placement: "top"
281
+ }, null, 8, ["modelValue", "content"]), createVNode(Transition, {
282
+ name: "tiny-zoom-in-top",
283
+ onAfterLeave: _ctx.handleDropdownLeave,
284
+ persisted: ""
285
+ }, {
286
+ default: withCtx(function() {
287
+ return [withDirectives(createElementVNode(
288
+ "div",
289
+ {
290
+ ref: "popper",
291
+ class: normalizeClass(["tiny-popper", "tiny-cascader-dropdown", "tiny-cascader__dropdown", _ctx.popperClass, {
292
+ "is-auto-size": _ctx.autoSize,
293
+ "is-multiple": _ctx.state.multiple
294
+ }]),
295
+ onMousedown: _cache[10] || (_cache[10] = withModifiers(function() {
296
+ }, ["stop"]))
297
+ },
298
+ [withDirectives(createVNode(_component_tiny_cascader_panel, {
299
+ ref: "panel",
300
+ modelValue: _ctx.state.checkedValue,
301
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = function($event) {
302
+ return _ctx.state.checkedValue = $event;
303
+ }),
304
+ options: _ctx.options,
305
+ props: _ctx.state.config,
306
+ border: false,
307
+ "render-label": _ctx.slots.default,
308
+ onExpandChange: _ctx.handleExpandChange,
309
+ onClose: _cache[9] || (_cache[9] = function($event) {
310
+ return _ctx.toggleDropDownVisible(false);
311
+ }),
312
+ onLoadData: _ctx.computePresentContent,
313
+ onlyUsePanel: false
314
+ }, null, 8, ["modelValue", "options", "props", "render-label", "onExpandChange", "onLoadData"]), [[vShow, !_ctx.state.filtering]]), _ctx.filterable ? withDirectives((openBlock(), createBlock(_component_tiny_scrollbar, {
315
+ key: 0,
316
+ ref: "suggestionPanel",
317
+ tag: "ul",
318
+ class: "tiny-cascader__suggestion-panel",
319
+ "view-class": "tiny-cascader__suggestion-list",
320
+ onKeydown: _ctx.handleSuggestionKeyDown
321
+ }, createSlots({
322
+ default: withCtx(function() {
323
+ return [!_ctx.state.suggestions.length ? renderSlot(_ctx.$slots, "empty", {
324
+ key: 0
325
+ }, function() {
326
+ return [createElementVNode(
327
+ "li",
328
+ _hoisted_4,
329
+ toDisplayString(_ctx.t("ui.cascader.noMatch")),
330
+ 1
331
+ /* TEXT */
332
+ )];
333
+ }) : createCommentVNode("v-if", true)];
334
+ }),
335
+ _: 2
336
+ /* DYNAMIC */
337
+ }, [_ctx.state.suggestions.length ? {
338
+ name: "default",
339
+ fn: withCtx(function() {
340
+ return [(openBlock(true), createElementBlock(
341
+ Fragment,
342
+ null,
343
+ renderList(_ctx.state.suggestions, function(item, index) {
344
+ return withDirectives((openBlock(), createElementBlock("li", {
345
+ key: item.uid,
346
+ class: normalizeClass(["tiny-cascader__suggestion-item", item.checked && "is-checked"]),
347
+ tabindex: -1,
348
+ onClick: function onClick($event) {
349
+ return _ctx.handleSuggestionClick(index);
350
+ }
351
+ }, [renderSlot(_ctx.$slots, "filter", {
352
+ item: item.text
353
+ }, function() {
354
+ return [createElementVNode(
355
+ "span",
356
+ null,
357
+ toDisplayString(item.text),
358
+ 1
359
+ /* TEXT */
360
+ )];
361
+ }), item.checked ? (openBlock(), createBlock(_component_icon_yes, {
362
+ key: 0,
363
+ class: "icon-check"
364
+ })) : createCommentVNode("v-if", true)], 10, _hoisted_3)), [[_directive_highlight_query, _ctx.state.multiple ? _ctx.state.presentText : _ctx.state.inputValue]]);
365
+ }),
366
+ 128
367
+ /* KEYED_FRAGMENT */
368
+ ))];
369
+ }),
370
+ key: "0"
371
+ } : void 0]), 1032, ["onKeydown"])), [[vShow, _ctx.state.filtering]]) : createCommentVNode("v-if", true)],
372
+ 34
373
+ /* CLASS, NEED_HYDRATION */
374
+ ), [[vShow, _ctx.state.dropDownVisible]])];
375
+ }),
376
+ _: 3
377
+ /* FORWARDED */
378
+ }, 8, ["onAfterLeave"])],
379
+ 34
380
+ /* CLASS, NEED_HYDRATION */
381
+ )), [[_directive_clickoutside, function() {
382
+ return _ctx.toggleDropDownVisible(false);
383
+ }]]);
400
384
  }
401
- var pc = /* @__PURE__ */ function() {
402
- return __component__.exports;
403
- }();
385
+ var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
404
386
 
405
387
  export { pc as default };