@wfrog/vc-ui 1.1.0 → 1.2.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.
Files changed (132) hide show
  1. package/README.md +3 -3
  2. package/dist/es/chunk/{OEa4tYPF.mjs → -ga82G_B.mjs} +1 -1
  3. package/dist/es/chunk/B1BnPYNG.mjs +163 -0
  4. package/dist/es/chunk/{DFOLES4O.mjs → BA2yoAwy.mjs} +403 -502
  5. package/dist/es/chunk/{BpqBBo4z.mjs → BDyXj_90.mjs} +2 -2
  6. package/dist/es/chunk/{BI0vrXwX.mjs → BI-fNJhk.mjs} +6 -3
  7. package/dist/es/chunk/{BsGCX4td.mjs → BK4T_2ha.mjs} +1 -1
  8. package/dist/es/chunk/{73YgKz3H.mjs → BLLKi_0v.mjs} +1 -1
  9. package/dist/es/chunk/{DTLPXrjb.mjs → BTsEMnf_.mjs} +1 -1
  10. package/dist/es/chunk/{B5UQmWXg.mjs → BUf50Y7Y.mjs} +41 -21
  11. package/dist/es/chunk/{BzedaLtg.mjs → BYVaz5Or.mjs} +2 -2
  12. package/dist/es/chunk/BaJ7k5Lg.mjs +209 -0
  13. package/dist/es/chunk/{Bp9jXKX0.mjs → BambM7zX.mjs} +2 -2
  14. package/dist/es/chunk/{CizMbf5K.mjs → Bl0WQiki.mjs} +1 -1
  15. package/dist/es/chunk/{CLbj8G-F.mjs → Bnot0Gwc.mjs} +12 -4
  16. package/dist/es/chunk/{4eyJqDa9.mjs → BoGGHTrJ.mjs} +4 -2
  17. package/dist/es/chunk/C7Dgjpd1.mjs +242 -0
  18. package/dist/es/chunk/{D0LB3gF-.mjs → CKbkzlkO.mjs} +104 -72
  19. package/dist/es/chunk/{DrgvuOYH.mjs → CL5WTCB3.mjs} +4 -2
  20. package/dist/es/chunk/{XwSiBVsA.mjs → CM_I1FoA.mjs} +2 -2
  21. package/dist/es/chunk/{DouIsSPi.mjs → CNILa-hz.mjs} +1 -1
  22. package/dist/es/chunk/{DRoyW749.mjs → CcKUdl3e.mjs} +12 -6
  23. package/dist/es/chunk/CidLkmft.mjs +188 -0
  24. package/dist/es/chunk/{HAog8AWU.mjs → CitH0taR.mjs} +816 -539
  25. package/dist/es/chunk/{Cu6erWl4.mjs → CzqeSQn4.mjs} +73 -38
  26. package/dist/es/chunk/{CLCfXfvv.mjs → D7JQbDFE.mjs} +154 -118
  27. package/dist/es/chunk/{DaCDeO95.mjs → D9iEroQw.mjs} +1 -207
  28. package/dist/es/chunk/{cPBw23yt.mjs → DEPZhJ0Z.mjs} +21 -16
  29. package/dist/es/chunk/{CPERtDRX.mjs → DHpbQMGk.mjs} +32 -22
  30. package/dist/es/chunk/{BHsNc7jl.mjs → DKpRXDRE.mjs} +82 -55
  31. package/dist/es/chunk/{CLMc8GzD.mjs → DMYHOxhk.mjs} +462 -311
  32. package/dist/es/chunk/{CBSopeeE.mjs → DQHGjqG5.mjs} +9 -4
  33. package/dist/es/chunk/DTEM_vYZ.mjs +23 -0
  34. package/dist/es/chunk/{NQBKROII.mjs → DWcIzeMM.mjs} +1 -1
  35. package/dist/es/chunk/{FHvLvzEB.mjs → DX38FfmL.mjs} +1088 -697
  36. package/dist/es/chunk/{DZD-YnCt.mjs → Dcm-lOj8.mjs} +4 -4
  37. package/dist/es/chunk/{09Ec85_u.mjs → DdmNdV7I.mjs} +398 -278
  38. package/dist/es/chunk/{f0-vIQGp.mjs → DfHTA5LW.mjs} +3 -3
  39. package/dist/es/chunk/DgFT6snA.mjs +835 -0
  40. package/dist/es/chunk/{DwKWIlzw.mjs → DgSzI6Fw.mjs} +106 -71
  41. package/dist/es/chunk/{BcTuAX8r.mjs → Dsye5ZEp.mjs} +5 -3
  42. package/dist/es/chunk/{BsLJxiSC.mjs → Dw-yyl2m.mjs} +1 -1
  43. package/dist/es/chunk/{DXPWe_a5.mjs → U13Qpiki.mjs} +19 -13
  44. package/dist/es/chunk/{axpwSky6.mjs → _8u_XVHh.mjs} +168 -120
  45. package/dist/es/chunk/egk9EEzo.mjs +66 -0
  46. package/dist/es/chunk/{BUEEWLrd.mjs → ezK_XQQd.mjs} +15 -6
  47. package/dist/es/chunk/{Bl2KlMdP.mjs → oW98L-44.mjs} +8 -3
  48. package/dist/es/chunk/{Dk6Bx0KT.mjs → plK2vnjp.mjs} +8 -5
  49. package/dist/es/components/awesome-icon/awesome-icon.mjs +2 -1
  50. package/dist/es/components/backbottom/backbottom.mjs +2 -2
  51. package/dist/es/components/button/button.mjs +105 -76
  52. package/dist/es/components/choice/choice.mjs +2 -2
  53. package/dist/es/components/config-provider/config-provider.d.ts +1 -0
  54. package/dist/es/components/config-provider/config-provider.mjs +13 -5
  55. package/dist/es/components/cropper/cropper.mjs +44 -33
  56. package/dist/es/components/currency/currency.mjs +5 -5
  57. package/dist/es/components/daterange-picker/daterange-picker.mjs +2267 -1522
  58. package/dist/es/components/dialog/dialog.mjs +213 -172
  59. package/dist/es/components/dialog/index.css +1 -1
  60. package/dist/es/components/dialog-camera-upload/dialog-camera-upload.mjs +11 -11
  61. package/dist/es/components/dialog-map-point/dialog-map-point.mjs +5 -4
  62. package/dist/es/components/dialog-upload-images/dialog-upload-images.mjs +495 -314
  63. package/dist/es/components/dialog-upload-images/index.css +1 -1
  64. package/dist/es/components/drag-verify/drag-verify.mjs +3 -3
  65. package/dist/es/components/drawer/drawer.mjs +136 -94
  66. package/dist/es/components/drawer/index.css +1 -1
  67. package/dist/es/components/easy-pagination/easy-pagination.mjs +2 -2
  68. package/dist/es/components/el-icon/el-icon.mjs +1 -1
  69. package/dist/es/components/el-icon/index.css +3 -2
  70. package/dist/es/components/flag/flag.mjs +2 -1
  71. package/dist/es/components/icon/icon.mjs +10 -31
  72. package/dist/es/components/icon/icon.vue.d.ts +1 -1
  73. package/dist/es/components/icon/icon2.mjs +1 -1
  74. package/dist/es/components/icon/index.mjs +2 -2
  75. package/dist/es/components/icon-picker/components/collections.vue.d.ts +625 -0
  76. package/dist/es/components/icon-picker/components/panel.vue.d.ts +9 -0
  77. package/dist/es/components/icon-picker/icon-picker.d.ts +40 -0
  78. package/dist/es/components/icon-picker/icon-picker.mjs +1375 -0
  79. package/dist/es/components/icon-picker/icon-picker.vue.d.ts +9 -0
  80. package/dist/es/components/icon-picker/index.css +121 -0
  81. package/dist/es/components/icon-picker/index.d.ts +4 -0
  82. package/dist/es/components/icon-picker/index.mjs +6 -0
  83. package/dist/es/components/iconify-icon/iconify-icon.d.ts +5 -0
  84. package/dist/es/components/iconify-icon/iconify-icon.mjs +1860 -0
  85. package/dist/es/components/iconify-icon/iconify-icon.vue.d.ts +6 -0
  86. package/dist/es/components/iconify-icon/index.css +11 -0
  87. package/dist/es/components/iconify-icon/index.d.ts +4 -0
  88. package/dist/es/components/iconify-icon/index.mjs +6 -0
  89. package/dist/es/components/image/image.mjs +5 -5
  90. package/dist/es/components/input/input.mjs +4 -4
  91. package/dist/es/components/input/input.vue.d.ts +63 -54
  92. package/dist/es/components/input-number/input-number.mjs +5 -5
  93. package/dist/es/components/pca-picker/components/c.vue.d.ts +4 -4
  94. package/dist/es/components/pca-picker/index.css +1 -1
  95. package/dist/es/components/pca-picker/pca-picker.mjs +154 -160
  96. package/dist/es/components/pca-picker/pca-picker.vue.d.ts +12 -11
  97. package/dist/es/components/qr-code/qr-code.mjs +2 -1
  98. package/dist/es/components/screenfull/screenfull.mjs +6 -5
  99. package/dist/es/components/scrollbar/index.css +18 -0
  100. package/dist/es/components/scrollbar/index.d.ts +4 -0
  101. package/dist/es/components/scrollbar/index.mjs +6 -0
  102. package/dist/es/components/scrollbar/scrollbar.d.ts +4 -0
  103. package/dist/es/components/scrollbar/scrollbar.mjs +65 -0
  104. package/dist/es/components/scrollbar/scrollbar.vue.d.ts +588 -0
  105. package/dist/es/components/select/select.mjs +7 -7
  106. package/dist/es/components/single-player/index.css +1 -1
  107. package/dist/es/components/single-player/single-player.mjs +265 -166
  108. package/dist/es/components/svg-icon/index.css +3 -2
  109. package/dist/es/components/svg-icon/svg-icon.mjs +3 -3
  110. package/dist/es/components/switch/switch.mjs +2 -2
  111. package/dist/es/components/sync-scroll-container/sync-scroll-container.mjs +2 -2
  112. package/dist/es/components/tags/tags.mjs +9 -9
  113. package/dist/es/components/text-ellipsis/text-ellipsis.mjs +4 -4
  114. package/dist/es/components/thousand-input/thousand-input.mjs +5 -4
  115. package/dist/es/components/thousand-input/thousand-input.vue.d.ts +126 -108
  116. package/dist/es/components/tinymce/index.css +1 -1
  117. package/dist/es/components/tinymce/tinymce.mjs +9 -8
  118. package/dist/es/components/tree-picker/components/popover-cascader.vue.d.ts +179 -141
  119. package/dist/es/components/tree-picker/popover-cascader.css +1 -1
  120. package/dist/es/components/tree-picker/tree-picker.mjs +10 -10
  121. package/dist/es/components/tree-picker/tree-picker.vue.d.ts +12 -11
  122. package/dist/es/components/upload-file/upload-file.mjs +3 -3
  123. package/dist/es/index.d.ts +3 -0
  124. package/dist/es/index.mjs +41 -31
  125. package/dist/global.d.ts +3 -0
  126. package/dist/index.css +166 -22
  127. package/package.json +8 -2
  128. package/dist/es/chunk/BtTIs3tG.mjs +0 -138
  129. package/dist/es/chunk/C7wQNvSS.mjs +0 -728
  130. package/dist/es/chunk/Cbhe4I9Z.mjs +0 -16
  131. package/dist/es/chunk/DihosKp1.mjs +0 -140
  132. package/dist/es/components/icon/index.css +0 -9
@@ -1,29 +1,29 @@
1
- import { shallowRef, ref, computed, watch, inject, getCurrentInstance, toRaw, defineComponent, withDirectives, createElementBlock, openBlock, withModifiers, normalizeClass, renderSlot, createElementVNode, toDisplayString, vShow, unref, toRefs, reactive, onBeforeUnmount, nextTick, normalizeStyle, createCommentVNode, onMounted, watchEffect, provide, isVNode, resolveComponent, resolveDirective, toHandlerKey, createVNode, withCtx, createBlock, Fragment, renderList, mergeProps, normalizeProps, createTextVNode, vModelText, resolveDynamicComponent } from 'vue';
2
- import { u as useTooltipContentProps, E as Ee, a as ElTooltip } from './CLMc8GzD.mjs';
3
- import { s as scrollbarEmits, E as ElScrollbar } from './axpwSky6.mjs';
4
- import { t as tagProps, E as ElTag } from './DihosKp1.mjs';
5
- import { E as ElIcon } from './cPBw23yt.mjs';
6
- import { i as isEqual } from './BsLJxiSC.mjs';
7
- import { g as get, u as useLocale } from './Dk6Bx0KT.mjs';
8
- import { c as buildProps, t as throwError, p as isObject, u as useNamespace, e as debugWarn, i as isArray$1, a as isEmpty, g as isUndefined, f as isNumber, j as isFunction, l as isPlainObject, k as isNil, h as isString, d as definePropType } from './DRoyW749.mjs';
9
- import { b as isArray } from './NQBKROII.mjs';
10
- import { _ as _export_sfc, w as withInstall, a as withNoopInstall } from './DTLPXrjb.mjs';
11
- import { u as useId } from './CBSopeeE.mjs';
1
+ import { ref, watch, inject, computed, getCurrentInstance, toRaw, defineComponent, withDirectives, createElementBlock, openBlock, withModifiers, normalizeClass, renderSlot, createElementVNode, toDisplayString, vShow, unref, toRefs, reactive, onBeforeUnmount, nextTick, normalizeStyle, createCommentVNode, onMounted, useSlots, watchEffect, provide, isVNode, shallowRef, resolveComponent, resolveDirective, mergeProps, toHandlerKey, createVNode, withCtx, createBlock, Fragment, renderList, createTextVNode, vModelText, resolveDynamicComponent } from 'vue';
2
+ import { u as useTooltipContentProps, E as Ee, a as ElTooltip } from './DMYHOxhk.mjs';
3
+ import { s as scrollbarEmits, E as ElScrollbar } from './_8u_XVHh.mjs';
4
+ import { t as tagProps, E as ElTag } from './B1BnPYNG.mjs';
5
+ import { E as ElIcon } from './DEPZhJ0Z.mjs';
6
+ import { i as isEqual } from './Dw-yyl2m.mjs';
7
+ import { g as get, u as useLocale } from './plK2vnjp.mjs';
8
+ import { c as buildProps, t as throwError, p as isObject, u as useNamespace, e as debugWarn, i as isArray$1, a as isEmpty, g as isUndefined, f as isNumber, j as isFunction, l as isPlainObject, k as isNil, h as isString, d as definePropType } from './CcKUdl3e.mjs';
9
+ import { b as isArray } from './DWcIzeMM.mjs';
10
+ import { _ as _export_sfc, w as withInstall, a as withNoopInstall } from './BTsEMnf_.mjs';
11
+ import { u as useId } from './DQHGjqG5.mjs';
12
12
  import { useResizeObserver, isIOS, isClient, useDebounceFn, useMutationObserver } from '@vueuse/core';
13
- import { u as useFormItem, a as useFormItemInputId, b as useFormDisabled, c as useFormSize } from './DXPWe_a5.mjs';
14
- import { a as useEmptyValues, u as useEmptyValuesProps } from './BcTuAX8r.mjs';
15
- import { a as useComposition, u as useFocusController } from './XwSiBVsA.mjs';
13
+ import { s as scrollIntoView } from './oW98L-44.mjs';
14
+ import { u as useFormItem, a as useFormItemInputId, b as useFormDisabled, c as useFormSize } from './U13Qpiki.mjs';
15
+ import { a as useEmptyValues, u as useEmptyValuesProps } from './Dsye5ZEp.mjs';
16
+ import { a as useComposition, u as useFocusController } from './CM_I1FoA.mjs';
16
17
  import { V as ValidateComponentsMap, i as iconPropType } from '../components/icon/icon2.mjs';
17
18
  import { g as getEventCode, E as EVENT_CODE } from './BTpNRPQW.mjs';
18
19
  import { U as UPDATE_MODEL_EVENT, C as CHANGE_EVENT } from './Ct6q2FXg.mjs';
19
- import { s as scrollIntoView } from './Bl2KlMdP.mjs';
20
- import { b as baseIteratee } from './DZD-YnCt.mjs';
21
- import { c as clamp } from './73YgKz3H.mjs';
20
+ import { b as baseIteratee } from './Dcm-lOj8.mjs';
21
+ import { c as clamp } from './BLLKi_0v.mjs';
22
22
  import { ArrowDown, CircleClose } from '@element-plus/icons-vue';
23
- import { u as useSizeProp } from './BsGCX4td.mjs';
24
- import { u as useAriaProps } from './BpqBBo4z.mjs';
25
- import { C as ClickOutside } from './DrgvuOYH.mjs';
26
- import { f as flattedChildren } from './BzedaLtg.mjs';
23
+ import { u as useSizeProp } from './BK4T_2ha.mjs';
24
+ import { u as useAriaProps } from './BDyXj_90.mjs';
25
+ import { C as ClickOutside } from './CL5WTCB3.mjs';
26
+ import { f as flattedChildren } from './BYVaz5Or.mjs';
27
27
 
28
28
  /**
29
29
  * The base implementation of `_.findIndex` and `_.findLastIndex` without
@@ -133,27 +133,6 @@ function findLastIndex(array, predicate, fromIndex) {
133
133
  return baseFindIndex(array, baseIteratee(predicate), index);
134
134
  }
135
135
 
136
- const MINIMUM_INPUT_WIDTH = 11;
137
- const BORDER_HORIZONTAL_WIDTH = 2;
138
-
139
- function useCalcInputWidth() {
140
- const calculatorRef = shallowRef();
141
- const calculatorWidth = ref(0);
142
- const inputStyle = computed(() => ({
143
- minWidth: `${Math.max(calculatorWidth.value, MINIMUM_INPUT_WIDTH)}px`
144
- }));
145
- const resetCalculatorWidth = () => {
146
- var _a, _b;
147
- calculatorWidth.value = (_b = (_a = calculatorRef.value) == null ? void 0 : _a.getBoundingClientRect().width) != null ? _b : 0;
148
- };
149
- useResizeObserver(calculatorRef, resetCalculatorWidth);
150
- return {
151
- calculatorRef,
152
- calculatorWidth,
153
- inputStyle
154
- };
155
- }
156
-
157
136
  const defaultProps = {
158
137
  label: "label",
159
138
  value: "value",
@@ -163,12 +142,16 @@ const defaultProps = {
163
142
  function useProps(props) {
164
143
  const aliasProps = ref({ ...defaultProps, ...props.props });
165
144
  let cache = { ...props.props };
166
- watch(() => props.props, (val) => {
167
- if (!isEqual(val, cache)) {
168
- aliasProps.value = { ...defaultProps, ...val };
169
- cache = { ...val };
170
- }
171
- }, { deep: true });
145
+ watch(
146
+ () => props.props,
147
+ (val) => {
148
+ if (!isEqual(val, cache)) {
149
+ aliasProps.value = { ...defaultProps, ...val };
150
+ cache = { ...val };
151
+ }
152
+ },
153
+ { deep: true }
154
+ );
172
155
  const getLabel = (option) => get(option, aliasProps.value.label);
173
156
  const getValue = (option) => get(option, aliasProps.value.value);
174
157
  const getDisabled = (option) => get(option, aliasProps.value.disabled);
@@ -248,27 +231,37 @@ function useOption(props, states) {
248
231
  const regexp = new RegExp(escapeStringRegexp(query), "i");
249
232
  states.visible = regexp.test(String(currentLabel.value)) || props.created;
250
233
  };
251
- watch(() => currentLabel.value, () => {
252
- if (!props.created && !select.props.remote)
253
- select.setSelected();
254
- });
255
- watch(() => props.value, (val, oldVal) => {
256
- const { remote, valueKey } = select.props;
257
- const shouldUpdate = remote ? val !== oldVal : !isEqual(val, oldVal);
258
- if (shouldUpdate) {
259
- select.onOptionDestroy(oldVal, instance.proxy);
260
- select.onOptionCreate(instance.proxy);
234
+ watch(
235
+ () => currentLabel.value,
236
+ () => {
237
+ if (!props.created && !select.props.remote)
238
+ select.setSelected();
261
239
  }
262
- if (!props.created && !remote) {
263
- if (valueKey && isObject(val) && isObject(oldVal) && val[valueKey] === oldVal[valueKey]) {
264
- return;
240
+ );
241
+ watch(
242
+ () => props.value,
243
+ (val, oldVal) => {
244
+ const { remote, valueKey } = select.props;
245
+ const shouldUpdate = remote ? val !== oldVal : !isEqual(val, oldVal);
246
+ if (shouldUpdate) {
247
+ select.onOptionDestroy(oldVal, instance.proxy);
248
+ select.onOptionCreate(instance.proxy);
249
+ }
250
+ if (!props.created && !remote) {
251
+ if (valueKey && isObject(val) && isObject(oldVal) && val[valueKey] === oldVal[valueKey]) {
252
+ return;
253
+ }
254
+ select.setSelected();
265
255
  }
266
- select.setSelected();
267
256
  }
268
- });
269
- watch(() => selectGroup.disabled, () => {
270
- states.groupDisabled = selectGroup.disabled;
271
- }, { immediate: true });
257
+ );
258
+ watch(
259
+ () => selectGroup.disabled,
260
+ () => {
261
+ states.groupDisabled = selectGroup.disabled;
262
+ },
263
+ { immediate: true }
264
+ );
272
265
  return {
273
266
  select,
274
267
  currentLabel,
@@ -345,24 +338,33 @@ const _sfc_main$3 = defineComponent({
345
338
  };
346
339
  }
347
340
  });
348
- function _sfc_render$3(_ctx, _cache) {
341
+ const _hoisted_1$1 = ["id", "aria-disabled", "aria-selected"];
342
+ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
349
343
  return withDirectives((openBlock(), createElementBlock("li", {
350
344
  id: _ctx.id,
351
345
  class: normalizeClass(_ctx.containerKls),
352
346
  role: "option",
353
347
  "aria-disabled": _ctx.isDisabled || void 0,
354
348
  "aria-selected": _ctx.itemSelected,
355
- onMousemove: _ctx.hoverItem,
356
- onClick: withModifiers(_ctx.selectOptionClick, ["stop"])
349
+ onMousemove: _cache[0] || (_cache[0] = (...args) => _ctx.hoverItem && _ctx.hoverItem(...args)),
350
+ onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.selectOptionClick && _ctx.selectOptionClick(...args), ["stop"]))
357
351
  }, [
358
352
  renderSlot(_ctx.$slots, "default", {}, () => [
359
- createElementVNode("span", null, toDisplayString(_ctx.currentLabel), 1)
353
+ createElementVNode(
354
+ "span",
355
+ null,
356
+ toDisplayString(_ctx.currentLabel),
357
+ 1
358
+ )
360
359
  ])
361
- ], 42, ["id", "aria-disabled", "aria-selected", "onMousemove", "onClick"])), [
360
+ ], 42, _hoisted_1$1)), [
362
361
  [vShow, _ctx.visible]
363
362
  ]);
364
363
  }
365
- var Option = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__file", "option.vue"]]);
364
+ var Option = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/option.vue"]]);
365
+
366
+ const MINIMUM_INPUT_WIDTH = 11;
367
+ const BORDER_HORIZONTAL_WIDTH = 2;
366
368
 
367
369
  const _sfc_main$2 = defineComponent({
368
370
  name: "ElSelectDropdown",
@@ -397,29 +399,45 @@ const _sfc_main$2 = defineComponent({
397
399
  }
398
400
  });
399
401
  function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
400
- return openBlock(), createElementBlock("div", {
401
- class: normalizeClass([_ctx.ns.b("dropdown"), _ctx.ns.is("multiple", _ctx.isMultiple), _ctx.popperClass]),
402
- style: normalizeStyle({ [_ctx.isFitInputWidth ? "width" : "minWidth"]: _ctx.minWidth })
403
- }, [
404
- _ctx.$slots.header ? (openBlock(), createElementBlock("div", {
405
- key: 0,
406
- class: normalizeClass(_ctx.ns.be("dropdown", "header"))
407
- }, [
408
- renderSlot(_ctx.$slots, "header")
409
- ], 2)) : createCommentVNode("v-if", true),
410
- renderSlot(_ctx.$slots, "default"),
411
- _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
412
- key: 1,
413
- class: normalizeClass(_ctx.ns.be("dropdown", "footer"))
414
- }, [
415
- renderSlot(_ctx.$slots, "footer")
416
- ], 2)) : createCommentVNode("v-if", true)
417
- ], 6);
402
+ return openBlock(), createElementBlock(
403
+ "div",
404
+ {
405
+ class: normalizeClass([_ctx.ns.b("dropdown"), _ctx.ns.is("multiple", _ctx.isMultiple), _ctx.popperClass]),
406
+ style: normalizeStyle({ [_ctx.isFitInputWidth ? "width" : "minWidth"]: _ctx.minWidth })
407
+ },
408
+ [
409
+ _ctx.$slots.header ? (openBlock(), createElementBlock(
410
+ "div",
411
+ {
412
+ key: 0,
413
+ class: normalizeClass(_ctx.ns.be("dropdown", "header"))
414
+ },
415
+ [
416
+ renderSlot(_ctx.$slots, "header")
417
+ ],
418
+ 2
419
+ )) : createCommentVNode("v-if", true),
420
+ renderSlot(_ctx.$slots, "default"),
421
+ _ctx.$slots.footer ? (openBlock(), createElementBlock(
422
+ "div",
423
+ {
424
+ key: 1,
425
+ class: normalizeClass(_ctx.ns.be("dropdown", "footer"))
426
+ },
427
+ [
428
+ renderSlot(_ctx.$slots, "footer")
429
+ ],
430
+ 2
431
+ )) : createCommentVNode("v-if", true)
432
+ ],
433
+ 6
434
+ );
418
435
  }
419
- var ElSelectMenu = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__file", "select-dropdown.vue"]]);
436
+ var ElSelectMenu = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/select-dropdown.vue"]]);
420
437
 
421
438
  const useSelect = (props, emit) => {
422
439
  const { t } = useLocale();
440
+ const slots = useSlots();
423
441
  const contentId = useId();
424
442
  const nsSelect = useNamespace("select");
425
443
  const nsInput = useNamespace("input");
@@ -497,12 +515,20 @@ const useSelect = (props, emit) => {
497
515
  const showClearBtn = computed(() => {
498
516
  return props.clearable && !selectDisabled.value && hasModelValue.value && (isFocused.value || states.inputHovering);
499
517
  });
500
- const iconComponent = computed(() => props.remote && props.filterable && !props.remoteShowSuffix ? "" : props.suffixIcon);
501
- const iconReverse = computed(() => nsSelect.is("reverse", !!(iconComponent.value && expanded.value)));
518
+ const iconComponent = computed(
519
+ () => props.remote && props.filterable && !props.remoteShowSuffix ? "" : props.suffixIcon
520
+ );
521
+ const iconReverse = computed(
522
+ () => nsSelect.is("reverse", !!(iconComponent.value && expanded.value))
523
+ );
502
524
  const validateState = computed(() => (formItem == null ? void 0 : formItem.validateState) || "");
503
- const validateIcon = computed(() => validateState.value && ValidateComponentsMap[validateState.value]);
525
+ const validateIcon = computed(
526
+ () => validateState.value && ValidateComponentsMap[validateState.value]
527
+ );
504
528
  const debounce = computed(() => props.remote ? props.debounce : 0);
505
- const isRemoteSearchEmpty = computed(() => props.remote && !states.inputValue && states.options.size === 0);
529
+ const isRemoteSearchEmpty = computed(
530
+ () => props.remote && !states.inputValue && states.options.size === 0
531
+ );
506
532
  const emptyText = computed(() => {
507
533
  if (props.loading) {
508
534
  return props.loadingText || t("el.select.loading");
@@ -516,7 +542,9 @@ const useSelect = (props, emit) => {
516
542
  }
517
543
  return null;
518
544
  });
519
- const filteredOptionsCount = computed(() => optionsArray.value.filter((option) => option.visible).length);
545
+ const filteredOptionsCount = computed(
546
+ () => optionsArray.value.filter((option) => option.visible).length
547
+ );
520
548
  const optionsArray = computed(() => {
521
549
  const list = Array.from(states.options.values());
522
550
  const newList = [];
@@ -528,7 +556,9 @@ const useSelect = (props, emit) => {
528
556
  });
529
557
  return newList.length >= list.length ? newList : list;
530
558
  });
531
- const cachedOptionsArray = computed(() => Array.from(states.cachedOptions.values()));
559
+ const cachedOptionsArray = computed(
560
+ () => Array.from(states.cachedOptions.values())
561
+ );
532
562
  const showNewOption = computed(() => {
533
563
  const hasExistingOption = optionsArray.value.filter((option) => {
534
564
  return !option.created;
@@ -548,10 +578,12 @@ const useSelect = (props, emit) => {
548
578
  });
549
579
  };
550
580
  const selectSize = useFormSize();
551
- const collapseTagSize = computed(() => ["small"].includes(selectSize.value) ? "small" : "default");
581
+ const collapseTagSize = computed(
582
+ () => ["small"].includes(selectSize.value) ? "small" : "default"
583
+ );
552
584
  const dropdownMenuVisible = computed({
553
585
  get() {
554
- return expanded.value && (props.loading || !isRemoteSearchEmpty.value) && (!debouncing.value || !isEmpty(states.previousQuery));
586
+ return expanded.value && (props.loading || !isRemoteSearchEmpty.value || props.remote && !!slots.empty) && (!debouncing.value || !isEmpty(states.previousQuery));
555
587
  },
556
588
  set(val) {
557
589
  expanded.value = val;
@@ -570,40 +602,51 @@ const useSelect = (props, emit) => {
570
602
  return props.multiple || !hasModelValue.value ? _placeholder : states.selectedLabel;
571
603
  });
572
604
  const mouseEnterEventName = computed(() => isIOS ? null : "mouseenter");
573
- watch(() => props.modelValue, (val, oldVal) => {
574
- if (props.multiple) {
575
- if (props.filterable && !props.reserveKeyword) {
576
- states.inputValue = "";
577
- handleQueryChange("");
605
+ watch(
606
+ () => props.modelValue,
607
+ (val, oldVal) => {
608
+ if (props.multiple) {
609
+ if (props.filterable && !props.reserveKeyword) {
610
+ states.inputValue = "";
611
+ handleQueryChange("");
612
+ }
578
613
  }
614
+ setSelected();
615
+ if (!isEqual(val, oldVal) && props.validateEvent) {
616
+ formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
617
+ }
618
+ },
619
+ {
620
+ flush: "post",
621
+ deep: true
579
622
  }
580
- setSelected();
581
- if (!isEqual(val, oldVal) && props.validateEvent) {
582
- formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
583
- }
584
- }, {
585
- flush: "post",
586
- deep: true
587
- });
588
- watch(() => expanded.value, (val) => {
589
- if (val) {
590
- handleQueryChange(states.inputValue);
591
- } else {
592
- states.inputValue = "";
593
- states.previousQuery = null;
594
- states.isBeforeHide = true;
623
+ );
624
+ watch(
625
+ () => expanded.value,
626
+ (val) => {
627
+ if (val) {
628
+ handleQueryChange(states.inputValue);
629
+ } else {
630
+ states.inputValue = "";
631
+ states.previousQuery = null;
632
+ states.isBeforeHide = true;
633
+ }
595
634
  }
596
- });
597
- watch(() => states.options.entries(), () => {
598
- if (!isClient)
599
- return;
600
- setSelected();
601
- if (props.defaultFirstOption && (props.filterable || props.remote) && filteredOptionsCount.value) {
602
- checkDefaultFirstOption();
635
+ );
636
+ watch(
637
+ () => states.options.entries(),
638
+ () => {
639
+ if (!isClient)
640
+ return;
641
+ setSelected();
642
+ if (props.defaultFirstOption && (props.filterable || props.remote) && filteredOptionsCount.value) {
643
+ checkDefaultFirstOption();
644
+ }
645
+ },
646
+ {
647
+ flush: "post"
603
648
  }
604
- }, {
605
- flush: "post"
606
- });
649
+ );
607
650
  watch([() => states.hoveringIndex, optionsArray], ([val]) => {
608
651
  if (isNumber(val) && val > -1) {
609
652
  hoverOption.value = optionsArray.value[val] || {};
@@ -636,11 +679,16 @@ const useSelect = (props, emit) => {
636
679
  }
637
680
  };
638
681
  const checkDefaultFirstOption = () => {
639
- const optionsInDropdown = optionsArray.value.filter((n) => n.visible && !n.disabled && !n.states.groupDisabled);
682
+ const optionsInDropdown = optionsArray.value.filter(
683
+ (n) => n.visible && !n.disabled && !n.states.groupDisabled
684
+ );
640
685
  const userCreatedOption = optionsInDropdown.find((n) => n.created);
641
686
  const firstOriginOption = optionsInDropdown[0];
642
687
  const valueList = optionsArray.value.map((item) => item.value);
643
- states.hoveringIndex = getValueIndex(valueList, userCreatedOption || firstOriginOption);
688
+ states.hoveringIndex = getValueIndex(
689
+ valueList,
690
+ userCreatedOption || firstOriginOption
691
+ );
644
692
  };
645
693
  const setSelected = () => {
646
694
  if (!props.multiple) {
@@ -692,13 +740,17 @@ const useSelect = (props, emit) => {
692
740
  const length = states.selected.length;
693
741
  if (length > 0) {
694
742
  const lastOption = states.selected[length - 1];
695
- states.hoveringIndex = optionsArray.value.findIndex((item) => getValueKey(lastOption) === getValueKey(item));
743
+ states.hoveringIndex = optionsArray.value.findIndex(
744
+ (item) => getValueKey(lastOption) === getValueKey(item)
745
+ );
696
746
  } else {
697
747
  states.hoveringIndex = -1;
698
748
  }
699
749
  };
700
750
  const resetSelectionWidth = () => {
701
- states.selectionWidth = Number.parseFloat(window.getComputedStyle(selectionRef.value).width);
751
+ states.selectionWidth = Number.parseFloat(
752
+ window.getComputedStyle(selectionRef.value).width
753
+ );
702
754
  };
703
755
  const resetCollapseItemWidth = () => {
704
756
  states.collapseItemWidth = collapseItemRef.value.getBoundingClientRect().width;
@@ -829,13 +881,18 @@ const useSelect = (props, emit) => {
829
881
  const targetOption = isArray$1(option) ? option[option.length - 1] : option;
830
882
  let target = null;
831
883
  if (!isNil(targetOption == null ? void 0 : targetOption.value)) {
832
- const options = optionsArray.value.filter((item) => item.value === targetOption.value);
884
+ const options = optionsArray.value.filter(
885
+ (item) => item.value === targetOption.value
886
+ );
833
887
  if (options.length > 0) {
834
888
  target = options[0].$el;
835
889
  }
836
890
  }
837
891
  if (tooltipRef.value && target) {
838
- const menu = (_d = (_c = (_b = (_a = tooltipRef.value) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.contentRef) == null ? void 0 : _c.querySelector) == null ? void 0 : _d.call(_c, `.${nsSelect.be("dropdown", "wrap")}`);
892
+ const menu = (_d = (_c = (_b = (_a = tooltipRef.value) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.contentRef) == null ? void 0 : _c.querySelector) == null ? void 0 : _d.call(
893
+ _c,
894
+ `.${nsSelect.be("dropdown", "wrap")}`
895
+ );
839
896
  if (menu) {
840
897
  scrollIntoView(menu, target);
841
898
  }
@@ -921,7 +978,9 @@ const useSelect = (props, emit) => {
921
978
  const getValueKey = (item) => {
922
979
  return isObject(item.value) ? get(item.value, props.valueKey) : item.value;
923
980
  };
924
- const optionsAllDisabled = computed(() => optionsArray.value.filter((option) => option.visible).every((option) => option.isDisabled));
981
+ const optionsAllDisabled = computed(
982
+ () => optionsArray.value.filter((option) => option.visible).every((option) => option.isDisabled)
983
+ );
925
984
  const showTagList = computed(() => {
926
985
  if (!props.multiple) {
927
986
  return [];
@@ -1058,15 +1117,18 @@ const useSelect = (props, emit) => {
1058
1117
  useResizeObserver(tagMenuRef, updateTagTooltip);
1059
1118
  useResizeObserver(collapseItemRef, resetCollapseItemWidth);
1060
1119
  let stop;
1061
- watch(() => dropdownMenuVisible.value, (newVal) => {
1062
- if (newVal) {
1063
- stop = useResizeObserver(menuRef, updateTooltip).stop;
1064
- } else {
1065
- stop == null ? void 0 : stop();
1066
- stop = void 0;
1120
+ watch(
1121
+ () => dropdownMenuVisible.value,
1122
+ (newVal) => {
1123
+ if (newVal) {
1124
+ stop = useResizeObserver(menuRef, updateTooltip).stop;
1125
+ } else {
1126
+ stop == null ? void 0 : stop();
1127
+ stop = void 0;
1128
+ }
1129
+ emit("visible-change", newVal);
1067
1130
  }
1068
- emit("visible-change", newVal);
1069
- });
1131
+ );
1070
1132
  onMounted(() => {
1071
1133
  setSelected();
1072
1134
  });
@@ -1162,7 +1224,9 @@ var ElOptions = defineComponent({
1162
1224
  var _a2, _b2, _c, _d;
1163
1225
  const name = (_a2 = (item == null ? void 0 : item.type) || {}) == null ? void 0 : _a2.name;
1164
1226
  if (name === "ElOptionGroup") {
1165
- filterOptions(!isString(item.children) && !isArray$1(item.children) && isFunction((_b2 = item.children) == null ? void 0 : _b2.default) ? (_c = item.children) == null ? void 0 : _c.default() : item.children);
1227
+ filterOptions(
1228
+ !isString(item.children) && !isArray$1(item.children) && isFunction((_b2 = item.children) == null ? void 0 : _b2.default) ? (_c = item.children) == null ? void 0 : _c.default() : item.children
1229
+ );
1166
1230
  } else if (name === "ElOption") {
1167
1231
  valueList.push((_d = item.props) == null ? void 0 : _d.value);
1168
1232
  } else if (isArray$1(item.children)) {
@@ -1331,10 +1395,15 @@ const _sfc_main$1 = defineComponent({
1331
1395
  const groupRef = ref();
1332
1396
  const instance = getCurrentInstance();
1333
1397
  const children = ref([]);
1334
- provide(selectGroupKey, reactive({
1335
- ...toRefs(props)
1336
- }));
1337
- const visible = computed(() => children.value.some((option) => option.visible === true));
1398
+ provide(
1399
+ selectGroupKey,
1400
+ reactive({
1401
+ ...toRefs(props)
1402
+ })
1403
+ );
1404
+ const visible = computed(
1405
+ () => children.value.some((option) => option.visible === true)
1406
+ );
1338
1407
  const isOption = (node) => {
1339
1408
  var _a;
1340
1409
  return node.type.name === "ElOption" && !!((_a = node.component) == null ? void 0 : _a.proxy);
@@ -1375,25 +1444,58 @@ const _sfc_main$1 = defineComponent({
1375
1444
  }
1376
1445
  });
1377
1446
  function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
1378
- return withDirectives((openBlock(), createElementBlock("ul", {
1379
- ref: "groupRef",
1380
- class: normalizeClass(_ctx.ns.be("group", "wrap"))
1381
- }, [
1382
- createElementVNode("li", {
1383
- class: normalizeClass(_ctx.ns.be("group", "title"))
1384
- }, toDisplayString(_ctx.label), 3),
1385
- createElementVNode("li", null, [
1386
- createElementVNode("ul", {
1387
- class: normalizeClass(_ctx.ns.b("group"))
1388
- }, [
1389
- renderSlot(_ctx.$slots, "default")
1390
- ], 2)
1391
- ])
1392
- ], 2)), [
1447
+ return withDirectives((openBlock(), createElementBlock(
1448
+ "ul",
1449
+ {
1450
+ ref: "groupRef",
1451
+ class: normalizeClass(_ctx.ns.be("group", "wrap"))
1452
+ },
1453
+ [
1454
+ createElementVNode(
1455
+ "li",
1456
+ {
1457
+ class: normalizeClass(_ctx.ns.be("group", "title"))
1458
+ },
1459
+ toDisplayString(_ctx.label),
1460
+ 3
1461
+ ),
1462
+ createElementVNode("li", null, [
1463
+ createElementVNode(
1464
+ "ul",
1465
+ {
1466
+ class: normalizeClass(_ctx.ns.b("group"))
1467
+ },
1468
+ [
1469
+ renderSlot(_ctx.$slots, "default")
1470
+ ],
1471
+ 2
1472
+ )
1473
+ ])
1474
+ ],
1475
+ 2
1476
+ )), [
1393
1477
  [vShow, _ctx.visible]
1394
1478
  ]);
1395
1479
  }
1396
- var OptionGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "option-group.vue"]]);
1480
+ var OptionGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/option-group.vue"]]);
1481
+
1482
+ function useCalcInputWidth() {
1483
+ const calculatorRef = shallowRef();
1484
+ const calculatorWidth = ref(0);
1485
+ const inputStyle = computed(() => ({
1486
+ minWidth: `${Math.max(calculatorWidth.value, MINIMUM_INPUT_WIDTH)}px`
1487
+ }));
1488
+ const resetCalculatorWidth = () => {
1489
+ var _a, _b;
1490
+ calculatorWidth.value = (_b = (_a = calculatorRef.value) == null ? void 0 : _a.getBoundingClientRect().width) != null ? _b : 0;
1491
+ };
1492
+ useResizeObserver(calculatorRef, resetCalculatorWidth);
1493
+ return {
1494
+ calculatorRef,
1495
+ calculatorWidth,
1496
+ inputStyle
1497
+ };
1498
+ }
1397
1499
 
1398
1500
  const COMPONENT_NAME = "ElSelect";
1399
1501
  const warnHandlerMap = /* @__PURE__ */ new WeakMap();
@@ -1401,7 +1503,9 @@ const createSelectWarnHandler = (appContext) => {
1401
1503
  return (...args) => {
1402
1504
  var _a, _b;
1403
1505
  const message = args[0];
1404
- if (!message || message.includes('Slot "default" invoked outside of the render function') && ((_a = args[2]) == null ? void 0 : _a.includes("ElTreeSelect")))
1506
+ if (!message || message.includes(
1507
+ 'Slot "default" invoked outside of the render function'
1508
+ ) && ((_a = args[2]) == null ? void 0 : _a.includes("ElTreeSelect")))
1405
1509
  return;
1406
1510
  const original = (_b = warnHandlerMap.get(appContext)) == null ? void 0 : _b.originalWarnHandler;
1407
1511
  if (original) {
@@ -1503,29 +1607,36 @@ const _sfc_main = defineComponent({
1503
1607
  }
1504
1608
  });
1505
1609
  };
1506
- watch(() => {
1507
- var _a;
1508
- return [(_a = slots.default) == null ? void 0 : _a.call(slots), modelValue.value];
1509
- }, () => {
1510
- var _a;
1511
- if (props.persistent || API.expanded.value) {
1512
- return;
1610
+ watch(
1611
+ () => {
1612
+ var _a;
1613
+ return [(_a = slots.default) == null ? void 0 : _a.call(slots), modelValue.value];
1614
+ },
1615
+ () => {
1616
+ var _a;
1617
+ if (props.persistent || API.expanded.value) {
1618
+ return;
1619
+ }
1620
+ API.states.options.clear();
1621
+ manuallyRenderSlots((_a = slots.default) == null ? void 0 : _a.call(slots));
1622
+ },
1623
+ {
1624
+ immediate: true
1513
1625
  }
1514
- API.states.options.clear();
1515
- manuallyRenderSlots((_a = slots.default) == null ? void 0 : _a.call(slots));
1516
- }, {
1517
- immediate: true
1518
- });
1519
- provide(selectKey, reactive({
1520
- props: _props,
1521
- states: API.states,
1522
- selectRef: API.selectRef,
1523
- optionsArray: API.optionsArray,
1524
- setSelected: API.setSelected,
1525
- handleOptionSelect: API.handleOptionSelect,
1526
- onOptionCreate: API.onOptionCreate,
1527
- onOptionDestroy: API.onOptionDestroy
1528
- }));
1626
+ );
1627
+ provide(
1628
+ selectKey,
1629
+ reactive({
1630
+ props: _props,
1631
+ states: API.states,
1632
+ selectRef: API.selectRef,
1633
+ optionsArray: API.optionsArray,
1634
+ setSelected: API.setSelected,
1635
+ handleOptionSelect: API.handleOptionSelect,
1636
+ onOptionCreate: API.onOptionCreate,
1637
+ onOptionDestroy: API.onOptionDestroy
1638
+ })
1639
+ );
1529
1640
  const selectedLabel = computed(() => {
1530
1641
  if (!props.multiple) {
1531
1642
  return API.states.selectedLabel;
@@ -1556,7 +1667,10 @@ const _sfc_main = defineComponent({
1556
1667
  };
1557
1668
  }
1558
1669
  });
1559
- function _sfc_render(_ctx, _cache) {
1670
+ const _hoisted_1 = ["id", "name", "disabled", "autocomplete", "tabindex", "readonly", "aria-activedescendant", "aria-controls", "aria-expanded", "aria-label"];
1671
+ const _hoisted_2 = ["textContent"];
1672
+ const _hoisted_3 = { key: 1 };
1673
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1560
1674
  const _component_el_tag = resolveComponent("el-tag");
1561
1675
  const _component_el_tooltip = resolveComponent("el-tooltip");
1562
1676
  const _component_el_icon = resolveComponent("el-icon");
@@ -1566,371 +1680,534 @@ function _sfc_render(_ctx, _cache) {
1566
1680
  const _component_el_scrollbar = resolveComponent("el-scrollbar");
1567
1681
  const _component_el_select_menu = resolveComponent("el-select-menu");
1568
1682
  const _directive_click_outside = resolveDirective("click-outside");
1569
- return withDirectives((openBlock(), createElementBlock("div", {
1570
- ref: "selectRef",
1571
- class: normalizeClass([_ctx.nsSelect.b(), _ctx.nsSelect.m(_ctx.selectSize)]),
1572
- [toHandlerKey(_ctx.mouseEnterEventName)]: ($event) => _ctx.states.inputHovering = true,
1573
- onMouseleave: ($event) => _ctx.states.inputHovering = false
1574
- }, [
1575
- createVNode(_component_el_tooltip, {
1576
- ref: "tooltipRef",
1577
- visible: _ctx.dropdownMenuVisible,
1578
- placement: _ctx.placement,
1579
- teleported: _ctx.teleported,
1580
- "popper-class": [_ctx.nsSelect.e("popper"), _ctx.popperClass],
1581
- "popper-style": _ctx.popperStyle,
1582
- "popper-options": _ctx.popperOptions,
1583
- "fallback-placements": _ctx.fallbackPlacements,
1584
- effect: _ctx.effect,
1585
- pure: "",
1586
- trigger: "click",
1587
- transition: `${_ctx.nsSelect.namespace.value}-zoom-in-top`,
1588
- "stop-popper-mouse-event": false,
1589
- "gpu-acceleration": false,
1590
- persistent: _ctx.persistent,
1591
- "append-to": _ctx.appendTo,
1592
- "show-arrow": _ctx.showArrow,
1593
- offset: _ctx.offset,
1594
- onBeforeShow: _ctx.handleMenuEnter,
1595
- onHide: ($event) => _ctx.states.isBeforeHide = false
1683
+ return withDirectives((openBlock(), createElementBlock(
1684
+ "div",
1685
+ mergeProps({
1686
+ ref: "selectRef",
1687
+ class: [_ctx.nsSelect.b(), _ctx.nsSelect.m(_ctx.selectSize)]
1596
1688
  }, {
1597
- default: withCtx(() => {
1598
- var _a;
1599
- return [
1600
- createElementVNode("div", {
1601
- ref: "wrapperRef",
1602
- class: normalizeClass([
1603
- _ctx.nsSelect.e("wrapper"),
1604
- _ctx.nsSelect.is("focused", _ctx.isFocused),
1605
- _ctx.nsSelect.is("hovering", _ctx.states.inputHovering),
1606
- _ctx.nsSelect.is("filterable", _ctx.filterable),
1607
- _ctx.nsSelect.is("disabled", _ctx.selectDisabled)
1608
- ]),
1609
- onClick: withModifiers(_ctx.toggleMenu, ["prevent"])
1610
- }, [
1611
- _ctx.$slots.prefix ? (openBlock(), createElementBlock("div", {
1612
- key: 0,
1613
- ref: "prefixRef",
1614
- class: normalizeClass(_ctx.nsSelect.e("prefix"))
1615
- }, [
1616
- renderSlot(_ctx.$slots, "prefix")
1617
- ], 2)) : createCommentVNode("v-if", true),
1618
- createElementVNode("div", {
1619
- ref: "selectionRef",
1620
- class: normalizeClass([
1621
- _ctx.nsSelect.e("selection"),
1622
- _ctx.nsSelect.is("near", _ctx.multiple && !_ctx.$slots.prefix && !!_ctx.states.selected.length)
1623
- ])
1624
- }, [
1625
- _ctx.multiple ? renderSlot(_ctx.$slots, "tag", {
1626
- key: 0,
1627
- data: _ctx.states.selected,
1628
- deleteTag: _ctx.deleteTag,
1629
- selectDisabled: _ctx.selectDisabled
1630
- }, () => [
1631
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.showTagList, (item) => {
1632
- return openBlock(), createElementBlock("div", {
1633
- key: _ctx.getValueKey(item),
1634
- class: normalizeClass(_ctx.nsSelect.e("selected-item"))
1635
- }, [
1636
- createVNode(_component_el_tag, {
1637
- closable: !_ctx.selectDisabled && !item.isDisabled,
1638
- size: _ctx.collapseTagSize,
1639
- type: _ctx.tagType,
1640
- effect: _ctx.tagEffect,
1641
- "disable-transitions": "",
1642
- style: normalizeStyle(_ctx.tagStyle),
1643
- onClose: ($event) => _ctx.deleteTag($event, item)
1689
+ [toHandlerKey(_ctx.mouseEnterEventName)]: _cache[11] || (_cache[11] = ($event) => _ctx.states.inputHovering = true)
1690
+ }, {
1691
+ onMouseleave: _cache[12] || (_cache[12] = ($event) => _ctx.states.inputHovering = false)
1692
+ }),
1693
+ [
1694
+ createVNode(_component_el_tooltip, {
1695
+ ref: "tooltipRef",
1696
+ visible: _ctx.dropdownMenuVisible,
1697
+ placement: _ctx.placement,
1698
+ teleported: _ctx.teleported,
1699
+ "popper-class": [_ctx.nsSelect.e("popper"), _ctx.popperClass],
1700
+ "popper-style": _ctx.popperStyle,
1701
+ "popper-options": _ctx.popperOptions,
1702
+ "fallback-placements": _ctx.fallbackPlacements,
1703
+ effect: _ctx.effect,
1704
+ pure: "",
1705
+ trigger: "click",
1706
+ transition: `${_ctx.nsSelect.namespace.value}-zoom-in-top`,
1707
+ "stop-popper-mouse-event": false,
1708
+ "gpu-acceleration": false,
1709
+ persistent: _ctx.persistent,
1710
+ "append-to": _ctx.appendTo,
1711
+ "show-arrow": _ctx.showArrow,
1712
+ offset: _ctx.offset,
1713
+ onBeforeShow: _ctx.handleMenuEnter,
1714
+ onHide: _cache[10] || (_cache[10] = ($event) => _ctx.states.isBeforeHide = false)
1715
+ }, {
1716
+ default: withCtx(() => {
1717
+ var _a;
1718
+ return [
1719
+ createElementVNode(
1720
+ "div",
1721
+ {
1722
+ ref: "wrapperRef",
1723
+ class: normalizeClass([
1724
+ _ctx.nsSelect.e("wrapper"),
1725
+ _ctx.nsSelect.is("focused", _ctx.isFocused),
1726
+ _ctx.nsSelect.is("hovering", _ctx.states.inputHovering),
1727
+ _ctx.nsSelect.is("filterable", _ctx.filterable),
1728
+ _ctx.nsSelect.is("disabled", _ctx.selectDisabled)
1729
+ ]),
1730
+ onClick: _cache[7] || (_cache[7] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["prevent"]))
1731
+ },
1732
+ [
1733
+ _ctx.$slots.prefix ? (openBlock(), createElementBlock(
1734
+ "div",
1735
+ {
1736
+ key: 0,
1737
+ ref: "prefixRef",
1738
+ class: normalizeClass(_ctx.nsSelect.e("prefix"))
1739
+ },
1740
+ [
1741
+ renderSlot(_ctx.$slots, "prefix")
1742
+ ],
1743
+ 2
1744
+ )) : createCommentVNode("v-if", true),
1745
+ createElementVNode(
1746
+ "div",
1747
+ {
1748
+ ref: "selectionRef",
1749
+ class: normalizeClass([
1750
+ _ctx.nsSelect.e("selection"),
1751
+ _ctx.nsSelect.is(
1752
+ "near",
1753
+ _ctx.multiple && !_ctx.$slots.prefix && !!_ctx.states.selected.length
1754
+ )
1755
+ ])
1756
+ },
1757
+ [
1758
+ _ctx.multiple ? renderSlot(_ctx.$slots, "tag", {
1759
+ key: 0,
1760
+ data: _ctx.states.selected,
1761
+ deleteTag: _ctx.deleteTag,
1762
+ selectDisabled: _ctx.selectDisabled
1763
+ }, () => [
1764
+ (openBlock(true), createElementBlock(
1765
+ Fragment,
1766
+ null,
1767
+ renderList(_ctx.showTagList, (item) => {
1768
+ return openBlock(), createElementBlock(
1769
+ "div",
1770
+ {
1771
+ key: _ctx.getValueKey(item),
1772
+ class: normalizeClass(_ctx.nsSelect.e("selected-item"))
1773
+ },
1774
+ [
1775
+ createVNode(_component_el_tag, {
1776
+ closable: !_ctx.selectDisabled && !item.isDisabled,
1777
+ size: _ctx.collapseTagSize,
1778
+ type: _ctx.tagType,
1779
+ effect: _ctx.tagEffect,
1780
+ "disable-transitions": "",
1781
+ style: normalizeStyle(_ctx.tagStyle),
1782
+ onClose: ($event) => _ctx.deleteTag($event, item)
1783
+ }, {
1784
+ default: withCtx(() => [
1785
+ createElementVNode(
1786
+ "span",
1787
+ {
1788
+ class: normalizeClass(_ctx.nsSelect.e("tags-text"))
1789
+ },
1790
+ [
1791
+ renderSlot(_ctx.$slots, "label", {
1792
+ index: item.index,
1793
+ label: item.currentLabel,
1794
+ value: item.value
1795
+ }, () => [
1796
+ createTextVNode(
1797
+ toDisplayString(item.currentLabel),
1798
+ 1
1799
+ )
1800
+ ])
1801
+ ],
1802
+ 2
1803
+ )
1804
+ ]),
1805
+ _: 2
1806
+ }, 1032, ["closable", "size", "type", "effect", "style", "onClose"])
1807
+ ],
1808
+ 2
1809
+ );
1810
+ }),
1811
+ 128
1812
+ )),
1813
+ _ctx.collapseTags && _ctx.states.selected.length > _ctx.maxCollapseTags ? (openBlock(), createBlock(_component_el_tooltip, {
1814
+ key: 0,
1815
+ ref: "tagTooltipRef",
1816
+ disabled: _ctx.dropdownMenuVisible || !_ctx.collapseTagsTooltip,
1817
+ "fallback-placements": ["bottom", "top", "right", "left"],
1818
+ effect: _ctx.effect,
1819
+ placement: "bottom",
1820
+ "popper-class": _ctx.popperClass,
1821
+ "popper-style": _ctx.popperStyle,
1822
+ teleported: _ctx.teleported,
1823
+ "popper-options": _ctx.popperOptions
1824
+ }, {
1825
+ default: withCtx(() => [
1826
+ createElementVNode(
1827
+ "div",
1828
+ {
1829
+ ref: "collapseItemRef",
1830
+ class: normalizeClass(_ctx.nsSelect.e("selected-item"))
1831
+ },
1832
+ [
1833
+ createVNode(_component_el_tag, {
1834
+ closable: false,
1835
+ size: _ctx.collapseTagSize,
1836
+ type: _ctx.tagType,
1837
+ effect: _ctx.tagEffect,
1838
+ "disable-transitions": "",
1839
+ style: normalizeStyle(_ctx.collapseTagStyle)
1840
+ }, {
1841
+ default: withCtx(() => [
1842
+ createElementVNode(
1843
+ "span",
1844
+ {
1845
+ class: normalizeClass(_ctx.nsSelect.e("tags-text"))
1846
+ },
1847
+ " + " + toDisplayString(_ctx.states.selected.length - _ctx.maxCollapseTags),
1848
+ 3
1849
+ )
1850
+ ]),
1851
+ _: 1
1852
+ }, 8, ["size", "type", "effect", "style"])
1853
+ ],
1854
+ 2
1855
+ )
1856
+ ]),
1857
+ content: withCtx(() => [
1858
+ createElementVNode(
1859
+ "div",
1860
+ {
1861
+ ref: "tagMenuRef",
1862
+ class: normalizeClass(_ctx.nsSelect.e("selection"))
1863
+ },
1864
+ [
1865
+ (openBlock(true), createElementBlock(
1866
+ Fragment,
1867
+ null,
1868
+ renderList(_ctx.collapseTagList, (item) => {
1869
+ return openBlock(), createElementBlock(
1870
+ "div",
1871
+ {
1872
+ key: _ctx.getValueKey(item),
1873
+ class: normalizeClass(_ctx.nsSelect.e("selected-item"))
1874
+ },
1875
+ [
1876
+ createVNode(_component_el_tag, {
1877
+ class: "in-tooltip",
1878
+ closable: !_ctx.selectDisabled && !item.isDisabled,
1879
+ size: _ctx.collapseTagSize,
1880
+ type: _ctx.tagType,
1881
+ effect: _ctx.tagEffect,
1882
+ "disable-transitions": "",
1883
+ onClose: ($event) => _ctx.deleteTag($event, item)
1884
+ }, {
1885
+ default: withCtx(() => [
1886
+ createElementVNode(
1887
+ "span",
1888
+ {
1889
+ class: normalizeClass(_ctx.nsSelect.e("tags-text"))
1890
+ },
1891
+ [
1892
+ renderSlot(_ctx.$slots, "label", {
1893
+ index: item.index,
1894
+ label: item.currentLabel,
1895
+ value: item.value
1896
+ }, () => [
1897
+ createTextVNode(
1898
+ toDisplayString(item.currentLabel),
1899
+ 1
1900
+ )
1901
+ ])
1902
+ ],
1903
+ 2
1904
+ )
1905
+ ]),
1906
+ _: 2
1907
+ }, 1032, ["closable", "size", "type", "effect", "onClose"])
1908
+ ],
1909
+ 2
1910
+ );
1911
+ }),
1912
+ 128
1913
+ ))
1914
+ ],
1915
+ 2
1916
+ )
1917
+ ]),
1918
+ _: 3
1919
+ }, 8, ["disabled", "effect", "popper-class", "popper-style", "teleported", "popper-options"])) : createCommentVNode("v-if", true)
1920
+ ]) : createCommentVNode("v-if", true),
1921
+ createElementVNode(
1922
+ "div",
1923
+ {
1924
+ class: normalizeClass([
1925
+ _ctx.nsSelect.e("selected-item"),
1926
+ _ctx.nsSelect.e("input-wrapper"),
1927
+ _ctx.nsSelect.is("hidden", !_ctx.filterable || _ctx.selectDisabled)
1928
+ ])
1929
+ },
1930
+ [
1931
+ withDirectives(createElementVNode("input", {
1932
+ id: _ctx.inputId,
1933
+ ref: "inputRef",
1934
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.states.inputValue = $event),
1935
+ type: "text",
1936
+ name: _ctx.name,
1937
+ class: normalizeClass([_ctx.nsSelect.e("input"), _ctx.nsSelect.is(_ctx.selectSize)]),
1938
+ disabled: _ctx.selectDisabled,
1939
+ autocomplete: _ctx.autocomplete,
1940
+ style: normalizeStyle(_ctx.inputStyle),
1941
+ tabindex: _ctx.tabindex,
1942
+ role: "combobox",
1943
+ readonly: !_ctx.filterable,
1944
+ spellcheck: "false",
1945
+ "aria-activedescendant": ((_a = _ctx.hoverOption) == null ? void 0 : _a.id) || "",
1946
+ "aria-controls": _ctx.contentId,
1947
+ "aria-expanded": _ctx.dropdownMenuVisible,
1948
+ "aria-label": _ctx.ariaLabel,
1949
+ "aria-autocomplete": "none",
1950
+ "aria-haspopup": "listbox",
1951
+ onKeydown: _cache[1] || (_cache[1] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args)),
1952
+ onCompositionstart: _cache[2] || (_cache[2] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)),
1953
+ onCompositionupdate: _cache[3] || (_cache[3] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)),
1954
+ onCompositionend: _cache[4] || (_cache[4] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)),
1955
+ onInput: _cache[5] || (_cache[5] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
1956
+ onClick: _cache[6] || (_cache[6] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["stop"]))
1957
+ }, null, 46, _hoisted_1), [
1958
+ [vModelText, _ctx.states.inputValue]
1959
+ ]),
1960
+ _ctx.filterable ? (openBlock(), createElementBlock("span", {
1961
+ key: 0,
1962
+ ref: "calculatorRef",
1963
+ "aria-hidden": "true",
1964
+ class: normalizeClass(_ctx.nsSelect.e("input-calculator")),
1965
+ textContent: toDisplayString(_ctx.states.inputValue)
1966
+ }, null, 10, _hoisted_2)) : createCommentVNode("v-if", true)
1967
+ ],
1968
+ 2
1969
+ ),
1970
+ _ctx.shouldShowPlaceholder ? (openBlock(), createElementBlock(
1971
+ "div",
1972
+ {
1973
+ key: 1,
1974
+ class: normalizeClass([
1975
+ _ctx.nsSelect.e("selected-item"),
1976
+ _ctx.nsSelect.e("placeholder"),
1977
+ _ctx.nsSelect.is(
1978
+ "transparent",
1979
+ !_ctx.hasModelValue || _ctx.expanded && !_ctx.states.inputValue
1980
+ )
1981
+ ])
1982
+ },
1983
+ [
1984
+ _ctx.hasModelValue ? renderSlot(_ctx.$slots, "label", {
1985
+ key: 0,
1986
+ index: _ctx.getOption(_ctx.modelValue).index,
1987
+ label: _ctx.currentPlaceholder,
1988
+ value: _ctx.modelValue
1989
+ }, () => [
1990
+ createElementVNode(
1991
+ "span",
1992
+ null,
1993
+ toDisplayString(_ctx.currentPlaceholder),
1994
+ 1
1995
+ )
1996
+ ]) : (openBlock(), createElementBlock(
1997
+ "span",
1998
+ _hoisted_3,
1999
+ toDisplayString(_ctx.currentPlaceholder),
2000
+ 1
2001
+ ))
2002
+ ],
2003
+ 2
2004
+ )) : createCommentVNode("v-if", true)
2005
+ ],
2006
+ 2
2007
+ ),
2008
+ createElementVNode(
2009
+ "div",
2010
+ {
2011
+ ref: "suffixRef",
2012
+ class: normalizeClass(_ctx.nsSelect.e("suffix"))
2013
+ },
2014
+ [
2015
+ _ctx.iconComponent && !_ctx.showClearBtn ? (openBlock(), createBlock(_component_el_icon, {
2016
+ key: 0,
2017
+ class: normalizeClass([_ctx.nsSelect.e("caret"), _ctx.nsSelect.e("icon"), _ctx.iconReverse])
2018
+ }, {
2019
+ default: withCtx(() => [
2020
+ (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))
2021
+ ]),
2022
+ _: 1
2023
+ }, 8, ["class"])) : createCommentVNode("v-if", true),
2024
+ _ctx.showClearBtn && _ctx.clearIcon ? (openBlock(), createBlock(_component_el_icon, {
2025
+ key: 1,
2026
+ class: normalizeClass([
2027
+ _ctx.nsSelect.e("caret"),
2028
+ _ctx.nsSelect.e("icon"),
2029
+ _ctx.nsSelect.e("clear")
2030
+ ]),
2031
+ onClick: _ctx.handleClearClick
1644
2032
  }, {
1645
2033
  default: withCtx(() => [
1646
- createElementVNode("span", {
1647
- class: normalizeClass(_ctx.nsSelect.e("tags-text"))
1648
- }, [
1649
- renderSlot(_ctx.$slots, "label", {
1650
- index: item.index,
1651
- label: item.currentLabel,
1652
- value: item.value
1653
- }, () => [
1654
- createTextVNode(toDisplayString(item.currentLabel), 1)
1655
- ])
1656
- ], 2)
2034
+ (openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))
1657
2035
  ]),
1658
- _: 2
1659
- }, 1032, ["closable", "size", "type", "effect", "style", "onClose"])
1660
- ], 2);
1661
- }), 128)),
1662
- _ctx.collapseTags && _ctx.states.selected.length > _ctx.maxCollapseTags ? (openBlock(), createBlock(_component_el_tooltip, {
1663
- key: 0,
1664
- ref: "tagTooltipRef",
1665
- disabled: _ctx.dropdownMenuVisible || !_ctx.collapseTagsTooltip,
1666
- "fallback-placements": ["bottom", "top", "right", "left"],
1667
- effect: _ctx.effect,
1668
- placement: "bottom",
1669
- "popper-class": _ctx.popperClass,
1670
- "popper-style": _ctx.popperStyle,
1671
- teleported: _ctx.teleported
2036
+ _: 1
2037
+ }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
2038
+ _ctx.validateState && _ctx.validateIcon && _ctx.needStatusIcon ? (openBlock(), createBlock(_component_el_icon, {
2039
+ key: 2,
2040
+ class: normalizeClass([
2041
+ _ctx.nsInput.e("icon"),
2042
+ _ctx.nsInput.e("validateIcon"),
2043
+ _ctx.nsInput.is("loading", _ctx.validateState === "validating")
2044
+ ])
2045
+ }, {
2046
+ default: withCtx(() => [
2047
+ (openBlock(), createBlock(resolveDynamicComponent(_ctx.validateIcon)))
2048
+ ]),
2049
+ _: 1
2050
+ }, 8, ["class"])) : createCommentVNode("v-if", true)
2051
+ ],
2052
+ 2
2053
+ )
2054
+ ],
2055
+ 2
2056
+ )
2057
+ ];
2058
+ }),
2059
+ content: withCtx(() => [
2060
+ createVNode(
2061
+ _component_el_select_menu,
2062
+ { ref: "menuRef" },
2063
+ {
2064
+ default: withCtx(() => [
2065
+ _ctx.$slots.header ? (openBlock(), createElementBlock(
2066
+ "div",
2067
+ {
2068
+ key: 0,
2069
+ class: normalizeClass(_ctx.nsSelect.be("dropdown", "header")),
2070
+ onClick: _cache[8] || (_cache[8] = withModifiers(() => {
2071
+ }, ["stop"]))
2072
+ },
2073
+ [
2074
+ renderSlot(_ctx.$slots, "header")
2075
+ ],
2076
+ 2
2077
+ )) : createCommentVNode("v-if", true),
2078
+ withDirectives(createVNode(_component_el_scrollbar, {
2079
+ id: _ctx.contentId,
2080
+ ref: "scrollbarRef",
2081
+ tag: "ul",
2082
+ "wrap-class": _ctx.nsSelect.be("dropdown", "wrap"),
2083
+ "view-class": _ctx.nsSelect.be("dropdown", "list"),
2084
+ class: normalizeClass([_ctx.nsSelect.is("empty", _ctx.filteredOptionsCount === 0)]),
2085
+ role: "listbox",
2086
+ "aria-label": _ctx.ariaLabel,
2087
+ "aria-orientation": "vertical",
2088
+ onScroll: _ctx.popupScroll
1672
2089
  }, {
1673
2090
  default: withCtx(() => [
1674
- createElementVNode("div", {
1675
- ref: "collapseItemRef",
1676
- class: normalizeClass(_ctx.nsSelect.e("selected-item"))
1677
- }, [
1678
- createVNode(_component_el_tag, {
1679
- closable: false,
1680
- size: _ctx.collapseTagSize,
1681
- type: _ctx.tagType,
1682
- effect: _ctx.tagEffect,
1683
- "disable-transitions": "",
1684
- style: normalizeStyle(_ctx.collapseTagStyle)
1685
- }, {
1686
- default: withCtx(() => [
1687
- createElementVNode("span", {
1688
- class: normalizeClass(_ctx.nsSelect.e("tags-text"))
1689
- }, " + " + toDisplayString(_ctx.states.selected.length - _ctx.maxCollapseTags), 3)
1690
- ]),
1691
- _: 1
1692
- }, 8, ["size", "type", "effect", "style"])
1693
- ], 2)
1694
- ]),
1695
- content: withCtx(() => [
1696
- createElementVNode("div", {
1697
- ref: "tagMenuRef",
1698
- class: normalizeClass(_ctx.nsSelect.e("selection"))
1699
- }, [
1700
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.collapseTagList, (item) => {
1701
- return openBlock(), createElementBlock("div", {
1702
- key: _ctx.getValueKey(item),
1703
- class: normalizeClass(_ctx.nsSelect.e("selected-item"))
1704
- }, [
1705
- createVNode(_component_el_tag, {
1706
- class: "in-tooltip",
1707
- closable: !_ctx.selectDisabled && !item.isDisabled,
1708
- size: _ctx.collapseTagSize,
1709
- type: _ctx.tagType,
1710
- effect: _ctx.tagEffect,
1711
- "disable-transitions": "",
1712
- onClose: ($event) => _ctx.deleteTag($event, item)
1713
- }, {
1714
- default: withCtx(() => [
1715
- createElementVNode("span", {
1716
- class: normalizeClass(_ctx.nsSelect.e("tags-text"))
1717
- }, [
1718
- renderSlot(_ctx.$slots, "label", {
1719
- index: item.index,
1720
- label: item.currentLabel,
1721
- value: item.value
1722
- }, () => [
1723
- createTextVNode(toDisplayString(item.currentLabel), 1)
1724
- ])
1725
- ], 2)
1726
- ]),
1727
- _: 2
1728
- }, 1032, ["closable", "size", "type", "effect", "onClose"])
1729
- ], 2);
1730
- }), 128))
1731
- ], 2)
2091
+ _ctx.showNewOption ? (openBlock(), createBlock(_component_el_option, {
2092
+ key: 0,
2093
+ value: _ctx.states.inputValue,
2094
+ created: true
2095
+ }, null, 8, ["value"])) : createCommentVNode("v-if", true),
2096
+ createVNode(_component_el_options, null, {
2097
+ default: withCtx(() => [
2098
+ renderSlot(_ctx.$slots, "default", {}, () => [
2099
+ (openBlock(true), createElementBlock(
2100
+ Fragment,
2101
+ null,
2102
+ renderList(_ctx.options, (option, index) => {
2103
+ var _a;
2104
+ return openBlock(), createElementBlock(
2105
+ Fragment,
2106
+ { key: index },
2107
+ [
2108
+ ((_a = _ctx.getOptions(option)) == null ? void 0 : _a.length) ? (openBlock(), createBlock(_component_el_option_group, {
2109
+ key: 0,
2110
+ label: _ctx.getLabel(option),
2111
+ disabled: _ctx.getDisabled(option)
2112
+ }, {
2113
+ default: withCtx(() => [
2114
+ (openBlock(true), createElementBlock(
2115
+ Fragment,
2116
+ null,
2117
+ renderList(_ctx.getOptions(option), (item) => {
2118
+ return openBlock(), createBlock(
2119
+ _component_el_option,
2120
+ mergeProps({
2121
+ key: _ctx.getValue(item)
2122
+ }, { ref_for: true }, _ctx.getOptionProps(item)),
2123
+ null,
2124
+ 16
2125
+ );
2126
+ }),
2127
+ 128
2128
+ ))
2129
+ ]),
2130
+ _: 2
2131
+ }, 1032, ["label", "disabled"])) : (openBlock(), createBlock(
2132
+ _component_el_option,
2133
+ mergeProps({
2134
+ key: 1,
2135
+ ref_for: true
2136
+ }, _ctx.getOptionProps(option)),
2137
+ null,
2138
+ 16
2139
+ ))
2140
+ ],
2141
+ 64
2142
+ );
2143
+ }),
2144
+ 128
2145
+ ))
2146
+ ])
2147
+ ]),
2148
+ _: 3
2149
+ })
1732
2150
  ]),
1733
2151
  _: 3
1734
- }, 8, ["disabled", "effect", "popper-class", "popper-style", "teleported"])) : createCommentVNode("v-if", true)
1735
- ]) : createCommentVNode("v-if", true),
1736
- createElementVNode("div", {
1737
- class: normalizeClass([
1738
- _ctx.nsSelect.e("selected-item"),
1739
- _ctx.nsSelect.e("input-wrapper"),
1740
- _ctx.nsSelect.is("hidden", !_ctx.filterable || _ctx.selectDisabled)
1741
- ])
1742
- }, [
1743
- withDirectives(createElementVNode("input", {
1744
- id: _ctx.inputId,
1745
- ref: "inputRef",
1746
- "onUpdate:modelValue": ($event) => _ctx.states.inputValue = $event,
1747
- type: "text",
1748
- name: _ctx.name,
1749
- class: normalizeClass([_ctx.nsSelect.e("input"), _ctx.nsSelect.is(_ctx.selectSize)]),
1750
- disabled: _ctx.selectDisabled,
1751
- autocomplete: _ctx.autocomplete,
1752
- style: normalizeStyle(_ctx.inputStyle),
1753
- tabindex: _ctx.tabindex,
1754
- role: "combobox",
1755
- readonly: !_ctx.filterable,
1756
- spellcheck: "false",
1757
- "aria-activedescendant": ((_a = _ctx.hoverOption) == null ? void 0 : _a.id) || "",
1758
- "aria-controls": _ctx.contentId,
1759
- "aria-expanded": _ctx.dropdownMenuVisible,
1760
- "aria-label": _ctx.ariaLabel,
1761
- "aria-autocomplete": "none",
1762
- "aria-haspopup": "listbox",
1763
- onKeydown: _ctx.handleKeydown,
1764
- onCompositionstart: _ctx.handleCompositionStart,
1765
- onCompositionupdate: _ctx.handleCompositionUpdate,
1766
- onCompositionend: _ctx.handleCompositionEnd,
1767
- onInput: _ctx.onInput,
1768
- onClick: withModifiers(_ctx.toggleMenu, ["stop"])
1769
- }, null, 46, ["id", "onUpdate:modelValue", "name", "disabled", "autocomplete", "tabindex", "readonly", "aria-activedescendant", "aria-controls", "aria-expanded", "aria-label", "onKeydown", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onInput", "onClick"]), [
1770
- [vModelText, _ctx.states.inputValue]
1771
- ]),
1772
- _ctx.filterable ? (openBlock(), createElementBlock("span", {
1773
- key: 0,
1774
- ref: "calculatorRef",
1775
- "aria-hidden": "true",
1776
- class: normalizeClass(_ctx.nsSelect.e("input-calculator")),
1777
- textContent: toDisplayString(_ctx.states.inputValue)
1778
- }, null, 10, ["textContent"])) : createCommentVNode("v-if", true)
1779
- ], 2),
1780
- _ctx.shouldShowPlaceholder ? (openBlock(), createElementBlock("div", {
1781
- key: 1,
1782
- class: normalizeClass([
1783
- _ctx.nsSelect.e("selected-item"),
1784
- _ctx.nsSelect.e("placeholder"),
1785
- _ctx.nsSelect.is("transparent", !_ctx.hasModelValue || _ctx.expanded && !_ctx.states.inputValue)
1786
- ])
1787
- }, [
1788
- _ctx.hasModelValue ? renderSlot(_ctx.$slots, "label", {
1789
- key: 0,
1790
- index: _ctx.getOption(_ctx.modelValue).index,
1791
- label: _ctx.currentPlaceholder,
1792
- value: _ctx.modelValue
1793
- }, () => [
1794
- createElementVNode("span", null, toDisplayString(_ctx.currentPlaceholder), 1)
1795
- ]) : (openBlock(), createElementBlock("span", { key: 1 }, toDisplayString(_ctx.currentPlaceholder), 1))
1796
- ], 2)) : createCommentVNode("v-if", true)
1797
- ], 2),
1798
- createElementVNode("div", {
1799
- ref: "suffixRef",
1800
- class: normalizeClass(_ctx.nsSelect.e("suffix"))
1801
- }, [
1802
- _ctx.iconComponent && !_ctx.showClearBtn ? (openBlock(), createBlock(_component_el_icon, {
1803
- key: 0,
1804
- class: normalizeClass([_ctx.nsSelect.e("caret"), _ctx.nsSelect.e("icon"), _ctx.iconReverse])
1805
- }, {
1806
- default: withCtx(() => [
1807
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))
1808
- ]),
1809
- _: 1
1810
- }, 8, ["class"])) : createCommentVNode("v-if", true),
1811
- _ctx.showClearBtn && _ctx.clearIcon ? (openBlock(), createBlock(_component_el_icon, {
1812
- key: 1,
1813
- class: normalizeClass([
1814
- _ctx.nsSelect.e("caret"),
1815
- _ctx.nsSelect.e("icon"),
1816
- _ctx.nsSelect.e("clear")
1817
- ]),
1818
- onClick: _ctx.handleClearClick
1819
- }, {
1820
- default: withCtx(() => [
1821
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))
1822
- ]),
1823
- _: 1
1824
- }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
1825
- _ctx.validateState && _ctx.validateIcon && _ctx.needStatusIcon ? (openBlock(), createBlock(_component_el_icon, {
1826
- key: 2,
1827
- class: normalizeClass([
1828
- _ctx.nsInput.e("icon"),
1829
- _ctx.nsInput.e("validateIcon"),
1830
- _ctx.nsInput.is("loading", _ctx.validateState === "validating")
1831
- ])
1832
- }, {
1833
- default: withCtx(() => [
1834
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.validateIcon)))
2152
+ }, 8, ["id", "wrap-class", "view-class", "class", "aria-label", "onScroll"]), [
2153
+ [vShow, _ctx.states.options.size > 0 && !_ctx.loading]
1835
2154
  ]),
1836
- _: 1
1837
- }, 8, ["class"])) : createCommentVNode("v-if", true)
1838
- ], 2)
1839
- ], 10, ["onClick"])
1840
- ];
1841
- }),
1842
- content: withCtx(() => [
1843
- createVNode(_component_el_select_menu, { ref: "menuRef" }, {
1844
- default: withCtx(() => [
1845
- _ctx.$slots.header ? (openBlock(), createElementBlock("div", {
1846
- key: 0,
1847
- class: normalizeClass(_ctx.nsSelect.be("dropdown", "header")),
1848
- onClick: withModifiers(() => {
1849
- }, ["stop"])
1850
- }, [
1851
- renderSlot(_ctx.$slots, "header")
1852
- ], 10, ["onClick"])) : createCommentVNode("v-if", true),
1853
- withDirectives(createVNode(_component_el_scrollbar, {
1854
- id: _ctx.contentId,
1855
- ref: "scrollbarRef",
1856
- tag: "ul",
1857
- "wrap-class": _ctx.nsSelect.be("dropdown", "wrap"),
1858
- "view-class": _ctx.nsSelect.be("dropdown", "list"),
1859
- class: normalizeClass([_ctx.nsSelect.is("empty", _ctx.filteredOptionsCount === 0)]),
1860
- role: "listbox",
1861
- "aria-label": _ctx.ariaLabel,
1862
- "aria-orientation": "vertical",
1863
- onScroll: _ctx.popupScroll
1864
- }, {
1865
- default: withCtx(() => [
1866
- _ctx.showNewOption ? (openBlock(), createBlock(_component_el_option, {
1867
- key: 0,
1868
- value: _ctx.states.inputValue,
1869
- created: true
1870
- }, null, 8, ["value"])) : createCommentVNode("v-if", true),
1871
- createVNode(_component_el_options, null, {
1872
- default: withCtx(() => [
1873
- renderSlot(_ctx.$slots, "default", {}, () => [
1874
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option, index) => {
1875
- var _a;
1876
- return openBlock(), createElementBlock(Fragment, { key: index }, [
1877
- ((_a = _ctx.getOptions(option)) == null ? void 0 : _a.length) ? (openBlock(), createBlock(_component_el_option_group, {
1878
- key: 0,
1879
- label: _ctx.getLabel(option),
1880
- disabled: _ctx.getDisabled(option)
1881
- }, {
1882
- default: withCtx(() => [
1883
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.getOptions(option), (item) => {
1884
- return openBlock(), createBlock(_component_el_option, mergeProps({
1885
- key: _ctx.getValue(item)
1886
- }, _ctx.getOptionProps(item)), null, 16);
1887
- }), 128))
1888
- ]),
1889
- _: 2
1890
- }, 1032, ["label", "disabled"])) : (openBlock(), createBlock(_component_el_option, normalizeProps(mergeProps({ key: 1 }, _ctx.getOptionProps(option))), null, 16))
1891
- ], 64);
1892
- }), 128))
2155
+ _ctx.$slots.loading && _ctx.loading ? (openBlock(), createElementBlock(
2156
+ "div",
2157
+ {
2158
+ key: 1,
2159
+ class: normalizeClass(_ctx.nsSelect.be("dropdown", "loading"))
2160
+ },
2161
+ [
2162
+ renderSlot(_ctx.$slots, "loading")
2163
+ ],
2164
+ 2
2165
+ )) : _ctx.loading || _ctx.filteredOptionsCount === 0 ? (openBlock(), createElementBlock(
2166
+ "div",
2167
+ {
2168
+ key: 2,
2169
+ class: normalizeClass(_ctx.nsSelect.be("dropdown", "empty"))
2170
+ },
2171
+ [
2172
+ renderSlot(_ctx.$slots, "empty", {}, () => [
2173
+ createElementVNode(
2174
+ "span",
2175
+ null,
2176
+ toDisplayString(_ctx.emptyText),
2177
+ 1
2178
+ )
1893
2179
  ])
1894
- ]),
1895
- _: 3
1896
- })
2180
+ ],
2181
+ 2
2182
+ )) : createCommentVNode("v-if", true),
2183
+ _ctx.$slots.footer ? (openBlock(), createElementBlock(
2184
+ "div",
2185
+ {
2186
+ key: 3,
2187
+ class: normalizeClass(_ctx.nsSelect.be("dropdown", "footer")),
2188
+ onClick: _cache[9] || (_cache[9] = withModifiers(() => {
2189
+ }, ["stop"]))
2190
+ },
2191
+ [
2192
+ renderSlot(_ctx.$slots, "footer")
2193
+ ],
2194
+ 2
2195
+ )) : createCommentVNode("v-if", true)
1897
2196
  ]),
1898
2197
  _: 3
1899
- }, 8, ["id", "wrap-class", "view-class", "class", "aria-label", "onScroll"]), [
1900
- [vShow, _ctx.states.options.size > 0 && !_ctx.loading]
1901
- ]),
1902
- _ctx.$slots.loading && _ctx.loading ? (openBlock(), createElementBlock("div", {
1903
- key: 1,
1904
- class: normalizeClass(_ctx.nsSelect.be("dropdown", "loading"))
1905
- }, [
1906
- renderSlot(_ctx.$slots, "loading")
1907
- ], 2)) : _ctx.loading || _ctx.filteredOptionsCount === 0 ? (openBlock(), createElementBlock("div", {
1908
- key: 2,
1909
- class: normalizeClass(_ctx.nsSelect.be("dropdown", "empty"))
1910
- }, [
1911
- renderSlot(_ctx.$slots, "empty", {}, () => [
1912
- createElementVNode("span", null, toDisplayString(_ctx.emptyText), 1)
1913
- ])
1914
- ], 2)) : createCommentVNode("v-if", true),
1915
- _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
1916
- key: 3,
1917
- class: normalizeClass(_ctx.nsSelect.be("dropdown", "footer")),
1918
- onClick: withModifiers(() => {
1919
- }, ["stop"])
1920
- }, [
1921
- renderSlot(_ctx.$slots, "footer")
1922
- ], 10, ["onClick"])) : createCommentVNode("v-if", true)
1923
- ]),
1924
- _: 3
1925
- }, 512)
1926
- ]),
1927
- _: 3
1928
- }, 8, ["visible", "placement", "teleported", "popper-class", "popper-style", "popper-options", "fallback-placements", "effect", "transition", "persistent", "append-to", "show-arrow", "offset", "onBeforeShow", "onHide"])
1929
- ], 16, ["onMouseleave"])), [
2198
+ },
2199
+ 512
2200
+ )
2201
+ ]),
2202
+ _: 3
2203
+ }, 8, ["visible", "placement", "teleported", "popper-class", "popper-style", "popper-options", "fallback-placements", "effect", "transition", "persistent", "append-to", "show-arrow", "offset", "onBeforeShow"])
2204
+ ],
2205
+ 16
2206
+ )), [
1930
2207
  [_directive_click_outside, _ctx.handleClickOutside, _ctx.popperRef]
1931
2208
  ]);
1932
2209
  }
1933
- var Select = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "select.vue"]]);
2210
+ var Select = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/select.vue"]]);
1934
2211
 
1935
2212
  const ElSelect = withInstall(Select, {
1936
2213
  Option,