hzzt-plus 1.0.1 → 1.0.2
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/attributes.json +1 -0
- package/dist/index.full.js +3080 -279
- package/dist/index.full.min.js +16 -16
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +18 -18
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +3078 -281
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/es/component.mjs +3 -1
- package/es/component.mjs.map +1 -1
- package/es/components/dropdown/index.d.ts +5 -5
- package/es/components/dropdown/src/index.mjs +3 -2
- package/es/components/dropdown/src/index.mjs.map +1 -1
- package/es/components/dropdown/src/index.vue.d.ts +6 -5
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +2 -0
- package/es/components/index.mjs.map +1 -1
- package/es/components/page-size/index.d.ts +1 -1
- package/es/components/page-size/src/index.mjs.map +1 -1
- package/es/components/page-size/src/index.vue.d.ts +1 -1
- package/es/components/scan/src/scan2.mjs.map +1 -1
- package/es/components/select-textarea/index.d.ts +13076 -0
- package/es/components/select-textarea/index.mjs +9 -0
- package/es/components/select-textarea/index.mjs.map +1 -0
- package/es/components/select-textarea/src/select-textarea.d.ts +26 -0
- package/es/components/select-textarea/src/select-textarea.mjs +35 -0
- package/es/components/select-textarea/src/select-textarea.mjs.map +1 -0
- package/es/components/select-textarea/src/select-textarea.vue.d.ts +13075 -0
- package/es/components/select-textarea/src/select-textarea2.mjs +105 -0
- package/es/components/select-textarea/src/select-textarea2.mjs.map +1 -0
- package/es/components/select-textarea/style/css.d.ts +2 -0
- package/es/components/select-textarea/style/css.mjs +3 -0
- package/es/components/select-textarea/style/css.mjs.map +1 -0
- package/es/components/select-textarea/style/index.d.ts +2 -0
- package/es/components/select-textarea/style/index.mjs +3 -0
- package/es/components/select-textarea/style/index.mjs.map +1 -0
- package/es/components/title/src/title2.mjs +1 -2
- package/es/components/title/src/title2.mjs.map +1 -1
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.mjs +1 -0
- package/es/hooks/index.mjs.map +1 -1
- package/es/hooks/use-cursor/index.d.ts +1 -0
- package/es/hooks/use-cursor/index.mjs +14 -0
- package/es/hooks/use-cursor/index.mjs.map +1 -0
- package/es/index.mjs +3 -0
- package/es/index.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/global.d.ts +1 -0
- package/lib/component.js +3 -1
- package/lib/component.js.map +1 -1
- package/lib/components/dropdown/index.d.ts +5 -5
- package/lib/components/dropdown/src/index.js +3 -2
- package/lib/components/dropdown/src/index.js.map +1 -1
- package/lib/components/dropdown/src/index.vue.d.ts +6 -5
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +5 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/page-size/index.d.ts +1 -1
- package/lib/components/page-size/src/index.js.map +1 -1
- package/lib/components/page-size/src/index.vue.d.ts +1 -1
- package/lib/components/scan/src/scan2.js.map +1 -1
- package/lib/components/select-textarea/index.d.ts +13076 -0
- package/lib/components/select-textarea/index.js +16 -0
- package/lib/components/select-textarea/index.js.map +1 -0
- package/lib/components/select-textarea/src/select-textarea.d.ts +26 -0
- package/lib/components/select-textarea/src/select-textarea.js +40 -0
- package/lib/components/select-textarea/src/select-textarea.js.map +1 -0
- package/lib/components/select-textarea/src/select-textarea.vue.d.ts +13075 -0
- package/lib/components/select-textarea/src/select-textarea2.js +109 -0
- package/lib/components/select-textarea/src/select-textarea2.js.map +1 -0
- package/lib/components/select-textarea/style/css.d.ts +2 -0
- package/lib/components/select-textarea/style/css.js +6 -0
- package/lib/components/select-textarea/style/css.js.map +1 -0
- package/lib/components/select-textarea/style/index.d.ts +2 -0
- package/lib/components/select-textarea/style/index.js +6 -0
- package/lib/components/select-textarea/style/index.js.map +1 -0
- package/lib/components/title/src/title2.js +1 -2
- package/lib/components/title/src/title2.js.map +1 -1
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.js +2 -0
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/use-cursor/index.d.ts +1 -0
- package/lib/hooks/use-cursor/index.js +18 -0
- package/lib/hooks/use-cursor/index.js.map +1 -0
- package/lib/index.js +35 -28
- package/lib/index.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
- package/tags.json +1 -0
- package/theme/hzzt-select-textarea.css +0 -0
- package/theme/src/index.scss +1 -0
- package/theme/src/select-textarea.scss +0 -0
- package/web-types.json +692 -0
package/dist/index.full.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! Hzzt Plus
|
|
1
|
+
/*! Hzzt Plus v1.0.2 */
|
|
2
2
|
|
|
3
|
-
import { readonly, shallowRef, watchEffect, getCurrentScope, onScopeDispose, unref, getCurrentInstance, onMounted, nextTick, watch, ref, defineComponent, openBlock, createElementBlock, createElementVNode, warn, computed, isRef, inject, provide, renderSlot, mergeProps, toRef, onUnmounted, useAttrs as useAttrs$1,
|
|
3
|
+
import { readonly, shallowRef, watchEffect, getCurrentScope, onScopeDispose, unref, getCurrentInstance, onMounted, nextTick, watch, ref, defineComponent, openBlock, createElementBlock, createElementVNode, warn, computed, isRef, inject, provide, renderSlot, useSlots, createCommentVNode, createTextVNode, toDisplayString, mergeProps, toRef, onUnmounted, useAttrs as useAttrs$1, normalizeClass, normalizeStyle, Fragment, createBlock, withCtx, resolveDynamicComponent, withModifiers, createVNode, onBeforeUnmount, Transition, withDirectives, vShow, reactive, onActivated, onUpdated, cloneVNode, Text, Comment, Teleport as Teleport$1, onBeforeMount, onDeactivated, withKeys, createSlots, toRaw, toRefs, resolveComponent, resolveDirective, toHandlerKey, renderList, vModelText, h, normalizeProps, guardReactiveProps } from 'vue';
|
|
4
4
|
|
|
5
5
|
var __defProp$9 = Object.defineProperty;
|
|
6
6
|
var __defProps$6 = Object.defineProperties;
|
|
@@ -4331,7 +4331,7 @@ function isEmpty$1(value) {
|
|
|
4331
4331
|
return true;
|
|
4332
4332
|
}
|
|
4333
4333
|
|
|
4334
|
-
function isEqual(value, other) {
|
|
4334
|
+
function isEqual$1(value, other) {
|
|
4335
4335
|
return baseIsEqual(value, other);
|
|
4336
4336
|
}
|
|
4337
4337
|
|
|
@@ -6342,7 +6342,7 @@ var lang = {
|
|
|
6342
6342
|
isDate,
|
|
6343
6343
|
isElement: isElement$1,
|
|
6344
6344
|
isEmpty: isEmpty$1,
|
|
6345
|
-
isEqual,
|
|
6345
|
+
isEqual: isEqual$1,
|
|
6346
6346
|
isEqualWith,
|
|
6347
6347
|
isError,
|
|
6348
6348
|
isFinite,
|
|
@@ -12842,6 +12842,18 @@ function numberToLetter(index) {
|
|
|
12842
12842
|
}
|
|
12843
12843
|
}
|
|
12844
12844
|
|
|
12845
|
+
function insertCursorPosition(inputEl, content) {
|
|
12846
|
+
const startPos = inputEl.selectionStart || 0;
|
|
12847
|
+
const endPos = inputEl.selectionEnd || 0;
|
|
12848
|
+
const restoreTop = inputEl.scrollTop;
|
|
12849
|
+
inputEl.value = inputEl.value.substring(0, startPos) + content + inputEl.value.substring(endPos, inputEl.value.length);
|
|
12850
|
+
inputEl.focus();
|
|
12851
|
+
inputEl.scrollTop = restoreTop;
|
|
12852
|
+
inputEl.selectionStart = startPos + content.length;
|
|
12853
|
+
inputEl.selectionEnd = startPos + content.length;
|
|
12854
|
+
return inputEl.value;
|
|
12855
|
+
}
|
|
12856
|
+
|
|
12845
12857
|
const configProviderContextKey$1 = Symbol();
|
|
12846
12858
|
|
|
12847
12859
|
const globalConfig$1 = ref();
|
|
@@ -12916,7 +12928,7 @@ var ConfigProvider$1 = ConfigProvider;
|
|
|
12916
12928
|
|
|
12917
12929
|
const HzztConfigProvider = withInstall$1(ConfigProvider$1);
|
|
12918
12930
|
|
|
12919
|
-
const version$1 = "
|
|
12931
|
+
const version$1 = "1.0.2";
|
|
12920
12932
|
|
|
12921
12933
|
const makeInstaller = (components = []) => {
|
|
12922
12934
|
const install = (app, options) => {
|
|
@@ -12933,6 +12945,61 @@ const makeInstaller = (components = []) => {
|
|
|
12933
12945
|
};
|
|
12934
12946
|
};
|
|
12935
12947
|
|
|
12948
|
+
const titleProps = buildProps$1({
|
|
12949
|
+
label: String,
|
|
12950
|
+
sideline: {
|
|
12951
|
+
type: Boolean,
|
|
12952
|
+
default: true
|
|
12953
|
+
}
|
|
12954
|
+
});
|
|
12955
|
+
|
|
12956
|
+
var _export_sfc$1 = (sfc, props) => {
|
|
12957
|
+
const target = sfc.__vccOpts || sfc;
|
|
12958
|
+
for (const [key, val] of props) {
|
|
12959
|
+
target[key] = val;
|
|
12960
|
+
}
|
|
12961
|
+
return target;
|
|
12962
|
+
};
|
|
12963
|
+
|
|
12964
|
+
const _hoisted_1$b = {
|
|
12965
|
+
key: 0,
|
|
12966
|
+
class: "hzzt-title flex align-items-center"
|
|
12967
|
+
};
|
|
12968
|
+
const _hoisted_2$a = {
|
|
12969
|
+
key: 0,
|
|
12970
|
+
class: "decorative-line"
|
|
12971
|
+
};
|
|
12972
|
+
const _hoisted_3$7 = { class: "label-name" };
|
|
12973
|
+
const __default__$s = defineComponent({
|
|
12974
|
+
name: "HzztTitle"
|
|
12975
|
+
});
|
|
12976
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
12977
|
+
...__default__$s,
|
|
12978
|
+
props: titleProps,
|
|
12979
|
+
setup(__props) {
|
|
12980
|
+
const props = __props;
|
|
12981
|
+
const slots = useSlots();
|
|
12982
|
+
const showLabel = computed(() => {
|
|
12983
|
+
var _a, _b, _c;
|
|
12984
|
+
return props.label || ((_c = (_b = (_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.call(slots)) == null ? void 0 : _b[0]) == null ? void 0 : _c.children);
|
|
12985
|
+
});
|
|
12986
|
+
return (_ctx, _cache) => {
|
|
12987
|
+
return unref(showLabel) ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
12988
|
+
_ctx.sideline ? (openBlock(), createElementBlock("span", _hoisted_2$a)) : createCommentVNode("v-if", true),
|
|
12989
|
+
renderSlot(_ctx.$slots, "before"),
|
|
12990
|
+
createElementVNode("label", _hoisted_3$7, [
|
|
12991
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
12992
|
+
createTextVNode(toDisplayString(_ctx.label), 1)
|
|
12993
|
+
])
|
|
12994
|
+
])
|
|
12995
|
+
])) : createCommentVNode("v-if", true);
|
|
12996
|
+
};
|
|
12997
|
+
}
|
|
12998
|
+
});
|
|
12999
|
+
var HzztTitle$1 = /* @__PURE__ */ _export_sfc$1(_sfc_main$G, [["__file", "title.vue"]]);
|
|
13000
|
+
|
|
13001
|
+
const HzztTitle = withInstall$1(HzztTitle$1);
|
|
13002
|
+
|
|
12936
13003
|
const configProviderContextKey = Symbol();
|
|
12937
13004
|
|
|
12938
13005
|
const defaultNamespace = "el";
|
|
@@ -13372,7 +13439,7 @@ const UPDATE_MODEL_EVENT = "update:modelValue";
|
|
|
13372
13439
|
const CHANGE_EVENT = "change";
|
|
13373
13440
|
const INPUT_EVENT = "input";
|
|
13374
13441
|
|
|
13375
|
-
var _export_sfc
|
|
13442
|
+
var _export_sfc = (sfc, props) => {
|
|
13376
13443
|
const target = sfc.__vccOpts || sfc;
|
|
13377
13444
|
for (const [key, val] of props) {
|
|
13378
13445
|
target[key] = val;
|
|
@@ -13380,6 +13447,9 @@ var _export_sfc$1 = (sfc, props) => {
|
|
|
13380
13447
|
return target;
|
|
13381
13448
|
};
|
|
13382
13449
|
|
|
13450
|
+
const rAF = (fn) => isClient ? window.requestAnimationFrame(fn) : setTimeout(fn, 16);
|
|
13451
|
+
const cAF = (handle) => isClient ? window.cancelAnimationFrame(handle) : clearTimeout(handle);
|
|
13452
|
+
|
|
13383
13453
|
function addUnit(value, defaultUnit = "px") {
|
|
13384
13454
|
if (!value)
|
|
13385
13455
|
return "";
|
|
@@ -13451,7 +13521,7 @@ const __default__$r = defineComponent({
|
|
|
13451
13521
|
name: "ElIcon",
|
|
13452
13522
|
inheritAttrs: false
|
|
13453
13523
|
});
|
|
13454
|
-
const _sfc_main$
|
|
13524
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
13455
13525
|
...__default__$r,
|
|
13456
13526
|
props: iconProps,
|
|
13457
13527
|
setup(__props) {
|
|
@@ -13476,7 +13546,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
13476
13546
|
};
|
|
13477
13547
|
}
|
|
13478
13548
|
});
|
|
13479
|
-
var Icon = /* @__PURE__ */ _export_sfc
|
|
13549
|
+
var Icon = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__file", "icon.vue"]]);
|
|
13480
13550
|
|
|
13481
13551
|
const ElIcon = withInstall(Icon);
|
|
13482
13552
|
|
|
@@ -13918,7 +13988,7 @@ const __default__$q = defineComponent({
|
|
|
13918
13988
|
name: "ElInput",
|
|
13919
13989
|
inheritAttrs: false
|
|
13920
13990
|
});
|
|
13921
|
-
const _sfc_main$
|
|
13991
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
13922
13992
|
...__default__$q,
|
|
13923
13993
|
props: inputProps,
|
|
13924
13994
|
emits: inputEmits,
|
|
@@ -14324,7 +14394,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
14324
14394
|
};
|
|
14325
14395
|
}
|
|
14326
14396
|
});
|
|
14327
|
-
var Input = /* @__PURE__ */ _export_sfc
|
|
14397
|
+
var Input = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__file", "input.vue"]]);
|
|
14328
14398
|
|
|
14329
14399
|
const ElInput = withInstall(Input);
|
|
14330
14400
|
|
|
@@ -14351,7 +14421,7 @@ const BAR_MAP = {
|
|
|
14351
14421
|
direction: "left"
|
|
14352
14422
|
}
|
|
14353
14423
|
};
|
|
14354
|
-
const renderThumbStyle = ({
|
|
14424
|
+
const renderThumbStyle$1 = ({
|
|
14355
14425
|
move,
|
|
14356
14426
|
size,
|
|
14357
14427
|
bar
|
|
@@ -14374,7 +14444,7 @@ const thumbProps = buildProps({
|
|
|
14374
14444
|
});
|
|
14375
14445
|
|
|
14376
14446
|
const COMPONENT_NAME$2 = "Thumb";
|
|
14377
|
-
const _sfc_main$
|
|
14447
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
14378
14448
|
__name: "thumb",
|
|
14379
14449
|
props: thumbProps,
|
|
14380
14450
|
setup(__props) {
|
|
@@ -14391,7 +14461,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
14391
14461
|
let cursorLeave = false;
|
|
14392
14462
|
let originalOnSelectStart = isClient ? document.onselectstart : null;
|
|
14393
14463
|
const bar = computed(() => BAR_MAP[props.vertical ? "vertical" : "horizontal"]);
|
|
14394
|
-
const thumbStyle = computed(() => renderThumbStyle({
|
|
14464
|
+
const thumbStyle = computed(() => renderThumbStyle$1({
|
|
14395
14465
|
size: props.size,
|
|
14396
14466
|
move: props.move,
|
|
14397
14467
|
bar: bar.value
|
|
@@ -14493,7 +14563,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
14493
14563
|
};
|
|
14494
14564
|
}
|
|
14495
14565
|
});
|
|
14496
|
-
var Thumb = /* @__PURE__ */ _export_sfc
|
|
14566
|
+
var Thumb = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__file", "thumb.vue"]]);
|
|
14497
14567
|
|
|
14498
14568
|
const barProps = buildProps({
|
|
14499
14569
|
always: {
|
|
@@ -14506,7 +14576,7 @@ const barProps = buildProps({
|
|
|
14506
14576
|
}
|
|
14507
14577
|
});
|
|
14508
14578
|
|
|
14509
|
-
const _sfc_main$
|
|
14579
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
14510
14580
|
__name: "bar",
|
|
14511
14581
|
props: barProps,
|
|
14512
14582
|
setup(__props, { expose }) {
|
|
@@ -14564,7 +14634,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
14564
14634
|
};
|
|
14565
14635
|
}
|
|
14566
14636
|
});
|
|
14567
|
-
var Bar = /* @__PURE__ */ _export_sfc
|
|
14637
|
+
var Bar = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__file", "bar.vue"]]);
|
|
14568
14638
|
|
|
14569
14639
|
const scrollbarProps = buildProps({
|
|
14570
14640
|
height: {
|
|
@@ -14624,7 +14694,7 @@ const COMPONENT_NAME$1 = "ElScrollbar";
|
|
|
14624
14694
|
const __default__$p = defineComponent({
|
|
14625
14695
|
name: COMPONENT_NAME$1
|
|
14626
14696
|
});
|
|
14627
|
-
const _sfc_main$
|
|
14697
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
14628
14698
|
...__default__$p,
|
|
14629
14699
|
props: scrollbarProps,
|
|
14630
14700
|
emits: scrollbarEmits,
|
|
@@ -14777,7 +14847,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
14777
14847
|
};
|
|
14778
14848
|
}
|
|
14779
14849
|
});
|
|
14780
|
-
var Scrollbar = /* @__PURE__ */ _export_sfc
|
|
14850
|
+
var Scrollbar = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__file", "scrollbar.vue"]]);
|
|
14781
14851
|
|
|
14782
14852
|
const ElScrollbar = withInstall(Scrollbar);
|
|
14783
14853
|
|
|
@@ -14806,7 +14876,7 @@ const __default__$o = defineComponent({
|
|
|
14806
14876
|
name: "ElPopper",
|
|
14807
14877
|
inheritAttrs: false
|
|
14808
14878
|
});
|
|
14809
|
-
const _sfc_main$
|
|
14879
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
14810
14880
|
...__default__$o,
|
|
14811
14881
|
props: popperProps,
|
|
14812
14882
|
setup(__props, { expose }) {
|
|
@@ -14830,7 +14900,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
14830
14900
|
};
|
|
14831
14901
|
}
|
|
14832
14902
|
});
|
|
14833
|
-
var Popper = /* @__PURE__ */ _export_sfc
|
|
14903
|
+
var Popper = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__file", "popper.vue"]]);
|
|
14834
14904
|
|
|
14835
14905
|
const popperArrowProps = buildProps({
|
|
14836
14906
|
arrowOffset: {
|
|
@@ -14843,7 +14913,7 @@ const __default__$n = defineComponent({
|
|
|
14843
14913
|
name: "ElPopperArrow",
|
|
14844
14914
|
inheritAttrs: false
|
|
14845
14915
|
});
|
|
14846
|
-
const _sfc_main$
|
|
14916
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
14847
14917
|
...__default__$n,
|
|
14848
14918
|
props: popperArrowProps,
|
|
14849
14919
|
setup(__props, { expose }) {
|
|
@@ -14870,7 +14940,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
14870
14940
|
};
|
|
14871
14941
|
}
|
|
14872
14942
|
});
|
|
14873
|
-
var ElPopperArrow = /* @__PURE__ */ _export_sfc
|
|
14943
|
+
var ElPopperArrow = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__file", "arrow.vue"]]);
|
|
14874
14944
|
|
|
14875
14945
|
const popperTriggerProps = buildProps({
|
|
14876
14946
|
virtualRef: {
|
|
@@ -15009,7 +15079,7 @@ const __default__$m = defineComponent({
|
|
|
15009
15079
|
name: "ElPopperTrigger",
|
|
15010
15080
|
inheritAttrs: false
|
|
15011
15081
|
});
|
|
15012
|
-
const _sfc_main$
|
|
15082
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
15013
15083
|
...__default__$m,
|
|
15014
15084
|
props: popperTriggerProps,
|
|
15015
15085
|
setup(__props, { expose }) {
|
|
@@ -15121,7 +15191,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
15121
15191
|
};
|
|
15122
15192
|
}
|
|
15123
15193
|
});
|
|
15124
|
-
var ElPopperTrigger = /* @__PURE__ */ _export_sfc
|
|
15194
|
+
var ElPopperTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__file", "trigger.vue"]]);
|
|
15125
15195
|
|
|
15126
15196
|
const FOCUS_AFTER_TRAPPED = "focus-trap.focus-after-trapped";
|
|
15127
15197
|
const FOCUS_AFTER_RELEASED = "focus-trap.focus-after-released";
|
|
@@ -15320,7 +15390,7 @@ const useEscapeKeydown = (handler) => {
|
|
|
15320
15390
|
});
|
|
15321
15391
|
};
|
|
15322
15392
|
|
|
15323
|
-
const _sfc_main$
|
|
15393
|
+
const _sfc_main$x = defineComponent({
|
|
15324
15394
|
name: "ElFocusTrap",
|
|
15325
15395
|
inheritAttrs: false,
|
|
15326
15396
|
props: {
|
|
@@ -15562,10 +15632,10 @@ const _sfc_main$u = defineComponent({
|
|
|
15562
15632
|
};
|
|
15563
15633
|
}
|
|
15564
15634
|
});
|
|
15565
|
-
function _sfc_render$
|
|
15635
|
+
function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15566
15636
|
return renderSlot(_ctx.$slots, "default", { handleKeydown: _ctx.onKeydown });
|
|
15567
15637
|
}
|
|
15568
|
-
var ElFocusTrap = /* @__PURE__ */ _export_sfc
|
|
15638
|
+
var ElFocusTrap = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$9], ["__file", "focus-trap.vue"]]);
|
|
15569
15639
|
|
|
15570
15640
|
var E="top",R="bottom",W="right",P="left",me="auto",G=[E,R,W,P],U="start",J="end",Xe="clippingParents",je="viewport",K="popper",Ye="reference",De=G.reduce(function(t,e){return t.concat([e+"-"+U,e+"-"+J])},[]),Ee=[].concat(G,[me]).reduce(function(t,e){return t.concat([e,e+"-"+U,e+"-"+J])},[]),Ge="beforeRead",Je="read",Ke="afterRead",Qe="beforeMain",Ze="main",et="afterMain",tt="beforeWrite",nt="write",rt="afterWrite",ot=[Ge,Je,Ke,Qe,Ze,et,tt,nt,rt];function C(t){return t?(t.nodeName||"").toLowerCase():null}function H(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Q(t){var e=H(t).Element;return t instanceof e||t instanceof Element}function B(t){var e=H(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Pe(t){if(typeof ShadowRoot=="undefined")return !1;var e=H(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Mt(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},o=e.attributes[n]||{},i=e.elements[n];!B(i)||!C(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s);}));});}function Rt(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],i=e.attributes[r]||{},a=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),s=a.reduce(function(f,c){return f[c]="",f},{});!B(o)||!C(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(f){o.removeAttribute(f);}));});}}var Ae={name:"applyStyles",enabled:!0,phase:"write",fn:Mt,effect:Rt,requires:["computeStyles"]};function q(t){return t.split("-")[0]}var X=Math.max,ve=Math.min,Z=Math.round;function ee(t,e){e===void 0&&(e=!1);var n=t.getBoundingClientRect(),r=1,o=1;if(B(t)&&e){var i=t.offsetHeight,a=t.offsetWidth;a>0&&(r=Z(n.width)/a||1),i>0&&(o=Z(n.height)/i||1);}return {width:n.width/r,height:n.height/o,top:n.top/o,right:n.right/r,bottom:n.bottom/o,left:n.left/r,x:n.left/r,y:n.top/o}}function ke(t){var e=ee(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function it(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return !0;if(n&&Pe(n)){var r=e;do{if(r&&t.isSameNode(r))return !0;r=r.parentNode||r.host;}while(r)}return !1}function N(t){return H(t).getComputedStyle(t)}function Wt(t){return ["table","td","th"].indexOf(C(t))>=0}function I(t){return ((Q(t)?t.ownerDocument:t.document)||window.document).documentElement}function ge(t){return C(t)==="html"?t:t.assignedSlot||t.parentNode||(Pe(t)?t.host:null)||I(t)}function at(t){return !B(t)||N(t).position==="fixed"?null:t.offsetParent}function Bt(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&B(t)){var r=N(t);if(r.position==="fixed")return null}var o=ge(t);for(Pe(o)&&(o=o.host);B(o)&&["html","body"].indexOf(C(o))<0;){var i=N(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return o;o=o.parentNode;}return null}function se(t){for(var e=H(t),n=at(t);n&&Wt(n)&&N(n).position==="static";)n=at(n);return n&&(C(n)==="html"||C(n)==="body"&&N(n).position==="static")?e:n||Bt(t)||e}function Le(t){return ["top","bottom"].indexOf(t)>=0?"x":"y"}function fe(t,e,n){return X(t,ve(e,n))}function St(t,e,n){var r=fe(t,e,n);return r>n?n:r}function st(){return {top:0,right:0,bottom:0,left:0}}function ft(t){return Object.assign({},st(),t)}function ct(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var Tt=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,ft(typeof t!="number"?t:ct(t,G))};function Ht(t){var e,n=t.state,r=t.name,o=t.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=q(n.placement),f=Le(s),c=[P,W].indexOf(s)>=0,u=c?"height":"width";if(!(!i||!a)){var m=Tt(o.padding,n),v=ke(i),l=f==="y"?E:P,h=f==="y"?R:W,p=n.rects.reference[u]+n.rects.reference[f]-a[f]-n.rects.popper[u],g=a[f]-n.rects.reference[f],x=se(i),y=x?f==="y"?x.clientHeight||0:x.clientWidth||0:0,$=p/2-g/2,d=m[l],b=y-v[u]-m[h],w=y/2-v[u]/2+$,O=fe(d,w,b),j=f;n.modifiersData[r]=(e={},e[j]=O,e.centerOffset=O-w,e);}}function Ct(t){var e=t.state,n=t.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o)||!it(e.elements.popper,o)||(e.elements.arrow=o));}var pt={name:"arrow",enabled:!0,phase:"main",fn:Ht,effect:Ct,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function te(t){return t.split("-")[1]}var qt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Vt(t){var e=t.x,n=t.y,r=window,o=r.devicePixelRatio||1;return {x:Z(e*o)/o||0,y:Z(n*o)/o||0}}function ut(t){var e,n=t.popper,r=t.popperRect,o=t.placement,i=t.variation,a=t.offsets,s=t.position,f=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,m=t.isFixed,v=a.x,l=v===void 0?0:v,h=a.y,p=h===void 0?0:h,g=typeof u=="function"?u({x:l,y:p}):{x:l,y:p};l=g.x,p=g.y;var x=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),$=P,d=E,b=window;if(c){var w=se(n),O="clientHeight",j="clientWidth";if(w===H(n)&&(w=I(n),N(w).position!=="static"&&s==="absolute"&&(O="scrollHeight",j="scrollWidth")),w=w,o===E||(o===P||o===W)&&i===J){d=R;var A=m&&w===b&&b.visualViewport?b.visualViewport.height:w[O];p-=A-r.height,p*=f?1:-1;}if(o===P||(o===E||o===R)&&i===J){$=W;var k=m&&w===b&&b.visualViewport?b.visualViewport.width:w[j];l-=k-r.width,l*=f?1:-1;}}var D=Object.assign({position:s},c&&qt),S=u===!0?Vt({x:l,y:p}):{x:l,y:p};if(l=S.x,p=S.y,f){var L;return Object.assign({},D,(L={},L[d]=y?"0":"",L[$]=x?"0":"",L.transform=(b.devicePixelRatio||1)<=1?"translate("+l+"px, "+p+"px)":"translate3d("+l+"px, "+p+"px, 0)",L))}return Object.assign({},D,(e={},e[d]=y?p+"px":"",e[$]=x?l+"px":"",e.transform="",e))}function Nt(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,s=n.roundOffsets,f=s===void 0?!0:s,c={placement:q(e.placement),variation:te(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,ut(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:f})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,ut(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement});}var Me={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Nt,data:{}},ye={passive:!0};function It(t){var e=t.state,n=t.instance,r=t.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,s=a===void 0?!0:a,f=H(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,ye);}),s&&f.addEventListener("resize",n.update,ye),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,ye);}),s&&f.removeEventListener("resize",n.update,ye);}}var Re={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:It,data:{}},_t={left:"right",right:"left",bottom:"top",top:"bottom"};function be(t){return t.replace(/left|right|bottom|top/g,function(e){return _t[e]})}var zt={start:"end",end:"start"};function lt(t){return t.replace(/start|end/g,function(e){return zt[e]})}function We(t){var e=H(t),n=e.pageXOffset,r=e.pageYOffset;return {scrollLeft:n,scrollTop:r}}function Be(t){return ee(I(t)).left+We(t).scrollLeft}function Ft(t){var e=H(t),n=I(t),r=e.visualViewport,o=n.clientWidth,i=n.clientHeight,a=0,s=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:o,height:i,x:a+Be(t),y:s}}function Ut(t){var e,n=I(t),r=We(t),o=(e=t.ownerDocument)==null?void 0:e.body,i=X(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=X(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Be(t),f=-r.scrollTop;return N(o||n).direction==="rtl"&&(s+=X(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:f}}function Se(t){var e=N(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return /auto|scroll|overlay|hidden/.test(n+o+r)}function dt(t){return ["html","body","#document"].indexOf(C(t))>=0?t.ownerDocument.body:B(t)&&Se(t)?t:dt(ge(t))}function ce(t,e){var n;e===void 0&&(e=[]);var r=dt(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),i=H(r),a=o?[i].concat(i.visualViewport||[],Se(r)?r:[]):r,s=e.concat(a);return o?s:s.concat(ce(ge(a)))}function Te(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Xt(t){var e=ee(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function ht(t,e){return e===je?Te(Ft(t)):Q(e)?Xt(e):Te(Ut(I(t)))}function Yt(t){var e=ce(ge(t)),n=["absolute","fixed"].indexOf(N(t).position)>=0,r=n&&B(t)?se(t):t;return Q(r)?e.filter(function(o){return Q(o)&&it(o,r)&&C(o)!=="body"}):[]}function Gt(t,e,n){var r=e==="clippingParents"?Yt(t):[].concat(e),o=[].concat(r,[n]),i=o[0],a=o.reduce(function(s,f){var c=ht(t,f);return s.top=X(c.top,s.top),s.right=ve(c.right,s.right),s.bottom=ve(c.bottom,s.bottom),s.left=X(c.left,s.left),s},ht(t,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function mt(t){var e=t.reference,n=t.element,r=t.placement,o=r?q(r):null,i=r?te(r):null,a=e.x+e.width/2-n.width/2,s=e.y+e.height/2-n.height/2,f;switch(o){case E:f={x:a,y:e.y-n.height};break;case R:f={x:a,y:e.y+e.height};break;case W:f={x:e.x+e.width,y:s};break;case P:f={x:e.x-n.width,y:s};break;default:f={x:e.x,y:e.y};}var c=o?Le(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case U:f[c]=f[c]-(e[u]/2-n[u]/2);break;case J:f[c]=f[c]+(e[u]/2-n[u]/2);break}}return f}function ne(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=r===void 0?t.placement:r,i=n.boundary,a=i===void 0?Xe:i,s=n.rootBoundary,f=s===void 0?je:s,c=n.elementContext,u=c===void 0?K:c,m=n.altBoundary,v=m===void 0?!1:m,l=n.padding,h=l===void 0?0:l,p=ft(typeof h!="number"?h:ct(h,G)),g=u===K?Ye:K,x=t.rects.popper,y=t.elements[v?g:u],$=Gt(Q(y)?y:y.contextElement||I(t.elements.popper),a,f),d=ee(t.elements.reference),b=mt({reference:d,element:x,strategy:"absolute",placement:o}),w=Te(Object.assign({},x,b)),O=u===K?w:d,j={top:$.top-O.top+p.top,bottom:O.bottom-$.bottom+p.bottom,left:$.left-O.left+p.left,right:O.right-$.right+p.right},A=t.modifiersData.offset;if(u===K&&A){var k=A[o];Object.keys(j).forEach(function(D){var S=[W,R].indexOf(D)>=0?1:-1,L=[E,R].indexOf(D)>=0?"y":"x";j[D]+=k[L]*S;});}return j}function Jt(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,f=n.allowedAutoPlacements,c=f===void 0?Ee:f,u=te(r),m=u?s?De:De.filter(function(h){return te(h)===u}):G,v=m.filter(function(h){return c.indexOf(h)>=0});v.length===0&&(v=m);var l=v.reduce(function(h,p){return h[p]=ne(t,{placement:p,boundary:o,rootBoundary:i,padding:a})[q(p)],h},{});return Object.keys(l).sort(function(h,p){return l[h]-l[p]})}function Kt(t){if(q(t)===me)return [];var e=be(t);return [lt(t),e,lt(e)]}function Qt(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!0:a,f=n.fallbackPlacements,c=n.padding,u=n.boundary,m=n.rootBoundary,v=n.altBoundary,l=n.flipVariations,h=l===void 0?!0:l,p=n.allowedAutoPlacements,g=e.options.placement,x=q(g),y=x===g,$=f||(y||!h?[be(g)]:Kt(g)),d=[g].concat($).reduce(function(z,V){return z.concat(q(V)===me?Jt(e,{placement:V,boundary:u,rootBoundary:m,padding:c,flipVariations:h,allowedAutoPlacements:p}):V)},[]),b=e.rects.reference,w=e.rects.popper,O=new Map,j=!0,A=d[0],k=0;k<d.length;k++){var D=d[k],S=q(D),L=te(D)===U,re=[E,R].indexOf(S)>=0,oe=re?"width":"height",M=ne(e,{placement:D,boundary:u,rootBoundary:m,altBoundary:v,padding:c}),T=re?L?W:P:L?R:E;b[oe]>w[oe]&&(T=be(T));var pe=be(T),_=[];if(i&&_.push(M[S]<=0),s&&_.push(M[T]<=0,M[pe]<=0),_.every(function(z){return z})){A=D,j=!1;break}O.set(D,_);}if(j)for(var ue=h?3:1,xe=function(z){var V=d.find(function(de){var ae=O.get(de);if(ae)return ae.slice(0,z).every(function(Y){return Y})});if(V)return A=V,"break"},ie=ue;ie>0;ie--){var le=xe(ie);if(le==="break")break}e.placement!==A&&(e.modifiersData[r]._skip=!0,e.placement=A,e.reset=!0);}}var vt={name:"flip",enabled:!0,phase:"main",fn:Qt,requiresIfExists:["offset"],data:{_skip:!1}};function gt(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function yt(t){return [E,W,R,P].some(function(e){return t[e]>=0})}function Zt(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,a=ne(e,{elementContext:"reference"}),s=ne(e,{altBoundary:!0}),f=gt(a,r),c=gt(s,o,i),u=yt(f),m=yt(c);e.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:m},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":m});}var bt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Zt};function en(t,e,n){var r=q(t),o=[P,E].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[P,W].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function tn(t){var e=t.state,n=t.options,r=t.name,o=n.offset,i=o===void 0?[0,0]:o,a=Ee.reduce(function(u,m){return u[m]=en(m,e.rects,i),u},{}),s=a[e.placement],f=s.x,c=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=f,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=a;}var wt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:tn};function nn(t){var e=t.state,n=t.name;e.modifiersData[n]=mt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement});}var He={name:"popperOffsets",enabled:!0,phase:"read",fn:nn,data:{}};function rn(t){return t==="x"?"y":"x"}function on(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!1:a,f=n.boundary,c=n.rootBoundary,u=n.altBoundary,m=n.padding,v=n.tether,l=v===void 0?!0:v,h=n.tetherOffset,p=h===void 0?0:h,g=ne(e,{boundary:f,rootBoundary:c,padding:m,altBoundary:u}),x=q(e.placement),y=te(e.placement),$=!y,d=Le(x),b=rn(d),w=e.modifiersData.popperOffsets,O=e.rects.reference,j=e.rects.popper,A=typeof p=="function"?p(Object.assign({},e.rects,{placement:e.placement})):p,k=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,S={x:0,y:0};if(w){if(i){var L,re=d==="y"?E:P,oe=d==="y"?R:W,M=d==="y"?"height":"width",T=w[d],pe=T+g[re],_=T-g[oe],ue=l?-j[M]/2:0,xe=y===U?O[M]:j[M],ie=y===U?-j[M]:-O[M],le=e.elements.arrow,z=l&&le?ke(le):{width:0,height:0},V=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:st(),de=V[re],ae=V[oe],Y=fe(0,O[M],z[M]),jt=$?O[M]/2-ue-Y-de-k.mainAxis:xe-Y-de-k.mainAxis,Dt=$?-O[M]/2+ue+Y+ae+k.mainAxis:ie+Y+ae+k.mainAxis,Oe=e.elements.arrow&&se(e.elements.arrow),Et=Oe?d==="y"?Oe.clientTop||0:Oe.clientLeft||0:0,Ce=(L=D==null?void 0:D[d])!=null?L:0,Pt=T+jt-Ce-Et,At=T+Dt-Ce,qe=fe(l?ve(pe,Pt):pe,T,l?X(_,At):_);w[d]=qe,S[d]=qe-T;}if(s){var Ve,kt=d==="x"?E:P,Lt=d==="x"?R:W,F=w[b],he=b==="y"?"height":"width",Ne=F+g[kt],Ie=F-g[Lt],$e=[E,P].indexOf(x)!==-1,_e=(Ve=D==null?void 0:D[b])!=null?Ve:0,ze=$e?Ne:F-O[he]-j[he]-_e+k.altAxis,Fe=$e?F+O[he]+j[he]-_e-k.altAxis:Ie,Ue=l&&$e?St(ze,F,Fe):fe(l?ze:Ne,F,l?Fe:Ie);w[b]=Ue,S[b]=Ue-F;}e.modifiersData[r]=S;}}var xt={name:"preventOverflow",enabled:!0,phase:"main",fn:on,requiresIfExists:["offset"]};function an(t){return {scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function sn(t){return t===H(t)||!B(t)?We(t):an(t)}function fn(t){var e=t.getBoundingClientRect(),n=Z(e.width)/t.offsetWidth||1,r=Z(e.height)/t.offsetHeight||1;return n!==1||r!==1}function cn(t,e,n){n===void 0&&(n=!1);var r=B(e),o=B(e)&&fn(e),i=I(e),a=ee(t,o),s={scrollLeft:0,scrollTop:0},f={x:0,y:0};return (r||!r&&!n)&&((C(e)!=="body"||Se(i))&&(s=sn(e)),B(e)?(f=ee(e,!0),f.x+=e.clientLeft,f.y+=e.clientTop):i&&(f.x=Be(i))),{x:a.left+s.scrollLeft-f.x,y:a.top+s.scrollTop-f.y,width:a.width,height:a.height}}function pn(t){var e=new Map,n=new Set,r=[];t.forEach(function(i){e.set(i.name,i);});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var f=e.get(s);f&&o(f);}}),r.push(i);}return t.forEach(function(i){n.has(i.name)||o(i);}),r}function un(t){var e=pn(t);return ot.reduce(function(n,r){return n.concat(e.filter(function(o){return o.phase===r}))},[])}function ln(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t());});})),e}}function dn(t){var e=t.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var Ot={placement:"bottom",modifiers:[],strategy:"absolute"};function $t(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return !e.some(function(r){return !(r&&typeof r.getBoundingClientRect=="function")})}function we(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,o=e.defaultOptions,i=o===void 0?Ot:o;return function(a,s,f){f===void 0&&(f=i);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ot,i),modifiersData:{},elements:{reference:a,popper:s},attributes:{},styles:{}},u=[],m=!1,v={state:c,setOptions:function(p){var g=typeof p=="function"?p(c.options):p;h(),c.options=Object.assign({},i,c.options,g),c.scrollParents={reference:Q(a)?ce(a):a.contextElement?ce(a.contextElement):[],popper:ce(s)};var x=un(dn([].concat(r,c.options.modifiers)));return c.orderedModifiers=x.filter(function(y){return y.enabled}),l(),v.update()},forceUpdate:function(){if(!m){var p=c.elements,g=p.reference,x=p.popper;if($t(g,x)){c.rects={reference:cn(g,se(x),c.options.strategy==="fixed"),popper:ke(x)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(j){return c.modifiersData[j.name]=Object.assign({},j.data)});for(var y=0;y<c.orderedModifiers.length;y++){if(c.reset===!0){c.reset=!1,y=-1;continue}var $=c.orderedModifiers[y],d=$.fn,b=$.options,w=b===void 0?{}:b,O=$.name;typeof d=="function"&&(c=d({state:c,options:w,name:O,instance:v})||c);}}}},update:ln(function(){return new Promise(function(p){v.forceUpdate(),p(c);})}),destroy:function(){h(),m=!0;}};if(!$t(a,s))return v;v.setOptions(f).then(function(p){!m&&f.onFirstUpdate&&f.onFirstUpdate(p);});function l(){c.orderedModifiers.forEach(function(p){var g=p.name,x=p.options,y=x===void 0?{}:x,$=p.effect;if(typeof $=="function"){var d=$({state:c,name:g,instance:v,options:y}),b=function(){};u.push(d||b);}});}function h(){u.forEach(function(p){return p()}),u=[];}return v}}we();var mn=[Re,He,Me,Ae];we({defaultModifiers:mn});var gn=[Re,He,Me,Ae,wt,vt,xt,pt,bt],yn=we({defaultModifiers:gn});
|
|
15571
15641
|
|
|
@@ -15947,7 +16017,7 @@ const usePopperContentDOM = (props, {
|
|
|
15947
16017
|
const __default__$l = defineComponent({
|
|
15948
16018
|
name: "ElPopperContent"
|
|
15949
16019
|
});
|
|
15950
|
-
const _sfc_main$
|
|
16020
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
15951
16021
|
...__default__$l,
|
|
15952
16022
|
props: popperContentProps,
|
|
15953
16023
|
emits: popperContentEmits,
|
|
@@ -16064,7 +16134,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
16064
16134
|
};
|
|
16065
16135
|
}
|
|
16066
16136
|
});
|
|
16067
|
-
var ElPopperContent = /* @__PURE__ */ _export_sfc
|
|
16137
|
+
var ElPopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__file", "content.vue"]]);
|
|
16068
16138
|
|
|
16069
16139
|
const ElPopper = withInstall(Popper);
|
|
16070
16140
|
|
|
@@ -16345,7 +16415,7 @@ const composeEventHandlers = (theirsHandler, oursHandler, { checkForDefaultPreve
|
|
|
16345
16415
|
const __default__$k = defineComponent({
|
|
16346
16416
|
name: "ElTooltipTrigger"
|
|
16347
16417
|
});
|
|
16348
|
-
const _sfc_main$
|
|
16418
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
16349
16419
|
...__default__$k,
|
|
16350
16420
|
props: useTooltipTriggerProps,
|
|
16351
16421
|
setup(__props, { expose }) {
|
|
@@ -16405,7 +16475,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
16405
16475
|
};
|
|
16406
16476
|
}
|
|
16407
16477
|
});
|
|
16408
|
-
var ElTooltipTrigger = /* @__PURE__ */ _export_sfc
|
|
16478
|
+
var ElTooltipTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__file", "trigger.vue"]]);
|
|
16409
16479
|
|
|
16410
16480
|
const teleportProps = buildProps({
|
|
16411
16481
|
to: {
|
|
@@ -16415,7 +16485,7 @@ const teleportProps = buildProps({
|
|
|
16415
16485
|
disabled: Boolean
|
|
16416
16486
|
});
|
|
16417
16487
|
|
|
16418
|
-
const _sfc_main$
|
|
16488
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
16419
16489
|
__name: "teleport",
|
|
16420
16490
|
props: teleportProps,
|
|
16421
16491
|
setup(__props) {
|
|
@@ -16429,7 +16499,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
16429
16499
|
};
|
|
16430
16500
|
}
|
|
16431
16501
|
});
|
|
16432
|
-
var Teleport = /* @__PURE__ */ _export_sfc
|
|
16502
|
+
var Teleport = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__file", "teleport.vue"]]);
|
|
16433
16503
|
|
|
16434
16504
|
const ElTeleport = withInstall(Teleport);
|
|
16435
16505
|
|
|
@@ -16470,7 +16540,7 @@ const __default__$j = defineComponent({
|
|
|
16470
16540
|
name: "ElTooltipContent",
|
|
16471
16541
|
inheritAttrs: false
|
|
16472
16542
|
});
|
|
16473
|
-
const _sfc_main$
|
|
16543
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
16474
16544
|
...__default__$j,
|
|
16475
16545
|
props: useTooltipContentProps,
|
|
16476
16546
|
setup(__props, { expose }) {
|
|
@@ -16642,12 +16712,12 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
16642
16712
|
};
|
|
16643
16713
|
}
|
|
16644
16714
|
});
|
|
16645
|
-
var ElTooltipContent = /* @__PURE__ */ _export_sfc
|
|
16715
|
+
var ElTooltipContent = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__file", "content.vue"]]);
|
|
16646
16716
|
|
|
16647
16717
|
const __default__$i = defineComponent({
|
|
16648
16718
|
name: "ElTooltip"
|
|
16649
16719
|
});
|
|
16650
|
-
const _sfc_main$
|
|
16720
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
16651
16721
|
...__default__$i,
|
|
16652
16722
|
props: useTooltipProps,
|
|
16653
16723
|
emits: tooltipEmits,
|
|
@@ -16798,7 +16868,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
16798
16868
|
};
|
|
16799
16869
|
}
|
|
16800
16870
|
});
|
|
16801
|
-
var Tooltip$1 = /* @__PURE__ */ _export_sfc
|
|
16871
|
+
var Tooltip$1 = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__file", "tooltip.vue"]]);
|
|
16802
16872
|
|
|
16803
16873
|
const ElTooltip = withInstall(Tooltip$1);
|
|
16804
16874
|
|
|
@@ -17875,7 +17945,7 @@ function useButtonCustomStyle(props) {
|
|
|
17875
17945
|
const __default__$h = defineComponent({
|
|
17876
17946
|
name: "ElButton"
|
|
17877
17947
|
});
|
|
17878
|
-
const _sfc_main$
|
|
17948
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
17879
17949
|
...__default__$h,
|
|
17880
17950
|
props: buttonProps,
|
|
17881
17951
|
emits: buttonEmits,
|
|
@@ -17942,7 +18012,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
17942
18012
|
};
|
|
17943
18013
|
}
|
|
17944
18014
|
});
|
|
17945
|
-
var Button = /* @__PURE__ */ _export_sfc
|
|
18015
|
+
var Button = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__file", "button.vue"]]);
|
|
17946
18016
|
|
|
17947
18017
|
const buttonGroupProps = {
|
|
17948
18018
|
size: buttonProps.size,
|
|
@@ -17952,7 +18022,7 @@ const buttonGroupProps = {
|
|
|
17952
18022
|
const __default__$g = defineComponent({
|
|
17953
18023
|
name: "ElButtonGroup"
|
|
17954
18024
|
});
|
|
17955
|
-
const _sfc_main$
|
|
18025
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
17956
18026
|
...__default__$g,
|
|
17957
18027
|
props: buttonGroupProps,
|
|
17958
18028
|
setup(__props) {
|
|
@@ -17971,7 +18041,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
17971
18041
|
};
|
|
17972
18042
|
}
|
|
17973
18043
|
});
|
|
17974
|
-
var ButtonGroup = /* @__PURE__ */ _export_sfc
|
|
18044
|
+
var ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__file", "button-group.vue"]]);
|
|
17975
18045
|
|
|
17976
18046
|
const ElButton = withInstall(Button, {
|
|
17977
18047
|
ButtonGroup
|
|
@@ -18011,7 +18081,7 @@ const tagEmits = {
|
|
|
18011
18081
|
const __default__$f = defineComponent({
|
|
18012
18082
|
name: "ElTag"
|
|
18013
18083
|
});
|
|
18014
|
-
const _sfc_main$
|
|
18084
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
18015
18085
|
...__default__$f,
|
|
18016
18086
|
props: tagProps,
|
|
18017
18087
|
emits: tagEmits,
|
|
@@ -18099,7 +18169,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
18099
18169
|
};
|
|
18100
18170
|
}
|
|
18101
18171
|
});
|
|
18102
|
-
var Tag = /* @__PURE__ */ _export_sfc
|
|
18172
|
+
var Tag = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__file", "tag.vue"]]);
|
|
18103
18173
|
|
|
18104
18174
|
const ElTag = withInstall(Tag);
|
|
18105
18175
|
|
|
@@ -18208,22 +18278,22 @@ const vRepeatClick = {
|
|
|
18208
18278
|
}
|
|
18209
18279
|
};
|
|
18210
18280
|
|
|
18211
|
-
const _sfc_main$
|
|
18281
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
18212
18282
|
inheritAttrs: false
|
|
18213
18283
|
});
|
|
18214
|
-
function _sfc_render$
|
|
18284
|
+
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
18215
18285
|
return renderSlot(_ctx.$slots, "default");
|
|
18216
18286
|
}
|
|
18217
|
-
var Collection = /* @__PURE__ */ _export_sfc
|
|
18287
|
+
var Collection = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$8], ["__file", "collection.vue"]]);
|
|
18218
18288
|
|
|
18219
|
-
const _sfc_main$
|
|
18289
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
18220
18290
|
name: "ElCollectionItem",
|
|
18221
18291
|
inheritAttrs: false
|
|
18222
18292
|
});
|
|
18223
|
-
function _sfc_render$
|
|
18293
|
+
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
18224
18294
|
return renderSlot(_ctx.$slots, "default");
|
|
18225
18295
|
}
|
|
18226
|
-
var CollectionItem = /* @__PURE__ */ _export_sfc
|
|
18296
|
+
var CollectionItem = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$7], ["__file", "collection-item.vue"]]);
|
|
18227
18297
|
|
|
18228
18298
|
const COLLECTION_ITEM_SIGN = `data-el-collection-item`;
|
|
18229
18299
|
const createCollectionWithScope = (name) => {
|
|
@@ -18436,7 +18506,7 @@ const inputNumberEmits = {
|
|
|
18436
18506
|
const __default__$e = defineComponent({
|
|
18437
18507
|
name: "ElInputNumber"
|
|
18438
18508
|
});
|
|
18439
|
-
const _sfc_main$
|
|
18509
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
18440
18510
|
...__default__$e,
|
|
18441
18511
|
props: inputNumberProps,
|
|
18442
18512
|
emits: inputNumberEmits,
|
|
@@ -18763,7 +18833,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
18763
18833
|
};
|
|
18764
18834
|
}
|
|
18765
18835
|
});
|
|
18766
|
-
var InputNumber = /* @__PURE__ */ _export_sfc
|
|
18836
|
+
var InputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__file", "input-number.vue"]]);
|
|
18767
18837
|
|
|
18768
18838
|
const ElInputNumber = withInstall(InputNumber);
|
|
18769
18839
|
|
|
@@ -18813,7 +18883,7 @@ const linkEmits = {
|
|
|
18813
18883
|
const __default__$d = defineComponent({
|
|
18814
18884
|
name: "ElLink"
|
|
18815
18885
|
});
|
|
18816
|
-
const _sfc_main$
|
|
18886
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
18817
18887
|
...__default__$d,
|
|
18818
18888
|
props: linkProps,
|
|
18819
18889
|
emits: linkEmits,
|
|
@@ -18854,14 +18924,14 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
18854
18924
|
};
|
|
18855
18925
|
}
|
|
18856
18926
|
});
|
|
18857
|
-
var Link = /* @__PURE__ */ _export_sfc
|
|
18927
|
+
var Link = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__file", "link.vue"]]);
|
|
18858
18928
|
|
|
18859
18929
|
const ElLink = withInstall(Link);
|
|
18860
18930
|
|
|
18861
18931
|
const selectGroupKey = Symbol("ElSelectGroup");
|
|
18862
18932
|
const selectKey = Symbol("ElSelect");
|
|
18863
18933
|
|
|
18864
|
-
function useOption(props, states) {
|
|
18934
|
+
function useOption$1(props, states) {
|
|
18865
18935
|
const select = inject(selectKey);
|
|
18866
18936
|
const selectGroup = inject(selectGroupKey, { disabled: false });
|
|
18867
18937
|
const itemSelected = computed(() => {
|
|
@@ -18936,7 +19006,7 @@ function useOption(props, states) {
|
|
|
18936
19006
|
};
|
|
18937
19007
|
}
|
|
18938
19008
|
|
|
18939
|
-
const _sfc_main$
|
|
19009
|
+
const _sfc_main$k = defineComponent({
|
|
18940
19010
|
name: "ElOption",
|
|
18941
19011
|
componentName: "ElOption",
|
|
18942
19012
|
props: {
|
|
@@ -18970,7 +19040,7 @@ const _sfc_main$h = defineComponent({
|
|
|
18970
19040
|
select,
|
|
18971
19041
|
hoverItem,
|
|
18972
19042
|
updateOption
|
|
18973
|
-
} = useOption(props, states);
|
|
19043
|
+
} = useOption$1(props, states);
|
|
18974
19044
|
const { visible, hover } = toRefs(states);
|
|
18975
19045
|
const vm = getCurrentInstance().proxy;
|
|
18976
19046
|
select.onOptionCreate(vm);
|
|
@@ -19009,7 +19079,7 @@ const _sfc_main$h = defineComponent({
|
|
|
19009
19079
|
};
|
|
19010
19080
|
}
|
|
19011
19081
|
});
|
|
19012
|
-
function _sfc_render$
|
|
19082
|
+
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
19013
19083
|
return withDirectives((openBlock(), createElementBlock("li", {
|
|
19014
19084
|
id: _ctx.id,
|
|
19015
19085
|
class: normalizeClass(_ctx.containerKls),
|
|
@@ -19026,9 +19096,9 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19026
19096
|
[vShow, _ctx.visible]
|
|
19027
19097
|
]);
|
|
19028
19098
|
}
|
|
19029
|
-
var Option = /* @__PURE__ */ _export_sfc
|
|
19099
|
+
var Option = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$6], ["__file", "option.vue"]]);
|
|
19030
19100
|
|
|
19031
|
-
const _sfc_main$
|
|
19101
|
+
const _sfc_main$j = defineComponent({
|
|
19032
19102
|
name: "ElSelectDropdown",
|
|
19033
19103
|
componentName: "ElSelectDropdown",
|
|
19034
19104
|
setup() {
|
|
@@ -19055,7 +19125,7 @@ const _sfc_main$g = defineComponent({
|
|
|
19055
19125
|
};
|
|
19056
19126
|
}
|
|
19057
19127
|
});
|
|
19058
|
-
function _sfc_render$
|
|
19128
|
+
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
19059
19129
|
return openBlock(), createElementBlock("div", {
|
|
19060
19130
|
class: normalizeClass([_ctx.ns.b("dropdown"), _ctx.ns.is("multiple", _ctx.isMultiple), _ctx.popperClass]),
|
|
19061
19131
|
style: normalizeStyle({ [_ctx.isFitInputWidth ? "width" : "minWidth"]: _ctx.minWidth })
|
|
@@ -19075,9 +19145,9 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19075
19145
|
], 2)) : createCommentVNode("v-if", true)
|
|
19076
19146
|
], 6);
|
|
19077
19147
|
}
|
|
19078
|
-
var ElSelectMenu = /* @__PURE__ */ _export_sfc
|
|
19148
|
+
var ElSelectMenu$1 = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$5], ["__file", "select-dropdown.vue"]]);
|
|
19079
19149
|
|
|
19080
|
-
const useSelect = (props, emit) => {
|
|
19150
|
+
const useSelect$1 = (props, emit) => {
|
|
19081
19151
|
const { t } = useLocale();
|
|
19082
19152
|
const contentId = useId();
|
|
19083
19153
|
const nsSelect = useNamespace("select");
|
|
@@ -19234,7 +19304,7 @@ const useSelect = (props, emit) => {
|
|
|
19234
19304
|
}
|
|
19235
19305
|
}
|
|
19236
19306
|
setSelected();
|
|
19237
|
-
if (!isEqual(val, oldVal) && props.validateEvent) {
|
|
19307
|
+
if (!isEqual$1(val, oldVal) && props.validateEvent) {
|
|
19238
19308
|
formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn());
|
|
19239
19309
|
}
|
|
19240
19310
|
}, {
|
|
@@ -19378,7 +19448,7 @@ const useSelect = (props, emit) => {
|
|
|
19378
19448
|
onInputChange();
|
|
19379
19449
|
}, debounce$1.value);
|
|
19380
19450
|
const emitChange = (val) => {
|
|
19381
|
-
if (!isEqual(props.modelValue, val)) {
|
|
19451
|
+
if (!isEqual$1(props.modelValue, val)) {
|
|
19382
19452
|
emit(CHANGE_EVENT, val);
|
|
19383
19453
|
}
|
|
19384
19454
|
};
|
|
@@ -19467,7 +19537,7 @@ const useSelect = (props, emit) => {
|
|
|
19467
19537
|
if (!isObject$1(option.value))
|
|
19468
19538
|
return arr.indexOf(option.value);
|
|
19469
19539
|
return arr.findIndex((item) => {
|
|
19470
|
-
return isEqual(get(item, props.valueKey), getValueKey(option));
|
|
19540
|
+
return isEqual$1(get(item, props.valueKey), getValueKey(option));
|
|
19471
19541
|
});
|
|
19472
19542
|
};
|
|
19473
19543
|
const scrollToOption = (option) => {
|
|
@@ -19723,7 +19793,7 @@ var ElOptions = defineComponent({
|
|
|
19723
19793
|
if (children.length) {
|
|
19724
19794
|
filterOptions((_b = children[0]) == null ? void 0 : _b.children);
|
|
19725
19795
|
}
|
|
19726
|
-
if (!isEqual(valueList, cachedValueList)) {
|
|
19796
|
+
if (!isEqual$1(valueList, cachedValueList)) {
|
|
19727
19797
|
cachedValueList = valueList;
|
|
19728
19798
|
if (select) {
|
|
19729
19799
|
select.states.optionValues = valueList;
|
|
@@ -19734,7 +19804,7 @@ var ElOptions = defineComponent({
|
|
|
19734
19804
|
}
|
|
19735
19805
|
});
|
|
19736
19806
|
|
|
19737
|
-
const SelectProps = buildProps({
|
|
19807
|
+
const SelectProps$1 = buildProps({
|
|
19738
19808
|
name: String,
|
|
19739
19809
|
id: String,
|
|
19740
19810
|
modelValue: {
|
|
@@ -19841,11 +19911,11 @@ const SelectProps = buildProps({
|
|
|
19841
19911
|
});
|
|
19842
19912
|
|
|
19843
19913
|
const COMPONENT_NAME = "ElSelect";
|
|
19844
|
-
const _sfc_main$
|
|
19914
|
+
const _sfc_main$i = defineComponent({
|
|
19845
19915
|
name: COMPONENT_NAME,
|
|
19846
19916
|
componentName: COMPONENT_NAME,
|
|
19847
19917
|
components: {
|
|
19848
|
-
ElSelectMenu,
|
|
19918
|
+
ElSelectMenu: ElSelectMenu$1,
|
|
19849
19919
|
ElOption: Option,
|
|
19850
19920
|
ElOptions,
|
|
19851
19921
|
ElTag,
|
|
@@ -19854,7 +19924,7 @@ const _sfc_main$f = defineComponent({
|
|
|
19854
19924
|
ElIcon
|
|
19855
19925
|
},
|
|
19856
19926
|
directives: { ClickOutside },
|
|
19857
|
-
props: SelectProps,
|
|
19927
|
+
props: SelectProps$1,
|
|
19858
19928
|
emits: [
|
|
19859
19929
|
UPDATE_MODEL_EVENT,
|
|
19860
19930
|
CHANGE_EVENT,
|
|
@@ -19877,7 +19947,7 @@ const _sfc_main$f = defineComponent({
|
|
|
19877
19947
|
...toRefs(props),
|
|
19878
19948
|
modelValue
|
|
19879
19949
|
});
|
|
19880
|
-
const API = useSelect(_props, emit);
|
|
19950
|
+
const API = useSelect$1(_props, emit);
|
|
19881
19951
|
const { calculatorRef, inputStyle } = useCalcInputWidth();
|
|
19882
19952
|
provide(selectKey, reactive({
|
|
19883
19953
|
props: _props,
|
|
@@ -19904,7 +19974,7 @@ const _sfc_main$f = defineComponent({
|
|
|
19904
19974
|
};
|
|
19905
19975
|
}
|
|
19906
19976
|
});
|
|
19907
|
-
function _sfc_render$
|
|
19977
|
+
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
19908
19978
|
const _component_el_tag = resolveComponent("el-tag");
|
|
19909
19979
|
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
19910
19980
|
const _component_el_icon = resolveComponent("el-icon");
|
|
@@ -20251,9 +20321,9 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
20251
20321
|
[_directive_click_outside, _ctx.handleClickOutside, _ctx.popperRef]
|
|
20252
20322
|
]);
|
|
20253
20323
|
}
|
|
20254
|
-
var Select = /* @__PURE__ */ _export_sfc
|
|
20324
|
+
var Select$1 = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$4], ["__file", "select.vue"]]);
|
|
20255
20325
|
|
|
20256
|
-
const _sfc_main$
|
|
20326
|
+
const _sfc_main$h = defineComponent({
|
|
20257
20327
|
name: "ElOptionGroup",
|
|
20258
20328
|
componentName: "ElOptionGroup",
|
|
20259
20329
|
props: {
|
|
@@ -20306,7 +20376,7 @@ const _sfc_main$e = defineComponent({
|
|
|
20306
20376
|
};
|
|
20307
20377
|
}
|
|
20308
20378
|
});
|
|
20309
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
20379
|
+
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
20310
20380
|
return withDirectives((openBlock(), createElementBlock("ul", {
|
|
20311
20381
|
ref: "groupRef",
|
|
20312
20382
|
class: normalizeClass(_ctx.ns.be("group", "wrap"))
|
|
@@ -20325,9 +20395,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
20325
20395
|
[vShow, _ctx.visible]
|
|
20326
20396
|
]);
|
|
20327
20397
|
}
|
|
20328
|
-
var OptionGroup = /* @__PURE__ */ _export_sfc
|
|
20398
|
+
var OptionGroup = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$3], ["__file", "option-group.vue"]]);
|
|
20329
20399
|
|
|
20330
|
-
const ElSelect = withInstall(Select, {
|
|
20400
|
+
const ElSelect = withInstall(Select$1, {
|
|
20331
20401
|
Option,
|
|
20332
20402
|
OptionGroup
|
|
20333
20403
|
});
|
|
@@ -20399,7 +20469,7 @@ const updateEventKeyRaw = `onUpdate:visible`;
|
|
|
20399
20469
|
const __default__$c = defineComponent({
|
|
20400
20470
|
name: "ElPopover"
|
|
20401
20471
|
});
|
|
20402
|
-
const _sfc_main$
|
|
20472
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
20403
20473
|
...__default__$c,
|
|
20404
20474
|
props: popoverProps,
|
|
20405
20475
|
emits: popoverEmits,
|
|
@@ -20499,7 +20569,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
20499
20569
|
};
|
|
20500
20570
|
}
|
|
20501
20571
|
});
|
|
20502
|
-
var Popover = /* @__PURE__ */ _export_sfc
|
|
20572
|
+
var Popover = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__file", "popover.vue"]]);
|
|
20503
20573
|
|
|
20504
20574
|
const attachEvents = (el, binding) => {
|
|
20505
20575
|
const popperComponent = binding.arg || binding.value;
|
|
@@ -20523,160 +20593,2813 @@ const ElPopover = withInstall(Popover, {
|
|
|
20523
20593
|
directive: ElPopoverDirective
|
|
20524
20594
|
});
|
|
20525
20595
|
|
|
20526
|
-
|
|
20527
|
-
const target = sfc.__vccOpts || sfc;
|
|
20528
|
-
for (const [key, val] of props) {
|
|
20529
|
-
target[key] = val;
|
|
20530
|
-
}
|
|
20531
|
-
return target;
|
|
20532
|
-
};
|
|
20533
|
-
|
|
20534
|
-
const _hoisted_1$a = ["onClick"];
|
|
20535
|
-
const _hoisted_2$9 = { class: "hzzt-dropdown-name" };
|
|
20536
|
-
const _hoisted_3$7 = /* @__PURE__ */ createElementVNode("span", { class: "caret" }, null, -1);
|
|
20537
|
-
const _hoisted_4$5 = { class: "hzzt-dropdown-menu" };
|
|
20538
|
-
const _hoisted_5$3 = ["onClick"];
|
|
20539
|
-
const _hoisted_6$3 = { class: "submenu" };
|
|
20540
|
-
const _hoisted_7$3 = ["onClick"];
|
|
20541
|
-
const __default__$b = defineComponent({
|
|
20542
|
-
name: "HzztDropDown"
|
|
20543
|
-
});
|
|
20544
|
-
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
20545
|
-
...__default__$b,
|
|
20596
|
+
const _sfc_main$f = defineComponent({
|
|
20546
20597
|
props: {
|
|
20547
|
-
|
|
20548
|
-
type: Array,
|
|
20549
|
-
default: () => []
|
|
20550
|
-
},
|
|
20551
|
-
label: String,
|
|
20552
|
-
value: String,
|
|
20553
|
-
defaultValue: {
|
|
20554
|
-
type: Array,
|
|
20555
|
-
default: () => []
|
|
20556
|
-
},
|
|
20557
|
-
position: {
|
|
20558
|
-
type: String,
|
|
20559
|
-
default: "right"
|
|
20560
|
-
},
|
|
20561
|
-
props: {
|
|
20598
|
+
item: {
|
|
20562
20599
|
type: Object,
|
|
20563
|
-
|
|
20564
|
-
children: "children",
|
|
20565
|
-
label: "label",
|
|
20566
|
-
value: "value"
|
|
20567
|
-
})
|
|
20600
|
+
required: true
|
|
20568
20601
|
},
|
|
20569
|
-
|
|
20570
|
-
type:
|
|
20571
|
-
|
|
20572
|
-
|
|
20602
|
+
style: {
|
|
20603
|
+
type: Object
|
|
20604
|
+
},
|
|
20605
|
+
height: Number
|
|
20573
20606
|
},
|
|
20574
|
-
|
|
20575
|
-
|
|
20576
|
-
|
|
20577
|
-
|
|
20578
|
-
function dropToggle() {
|
|
20579
|
-
toggle.value = !toggle.value;
|
|
20580
|
-
}
|
|
20581
|
-
function close() {
|
|
20582
|
-
toggle.value = false;
|
|
20583
|
-
}
|
|
20584
|
-
function selectValue(val) {
|
|
20585
|
-
if (dProps.returnType === "Array") {
|
|
20586
|
-
emits("change", val);
|
|
20587
|
-
}
|
|
20588
|
-
if (dProps.returnType === "String") {
|
|
20589
|
-
emits("change", val.last);
|
|
20590
|
-
}
|
|
20591
|
-
}
|
|
20592
|
-
return (_ctx, _cache) => {
|
|
20593
|
-
return withDirectives((openBlock(), createElementBlock("ul", {
|
|
20594
|
-
class: "hzzt-dropdown",
|
|
20595
|
-
onClick: withModifiers(dropToggle, ["stop"])
|
|
20596
|
-
}, [
|
|
20597
|
-
createElementVNode("li", {
|
|
20598
|
-
class: normalizeClass({ "hzzt-dropdown-li": true, "hzzt-dropdown-li-show": toggle.value })
|
|
20599
|
-
}, [
|
|
20600
|
-
createElementVNode("span", _hoisted_2$9, toDisplayString(__props.label), 1),
|
|
20601
|
-
_hoisted_3$7,
|
|
20602
|
-
createElementVNode("ul", _hoisted_4$5, [
|
|
20603
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option, index) => {
|
|
20604
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
20605
|
-
unref(isEmpty)(option[__props.props.children]) ? (openBlock(), createElementBlock("li", {
|
|
20606
|
-
key: index,
|
|
20607
|
-
class: normalizeClass({
|
|
20608
|
-
"hzzt-dropdown-menu-item": true,
|
|
20609
|
-
selected: __props.defaultValue.includes(option[__props.props.value])
|
|
20610
|
-
})
|
|
20611
|
-
}, [
|
|
20612
|
-
createElementVNode("a", {
|
|
20613
|
-
class: "hzzt-dropdown-menu-item-label",
|
|
20614
|
-
onClick: ($event) => selectValue([option[__props.props.value]])
|
|
20615
|
-
}, toDisplayString(option[__props.props.label]), 9, _hoisted_5$3)
|
|
20616
|
-
], 2)) : (openBlock(), createElementBlock("li", {
|
|
20617
|
-
key: index + "submenu",
|
|
20618
|
-
class: "hzzt-dropdown-menu-item hzzt-dropdown-submenu"
|
|
20619
|
-
}, [
|
|
20620
|
-
createElementVNode("a", _hoisted_6$3, toDisplayString(option[__props.props.label]), 1),
|
|
20621
|
-
createElementVNode("ul", {
|
|
20622
|
-
class: normalizeClass([["pull-" + __props.position], "hzzt-dropdown-menu"])
|
|
20623
|
-
}, [
|
|
20624
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(option.children, (child, cIndex) => {
|
|
20625
|
-
return openBlock(), createElementBlock("li", {
|
|
20626
|
-
key: cIndex,
|
|
20627
|
-
class: normalizeClass({
|
|
20628
|
-
"hzzt-dropdown-menu-item": true,
|
|
20629
|
-
selected: __props.defaultValue.includes(child[__props.props.value])
|
|
20630
|
-
})
|
|
20631
|
-
}, [
|
|
20632
|
-
createElementVNode("a", {
|
|
20633
|
-
class: "hzzt-dropdown-menu-item-label",
|
|
20634
|
-
onClick: ($event) => selectValue([option[__props.props.value], child[__props.props.value]])
|
|
20635
|
-
}, toDisplayString(child[__props.props.label]), 9, _hoisted_7$3)
|
|
20636
|
-
], 2);
|
|
20637
|
-
}), 128))
|
|
20638
|
-
], 2)
|
|
20639
|
-
])),
|
|
20640
|
-
option.divider ? (openBlock(), createElementBlock("li", {
|
|
20641
|
-
key: index + "divider",
|
|
20642
|
-
class: "divider"
|
|
20643
|
-
})) : createCommentVNode("v-if", true)
|
|
20644
|
-
], 64);
|
|
20645
|
-
}), 256))
|
|
20646
|
-
])
|
|
20647
|
-
], 2)
|
|
20648
|
-
], 8, _hoisted_1$a)), [
|
|
20649
|
-
[unref(ClickOutside), close]
|
|
20650
|
-
]);
|
|
20607
|
+
setup() {
|
|
20608
|
+
const ns = useNamespace("select");
|
|
20609
|
+
return {
|
|
20610
|
+
ns
|
|
20651
20611
|
};
|
|
20652
20612
|
}
|
|
20653
20613
|
});
|
|
20654
|
-
|
|
20614
|
+
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
20615
|
+
return openBlock(), createElementBlock("div", {
|
|
20616
|
+
class: normalizeClass(_ctx.ns.be("group", "title")),
|
|
20617
|
+
style: normalizeStyle({ ..._ctx.style, lineHeight: `${_ctx.height}px` })
|
|
20618
|
+
}, toDisplayString(_ctx.item.label), 7);
|
|
20619
|
+
}
|
|
20620
|
+
var GroupItem = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$2], ["__file", "group-item.vue"]]);
|
|
20655
20621
|
|
|
20656
|
-
|
|
20622
|
+
function useOption(props, { emit }) {
|
|
20623
|
+
return {
|
|
20624
|
+
hoverItem: () => {
|
|
20625
|
+
if (!props.disabled) {
|
|
20626
|
+
emit("hover", props.index);
|
|
20627
|
+
}
|
|
20628
|
+
},
|
|
20629
|
+
selectOptionClick: () => {
|
|
20630
|
+
if (!props.disabled) {
|
|
20631
|
+
emit("select", props.item, props.index);
|
|
20632
|
+
}
|
|
20633
|
+
}
|
|
20634
|
+
};
|
|
20635
|
+
}
|
|
20657
20636
|
|
|
20658
|
-
const
|
|
20659
|
-
|
|
20660
|
-
|
|
20661
|
-
|
|
20662
|
-
|
|
20663
|
-
const _hoisted_6$2 = /* @__PURE__ */ createElementVNode("div", { class: "hzzt-collapse-line" }, null, -1);
|
|
20664
|
-
const _hoisted_7$2 = {
|
|
20665
|
-
key: 0,
|
|
20666
|
-
class: "hzzt-collapse-text"
|
|
20637
|
+
const defaultProps = {
|
|
20638
|
+
label: "label",
|
|
20639
|
+
value: "value",
|
|
20640
|
+
disabled: "disabled",
|
|
20641
|
+
options: "options"
|
|
20667
20642
|
};
|
|
20668
|
-
|
|
20669
|
-
|
|
20670
|
-
|
|
20671
|
-
const
|
|
20672
|
-
|
|
20673
|
-
|
|
20674
|
-
|
|
20675
|
-
|
|
20676
|
-
|
|
20677
|
-
|
|
20678
|
-
|
|
20679
|
-
|
|
20643
|
+
function useProps(props) {
|
|
20644
|
+
const aliasProps = computed(() => ({ ...defaultProps, ...props.props }));
|
|
20645
|
+
const getLabel = (option) => get(option, aliasProps.value.label);
|
|
20646
|
+
const getValue = (option) => get(option, aliasProps.value.value);
|
|
20647
|
+
const getDisabled = (option) => get(option, aliasProps.value.disabled);
|
|
20648
|
+
const getOptions = (option) => get(option, aliasProps.value.options);
|
|
20649
|
+
return {
|
|
20650
|
+
aliasProps,
|
|
20651
|
+
getLabel,
|
|
20652
|
+
getValue,
|
|
20653
|
+
getDisabled,
|
|
20654
|
+
getOptions
|
|
20655
|
+
};
|
|
20656
|
+
}
|
|
20657
|
+
|
|
20658
|
+
const SelectProps = buildProps({
|
|
20659
|
+
allowCreate: Boolean,
|
|
20660
|
+
autocomplete: {
|
|
20661
|
+
type: definePropType(String),
|
|
20662
|
+
default: "none"
|
|
20663
|
+
},
|
|
20664
|
+
automaticDropdown: Boolean,
|
|
20665
|
+
clearable: Boolean,
|
|
20666
|
+
clearIcon: {
|
|
20667
|
+
type: iconPropType,
|
|
20668
|
+
default: circle_close_default
|
|
20669
|
+
},
|
|
20670
|
+
effect: {
|
|
20671
|
+
type: definePropType(String),
|
|
20672
|
+
default: "light"
|
|
20673
|
+
},
|
|
20674
|
+
collapseTags: Boolean,
|
|
20675
|
+
collapseTagsTooltip: Boolean,
|
|
20676
|
+
maxCollapseTags: {
|
|
20677
|
+
type: Number,
|
|
20678
|
+
default: 1
|
|
20679
|
+
},
|
|
20680
|
+
defaultFirstOption: Boolean,
|
|
20681
|
+
disabled: Boolean,
|
|
20682
|
+
estimatedOptionHeight: {
|
|
20683
|
+
type: Number,
|
|
20684
|
+
default: void 0
|
|
20685
|
+
},
|
|
20686
|
+
filterable: Boolean,
|
|
20687
|
+
filterMethod: Function,
|
|
20688
|
+
height: {
|
|
20689
|
+
type: Number,
|
|
20690
|
+
default: 274
|
|
20691
|
+
},
|
|
20692
|
+
itemHeight: {
|
|
20693
|
+
type: Number,
|
|
20694
|
+
default: 34
|
|
20695
|
+
},
|
|
20696
|
+
id: String,
|
|
20697
|
+
loading: Boolean,
|
|
20698
|
+
loadingText: String,
|
|
20699
|
+
modelValue: {
|
|
20700
|
+
type: definePropType([Array, String, Number, Boolean, Object])
|
|
20701
|
+
},
|
|
20702
|
+
multiple: Boolean,
|
|
20703
|
+
multipleLimit: {
|
|
20704
|
+
type: Number,
|
|
20705
|
+
default: 0
|
|
20706
|
+
},
|
|
20707
|
+
name: String,
|
|
20708
|
+
noDataText: String,
|
|
20709
|
+
noMatchText: String,
|
|
20710
|
+
remoteMethod: Function,
|
|
20711
|
+
reserveKeyword: {
|
|
20712
|
+
type: Boolean,
|
|
20713
|
+
default: true
|
|
20714
|
+
},
|
|
20715
|
+
options: {
|
|
20716
|
+
type: definePropType(Array),
|
|
20717
|
+
required: true
|
|
20718
|
+
},
|
|
20719
|
+
placeholder: {
|
|
20720
|
+
type: String
|
|
20721
|
+
},
|
|
20722
|
+
teleported: useTooltipContentProps.teleported,
|
|
20723
|
+
persistent: {
|
|
20724
|
+
type: Boolean,
|
|
20725
|
+
default: true
|
|
20726
|
+
},
|
|
20727
|
+
popperClass: {
|
|
20728
|
+
type: String,
|
|
20729
|
+
default: ""
|
|
20730
|
+
},
|
|
20731
|
+
popperOptions: {
|
|
20732
|
+
type: definePropType(Object),
|
|
20733
|
+
default: () => ({})
|
|
20734
|
+
},
|
|
20735
|
+
remote: Boolean,
|
|
20736
|
+
size: useSizeProp,
|
|
20737
|
+
props: {
|
|
20738
|
+
type: definePropType(Object),
|
|
20739
|
+
default: () => defaultProps
|
|
20740
|
+
},
|
|
20741
|
+
valueKey: {
|
|
20742
|
+
type: String,
|
|
20743
|
+
default: "value"
|
|
20744
|
+
},
|
|
20745
|
+
scrollbarAlwaysOn: Boolean,
|
|
20746
|
+
validateEvent: {
|
|
20747
|
+
type: Boolean,
|
|
20748
|
+
default: true
|
|
20749
|
+
},
|
|
20750
|
+
offset: {
|
|
20751
|
+
type: Number,
|
|
20752
|
+
default: 12
|
|
20753
|
+
},
|
|
20754
|
+
showArrow: {
|
|
20755
|
+
type: Boolean,
|
|
20756
|
+
default: true
|
|
20757
|
+
},
|
|
20758
|
+
placement: {
|
|
20759
|
+
type: definePropType(String),
|
|
20760
|
+
values: Ee,
|
|
20761
|
+
default: "bottom-start"
|
|
20762
|
+
},
|
|
20763
|
+
fallbackPlacements: {
|
|
20764
|
+
type: definePropType(Array),
|
|
20765
|
+
default: ["bottom-start", "top-start", "right", "left"]
|
|
20766
|
+
},
|
|
20767
|
+
tagType: { ...tagProps.type, default: "info" },
|
|
20768
|
+
tagEffect: { ...tagProps.effect, default: "light" },
|
|
20769
|
+
tabindex: {
|
|
20770
|
+
type: [String, Number],
|
|
20771
|
+
default: 0
|
|
20772
|
+
},
|
|
20773
|
+
appendTo: String,
|
|
20774
|
+
fitInputWidth: {
|
|
20775
|
+
type: [Boolean, Number],
|
|
20776
|
+
default: true,
|
|
20777
|
+
validator(val) {
|
|
20778
|
+
return isBoolean(val) || isNumber(val);
|
|
20779
|
+
}
|
|
20780
|
+
},
|
|
20781
|
+
...useEmptyValuesProps,
|
|
20782
|
+
...useAriaProps(["ariaLabel"])
|
|
20783
|
+
});
|
|
20784
|
+
const OptionProps = buildProps({
|
|
20785
|
+
data: Array,
|
|
20786
|
+
disabled: Boolean,
|
|
20787
|
+
hovering: Boolean,
|
|
20788
|
+
item: {
|
|
20789
|
+
type: definePropType(Object),
|
|
20790
|
+
required: true
|
|
20791
|
+
},
|
|
20792
|
+
index: Number,
|
|
20793
|
+
style: Object,
|
|
20794
|
+
selected: Boolean,
|
|
20795
|
+
created: Boolean
|
|
20796
|
+
});
|
|
20797
|
+
const selectEmits = {
|
|
20798
|
+
[UPDATE_MODEL_EVENT]: (val) => true,
|
|
20799
|
+
[CHANGE_EVENT]: (val) => true,
|
|
20800
|
+
"remove-tag": (val) => true,
|
|
20801
|
+
"visible-change": (visible) => true,
|
|
20802
|
+
focus: (evt) => evt instanceof FocusEvent,
|
|
20803
|
+
blur: (evt) => evt instanceof FocusEvent,
|
|
20804
|
+
clear: () => true
|
|
20805
|
+
};
|
|
20806
|
+
const optionEmits = {
|
|
20807
|
+
hover: (index) => isNumber(index),
|
|
20808
|
+
select: (val, index) => true
|
|
20809
|
+
};
|
|
20810
|
+
|
|
20811
|
+
const selectV2InjectionKey = Symbol("ElSelectV2Injection");
|
|
20812
|
+
|
|
20813
|
+
const _sfc_main$e = defineComponent({
|
|
20814
|
+
props: OptionProps,
|
|
20815
|
+
emits: optionEmits,
|
|
20816
|
+
setup(props, { emit }) {
|
|
20817
|
+
const select = inject(selectV2InjectionKey);
|
|
20818
|
+
const ns = useNamespace("select");
|
|
20819
|
+
const { hoverItem, selectOptionClick } = useOption(props, { emit });
|
|
20820
|
+
const { getLabel } = useProps(select.props);
|
|
20821
|
+
return {
|
|
20822
|
+
ns,
|
|
20823
|
+
hoverItem,
|
|
20824
|
+
selectOptionClick,
|
|
20825
|
+
getLabel
|
|
20826
|
+
};
|
|
20827
|
+
}
|
|
20828
|
+
});
|
|
20829
|
+
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
20830
|
+
return openBlock(), createElementBlock("li", {
|
|
20831
|
+
"aria-selected": _ctx.selected,
|
|
20832
|
+
style: normalizeStyle(_ctx.style),
|
|
20833
|
+
class: normalizeClass([
|
|
20834
|
+
_ctx.ns.be("dropdown", "item"),
|
|
20835
|
+
_ctx.ns.is("selected", _ctx.selected),
|
|
20836
|
+
_ctx.ns.is("disabled", _ctx.disabled),
|
|
20837
|
+
_ctx.ns.is("created", _ctx.created),
|
|
20838
|
+
_ctx.ns.is("hovering", _ctx.hovering)
|
|
20839
|
+
]),
|
|
20840
|
+
onMousemove: _ctx.hoverItem,
|
|
20841
|
+
onClick: withModifiers(_ctx.selectOptionClick, ["stop"])
|
|
20842
|
+
}, [
|
|
20843
|
+
renderSlot(_ctx.$slots, "default", {
|
|
20844
|
+
item: _ctx.item,
|
|
20845
|
+
index: _ctx.index,
|
|
20846
|
+
disabled: _ctx.disabled
|
|
20847
|
+
}, () => [
|
|
20848
|
+
createElementVNode("span", null, toDisplayString(_ctx.getLabel(_ctx.item)), 1)
|
|
20849
|
+
])
|
|
20850
|
+
], 46, ["aria-selected", "onMousemove", "onClick"]);
|
|
20851
|
+
}
|
|
20852
|
+
var OptionItem = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$1], ["__file", "option-item.vue"]]);
|
|
20853
|
+
|
|
20854
|
+
var safeIsNaN = Number.isNaN || function ponyfill(value) {
|
|
20855
|
+
return typeof value === "number" && value !== value;
|
|
20856
|
+
};
|
|
20857
|
+
function isEqual(first, second) {
|
|
20858
|
+
if (first === second) {
|
|
20859
|
+
return true;
|
|
20860
|
+
}
|
|
20861
|
+
if (safeIsNaN(first) && safeIsNaN(second)) {
|
|
20862
|
+
return true;
|
|
20863
|
+
}
|
|
20864
|
+
return false;
|
|
20865
|
+
}
|
|
20866
|
+
function areInputsEqual(newInputs, lastInputs) {
|
|
20867
|
+
if (newInputs.length !== lastInputs.length) {
|
|
20868
|
+
return false;
|
|
20869
|
+
}
|
|
20870
|
+
for (var i = 0; i < newInputs.length; i++) {
|
|
20871
|
+
if (!isEqual(newInputs[i], lastInputs[i])) {
|
|
20872
|
+
return false;
|
|
20873
|
+
}
|
|
20874
|
+
}
|
|
20875
|
+
return true;
|
|
20876
|
+
}
|
|
20877
|
+
function memoizeOne(resultFn, isEqual2) {
|
|
20878
|
+
if (isEqual2 === void 0) {
|
|
20879
|
+
isEqual2 = areInputsEqual;
|
|
20880
|
+
}
|
|
20881
|
+
var cache = null;
|
|
20882
|
+
function memoized() {
|
|
20883
|
+
var newArgs = [];
|
|
20884
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
20885
|
+
newArgs[_i] = arguments[_i];
|
|
20886
|
+
}
|
|
20887
|
+
if (cache && cache.lastThis === this && isEqual2(newArgs, cache.lastArgs)) {
|
|
20888
|
+
return cache.lastResult;
|
|
20889
|
+
}
|
|
20890
|
+
var lastResult = resultFn.apply(this, newArgs);
|
|
20891
|
+
cache = {
|
|
20892
|
+
lastResult,
|
|
20893
|
+
lastArgs: newArgs,
|
|
20894
|
+
lastThis: this
|
|
20895
|
+
};
|
|
20896
|
+
return lastResult;
|
|
20897
|
+
}
|
|
20898
|
+
memoized.clear = function clear() {
|
|
20899
|
+
cache = null;
|
|
20900
|
+
};
|
|
20901
|
+
return memoized;
|
|
20902
|
+
}
|
|
20903
|
+
|
|
20904
|
+
const useCache = () => {
|
|
20905
|
+
const vm = getCurrentInstance();
|
|
20906
|
+
const props = vm.proxy.$props;
|
|
20907
|
+
return computed(() => {
|
|
20908
|
+
const _getItemStyleCache = (_, __, ___) => ({});
|
|
20909
|
+
return props.perfMode ? memoize(_getItemStyleCache) : memoizeOne(_getItemStyleCache);
|
|
20910
|
+
});
|
|
20911
|
+
};
|
|
20912
|
+
|
|
20913
|
+
const DEFAULT_DYNAMIC_LIST_ITEM_SIZE = 50;
|
|
20914
|
+
const ITEM_RENDER_EVT = "itemRendered";
|
|
20915
|
+
const SCROLL_EVT = "scroll";
|
|
20916
|
+
const FORWARD = "forward";
|
|
20917
|
+
const BACKWARD = "backward";
|
|
20918
|
+
const AUTO_ALIGNMENT = "auto";
|
|
20919
|
+
const SMART_ALIGNMENT = "smart";
|
|
20920
|
+
const START_ALIGNMENT = "start";
|
|
20921
|
+
const CENTERED_ALIGNMENT = "center";
|
|
20922
|
+
const END_ALIGNMENT = "end";
|
|
20923
|
+
const HORIZONTAL = "horizontal";
|
|
20924
|
+
const VERTICAL = "vertical";
|
|
20925
|
+
const LTR = "ltr";
|
|
20926
|
+
const RTL = "rtl";
|
|
20927
|
+
const RTL_OFFSET_NAG = "negative";
|
|
20928
|
+
const RTL_OFFSET_POS_ASC = "positive-ascending";
|
|
20929
|
+
const RTL_OFFSET_POS_DESC = "positive-descending";
|
|
20930
|
+
const ScrollbarDirKey = {
|
|
20931
|
+
[HORIZONTAL]: "left",
|
|
20932
|
+
[VERTICAL]: "top"
|
|
20933
|
+
};
|
|
20934
|
+
const SCROLLBAR_MIN_SIZE = 20;
|
|
20935
|
+
|
|
20936
|
+
const LayoutKeys = {
|
|
20937
|
+
[HORIZONTAL]: "deltaX",
|
|
20938
|
+
[VERTICAL]: "deltaY"
|
|
20939
|
+
};
|
|
20940
|
+
const useWheel = ({ atEndEdge, atStartEdge, layout }, onWheelDelta) => {
|
|
20941
|
+
let frameHandle;
|
|
20942
|
+
let offset = 0;
|
|
20943
|
+
const hasReachedEdge = (offset2) => {
|
|
20944
|
+
const edgeReached = offset2 < 0 && atStartEdge.value || offset2 > 0 && atEndEdge.value;
|
|
20945
|
+
return edgeReached;
|
|
20946
|
+
};
|
|
20947
|
+
const onWheel = (e) => {
|
|
20948
|
+
cAF(frameHandle);
|
|
20949
|
+
const newOffset = e[LayoutKeys[layout.value]];
|
|
20950
|
+
if (hasReachedEdge(offset) && hasReachedEdge(offset + newOffset))
|
|
20951
|
+
return;
|
|
20952
|
+
offset += newOffset;
|
|
20953
|
+
if (!isFirefox()) {
|
|
20954
|
+
e.preventDefault();
|
|
20955
|
+
}
|
|
20956
|
+
frameHandle = rAF(() => {
|
|
20957
|
+
onWheelDelta(offset);
|
|
20958
|
+
offset = 0;
|
|
20959
|
+
});
|
|
20960
|
+
};
|
|
20961
|
+
return {
|
|
20962
|
+
hasReachedEdge,
|
|
20963
|
+
onWheel
|
|
20964
|
+
};
|
|
20965
|
+
};
|
|
20966
|
+
|
|
20967
|
+
const itemSize = buildProp({
|
|
20968
|
+
type: definePropType([Number, Function]),
|
|
20969
|
+
required: true
|
|
20970
|
+
});
|
|
20971
|
+
const estimatedItemSize = buildProp({
|
|
20972
|
+
type: Number
|
|
20973
|
+
});
|
|
20974
|
+
const cache = buildProp({
|
|
20975
|
+
type: Number,
|
|
20976
|
+
default: 2
|
|
20977
|
+
});
|
|
20978
|
+
const direction = buildProp({
|
|
20979
|
+
type: String,
|
|
20980
|
+
values: ["ltr", "rtl"],
|
|
20981
|
+
default: "ltr"
|
|
20982
|
+
});
|
|
20983
|
+
const initScrollOffset = buildProp({
|
|
20984
|
+
type: Number,
|
|
20985
|
+
default: 0
|
|
20986
|
+
});
|
|
20987
|
+
const total = buildProp({
|
|
20988
|
+
type: Number,
|
|
20989
|
+
required: true
|
|
20990
|
+
});
|
|
20991
|
+
const layout = buildProp({
|
|
20992
|
+
type: String,
|
|
20993
|
+
values: ["horizontal", "vertical"],
|
|
20994
|
+
default: VERTICAL
|
|
20995
|
+
});
|
|
20996
|
+
const virtualizedProps = buildProps({
|
|
20997
|
+
className: {
|
|
20998
|
+
type: String,
|
|
20999
|
+
default: ""
|
|
21000
|
+
},
|
|
21001
|
+
containerElement: {
|
|
21002
|
+
type: definePropType([String, Object]),
|
|
21003
|
+
default: "div"
|
|
21004
|
+
},
|
|
21005
|
+
data: {
|
|
21006
|
+
type: definePropType(Array),
|
|
21007
|
+
default: () => mutable([])
|
|
21008
|
+
},
|
|
21009
|
+
direction,
|
|
21010
|
+
height: {
|
|
21011
|
+
type: [String, Number],
|
|
21012
|
+
required: true
|
|
21013
|
+
},
|
|
21014
|
+
innerElement: {
|
|
21015
|
+
type: [String, Object],
|
|
21016
|
+
default: "div"
|
|
21017
|
+
},
|
|
21018
|
+
style: {
|
|
21019
|
+
type: definePropType([Object, String, Array])
|
|
21020
|
+
},
|
|
21021
|
+
useIsScrolling: {
|
|
21022
|
+
type: Boolean,
|
|
21023
|
+
default: false
|
|
21024
|
+
},
|
|
21025
|
+
width: {
|
|
21026
|
+
type: [Number, String],
|
|
21027
|
+
required: false
|
|
21028
|
+
},
|
|
21029
|
+
perfMode: {
|
|
21030
|
+
type: Boolean,
|
|
21031
|
+
default: true
|
|
21032
|
+
},
|
|
21033
|
+
scrollbarAlwaysOn: {
|
|
21034
|
+
type: Boolean,
|
|
21035
|
+
default: false
|
|
21036
|
+
}
|
|
21037
|
+
});
|
|
21038
|
+
const virtualizedListProps = buildProps({
|
|
21039
|
+
cache,
|
|
21040
|
+
estimatedItemSize,
|
|
21041
|
+
layout,
|
|
21042
|
+
initScrollOffset,
|
|
21043
|
+
total,
|
|
21044
|
+
itemSize,
|
|
21045
|
+
...virtualizedProps
|
|
21046
|
+
});
|
|
21047
|
+
const scrollbarSize = {
|
|
21048
|
+
type: Number,
|
|
21049
|
+
default: 6
|
|
21050
|
+
};
|
|
21051
|
+
const startGap = { type: Number, default: 0 };
|
|
21052
|
+
const endGap = { type: Number, default: 2 };
|
|
21053
|
+
buildProps({
|
|
21054
|
+
columnCache: cache,
|
|
21055
|
+
columnWidth: itemSize,
|
|
21056
|
+
estimatedColumnWidth: estimatedItemSize,
|
|
21057
|
+
estimatedRowHeight: estimatedItemSize,
|
|
21058
|
+
initScrollLeft: initScrollOffset,
|
|
21059
|
+
initScrollTop: initScrollOffset,
|
|
21060
|
+
itemKey: {
|
|
21061
|
+
type: definePropType(Function),
|
|
21062
|
+
default: ({
|
|
21063
|
+
columnIndex,
|
|
21064
|
+
rowIndex
|
|
21065
|
+
}) => `${rowIndex}:${columnIndex}`
|
|
21066
|
+
},
|
|
21067
|
+
rowCache: cache,
|
|
21068
|
+
rowHeight: itemSize,
|
|
21069
|
+
totalColumn: total,
|
|
21070
|
+
totalRow: total,
|
|
21071
|
+
hScrollbarSize: scrollbarSize,
|
|
21072
|
+
vScrollbarSize: scrollbarSize,
|
|
21073
|
+
scrollbarStartGap: startGap,
|
|
21074
|
+
scrollbarEndGap: endGap,
|
|
21075
|
+
role: String,
|
|
21076
|
+
...virtualizedProps
|
|
21077
|
+
});
|
|
21078
|
+
const virtualizedScrollbarProps = buildProps({
|
|
21079
|
+
alwaysOn: Boolean,
|
|
21080
|
+
class: String,
|
|
21081
|
+
layout,
|
|
21082
|
+
total,
|
|
21083
|
+
ratio: {
|
|
21084
|
+
type: Number,
|
|
21085
|
+
required: true
|
|
21086
|
+
},
|
|
21087
|
+
clientSize: {
|
|
21088
|
+
type: Number,
|
|
21089
|
+
required: true
|
|
21090
|
+
},
|
|
21091
|
+
scrollFrom: {
|
|
21092
|
+
type: Number,
|
|
21093
|
+
required: true
|
|
21094
|
+
},
|
|
21095
|
+
scrollbarSize,
|
|
21096
|
+
startGap,
|
|
21097
|
+
endGap,
|
|
21098
|
+
visible: Boolean
|
|
21099
|
+
});
|
|
21100
|
+
|
|
21101
|
+
const getScrollDir = (prev, cur) => prev < cur ? FORWARD : BACKWARD;
|
|
21102
|
+
const isHorizontal = (dir) => dir === LTR || dir === RTL || dir === HORIZONTAL;
|
|
21103
|
+
let cachedRTLResult = null;
|
|
21104
|
+
function getRTLOffsetType(recalculate = false) {
|
|
21105
|
+
if (cachedRTLResult === null || recalculate) {
|
|
21106
|
+
const outerDiv = document.createElement("div");
|
|
21107
|
+
const outerStyle = outerDiv.style;
|
|
21108
|
+
outerStyle.width = "50px";
|
|
21109
|
+
outerStyle.height = "50px";
|
|
21110
|
+
outerStyle.overflow = "scroll";
|
|
21111
|
+
outerStyle.direction = "rtl";
|
|
21112
|
+
const innerDiv = document.createElement("div");
|
|
21113
|
+
const innerStyle = innerDiv.style;
|
|
21114
|
+
innerStyle.width = "100px";
|
|
21115
|
+
innerStyle.height = "100px";
|
|
21116
|
+
outerDiv.appendChild(innerDiv);
|
|
21117
|
+
document.body.appendChild(outerDiv);
|
|
21118
|
+
if (outerDiv.scrollLeft > 0) {
|
|
21119
|
+
cachedRTLResult = RTL_OFFSET_POS_DESC;
|
|
21120
|
+
} else {
|
|
21121
|
+
outerDiv.scrollLeft = 1;
|
|
21122
|
+
if (outerDiv.scrollLeft === 0) {
|
|
21123
|
+
cachedRTLResult = RTL_OFFSET_NAG;
|
|
21124
|
+
} else {
|
|
21125
|
+
cachedRTLResult = RTL_OFFSET_POS_ASC;
|
|
21126
|
+
}
|
|
21127
|
+
}
|
|
21128
|
+
document.body.removeChild(outerDiv);
|
|
21129
|
+
return cachedRTLResult;
|
|
21130
|
+
}
|
|
21131
|
+
return cachedRTLResult;
|
|
21132
|
+
}
|
|
21133
|
+
function renderThumbStyle({ move, size, bar }, layout) {
|
|
21134
|
+
const style = {};
|
|
21135
|
+
const translate = `translate${bar.axis}(${move}px)`;
|
|
21136
|
+
style[bar.size] = size;
|
|
21137
|
+
style.transform = translate;
|
|
21138
|
+
style.msTransform = translate;
|
|
21139
|
+
style.webkitTransform = translate;
|
|
21140
|
+
if (layout === "horizontal") {
|
|
21141
|
+
style.height = "100%";
|
|
21142
|
+
} else {
|
|
21143
|
+
style.width = "100%";
|
|
21144
|
+
}
|
|
21145
|
+
return style;
|
|
21146
|
+
}
|
|
21147
|
+
|
|
21148
|
+
const ScrollBar = defineComponent({
|
|
21149
|
+
name: "ElVirtualScrollBar",
|
|
21150
|
+
props: virtualizedScrollbarProps,
|
|
21151
|
+
emits: ["scroll", "start-move", "stop-move"],
|
|
21152
|
+
setup(props, { emit }) {
|
|
21153
|
+
const GAP = computed(() => props.startGap + props.endGap);
|
|
21154
|
+
const nsVirtualScrollbar = useNamespace("virtual-scrollbar");
|
|
21155
|
+
const nsScrollbar = useNamespace("scrollbar");
|
|
21156
|
+
const trackRef = ref();
|
|
21157
|
+
const thumbRef = ref();
|
|
21158
|
+
let frameHandle = null;
|
|
21159
|
+
let onselectstartStore = null;
|
|
21160
|
+
const state = reactive({
|
|
21161
|
+
isDragging: false,
|
|
21162
|
+
traveled: 0
|
|
21163
|
+
});
|
|
21164
|
+
const bar = computed(() => BAR_MAP[props.layout]);
|
|
21165
|
+
const trackSize = computed(() => props.clientSize - unref(GAP));
|
|
21166
|
+
const trackStyle = computed(() => ({
|
|
21167
|
+
position: "absolute",
|
|
21168
|
+
width: `${HORIZONTAL === props.layout ? trackSize.value : props.scrollbarSize}px`,
|
|
21169
|
+
height: `${HORIZONTAL === props.layout ? props.scrollbarSize : trackSize.value}px`,
|
|
21170
|
+
[ScrollbarDirKey[props.layout]]: "2px",
|
|
21171
|
+
right: "2px",
|
|
21172
|
+
bottom: "2px",
|
|
21173
|
+
borderRadius: "4px"
|
|
21174
|
+
}));
|
|
21175
|
+
const thumbSize = computed(() => {
|
|
21176
|
+
const ratio = props.ratio;
|
|
21177
|
+
const clientSize = props.clientSize;
|
|
21178
|
+
if (ratio >= 100) {
|
|
21179
|
+
return Number.POSITIVE_INFINITY;
|
|
21180
|
+
}
|
|
21181
|
+
if (ratio >= 50) {
|
|
21182
|
+
return ratio * clientSize / 100;
|
|
21183
|
+
}
|
|
21184
|
+
const SCROLLBAR_MAX_SIZE = clientSize / 3;
|
|
21185
|
+
return Math.floor(Math.min(Math.max(ratio * clientSize, SCROLLBAR_MIN_SIZE), SCROLLBAR_MAX_SIZE));
|
|
21186
|
+
});
|
|
21187
|
+
const thumbStyle = computed(() => {
|
|
21188
|
+
if (!Number.isFinite(thumbSize.value)) {
|
|
21189
|
+
return {
|
|
21190
|
+
display: "none"
|
|
21191
|
+
};
|
|
21192
|
+
}
|
|
21193
|
+
const thumb = `${thumbSize.value}px`;
|
|
21194
|
+
const style = renderThumbStyle({
|
|
21195
|
+
bar: bar.value,
|
|
21196
|
+
size: thumb,
|
|
21197
|
+
move: state.traveled
|
|
21198
|
+
}, props.layout);
|
|
21199
|
+
return style;
|
|
21200
|
+
});
|
|
21201
|
+
const totalSteps = computed(() => Math.floor(props.clientSize - thumbSize.value - unref(GAP)));
|
|
21202
|
+
const attachEvents = () => {
|
|
21203
|
+
window.addEventListener("mousemove", onMouseMove);
|
|
21204
|
+
window.addEventListener("mouseup", onMouseUp);
|
|
21205
|
+
const thumbEl = unref(thumbRef);
|
|
21206
|
+
if (!thumbEl)
|
|
21207
|
+
return;
|
|
21208
|
+
onselectstartStore = document.onselectstart;
|
|
21209
|
+
document.onselectstart = () => false;
|
|
21210
|
+
thumbEl.addEventListener("touchmove", onMouseMove, { passive: true });
|
|
21211
|
+
thumbEl.addEventListener("touchend", onMouseUp);
|
|
21212
|
+
};
|
|
21213
|
+
const detachEvents = () => {
|
|
21214
|
+
window.removeEventListener("mousemove", onMouseMove);
|
|
21215
|
+
window.removeEventListener("mouseup", onMouseUp);
|
|
21216
|
+
document.onselectstart = onselectstartStore;
|
|
21217
|
+
onselectstartStore = null;
|
|
21218
|
+
const thumbEl = unref(thumbRef);
|
|
21219
|
+
if (!thumbEl)
|
|
21220
|
+
return;
|
|
21221
|
+
thumbEl.removeEventListener("touchmove", onMouseMove);
|
|
21222
|
+
thumbEl.removeEventListener("touchend", onMouseUp);
|
|
21223
|
+
};
|
|
21224
|
+
const onThumbMouseDown = (e) => {
|
|
21225
|
+
e.stopImmediatePropagation();
|
|
21226
|
+
if (e.ctrlKey || [1, 2].includes(e.button)) {
|
|
21227
|
+
return;
|
|
21228
|
+
}
|
|
21229
|
+
state.isDragging = true;
|
|
21230
|
+
state[bar.value.axis] = e.currentTarget[bar.value.offset] - (e[bar.value.client] - e.currentTarget.getBoundingClientRect()[bar.value.direction]);
|
|
21231
|
+
emit("start-move");
|
|
21232
|
+
attachEvents();
|
|
21233
|
+
};
|
|
21234
|
+
const onMouseUp = () => {
|
|
21235
|
+
state.isDragging = false;
|
|
21236
|
+
state[bar.value.axis] = 0;
|
|
21237
|
+
emit("stop-move");
|
|
21238
|
+
detachEvents();
|
|
21239
|
+
};
|
|
21240
|
+
const onMouseMove = (e) => {
|
|
21241
|
+
const { isDragging } = state;
|
|
21242
|
+
if (!isDragging)
|
|
21243
|
+
return;
|
|
21244
|
+
if (!thumbRef.value || !trackRef.value)
|
|
21245
|
+
return;
|
|
21246
|
+
const prevPage = state[bar.value.axis];
|
|
21247
|
+
if (!prevPage)
|
|
21248
|
+
return;
|
|
21249
|
+
cAF(frameHandle);
|
|
21250
|
+
const offset = (trackRef.value.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) * -1;
|
|
21251
|
+
const thumbClickPosition = thumbRef.value[bar.value.offset] - prevPage;
|
|
21252
|
+
const distance = offset - thumbClickPosition;
|
|
21253
|
+
frameHandle = rAF(() => {
|
|
21254
|
+
state.traveled = Math.max(props.startGap, Math.min(distance, totalSteps.value));
|
|
21255
|
+
emit("scroll", distance, totalSteps.value);
|
|
21256
|
+
});
|
|
21257
|
+
};
|
|
21258
|
+
const clickTrackHandler = (e) => {
|
|
21259
|
+
const offset = Math.abs(e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]);
|
|
21260
|
+
const thumbHalf = thumbRef.value[bar.value.offset] / 2;
|
|
21261
|
+
const distance = offset - thumbHalf;
|
|
21262
|
+
state.traveled = Math.max(0, Math.min(distance, totalSteps.value));
|
|
21263
|
+
emit("scroll", distance, totalSteps.value);
|
|
21264
|
+
};
|
|
21265
|
+
watch(() => props.scrollFrom, (v) => {
|
|
21266
|
+
if (state.isDragging)
|
|
21267
|
+
return;
|
|
21268
|
+
state.traveled = Math.ceil(v * totalSteps.value);
|
|
21269
|
+
});
|
|
21270
|
+
onBeforeUnmount(() => {
|
|
21271
|
+
detachEvents();
|
|
21272
|
+
});
|
|
21273
|
+
return () => {
|
|
21274
|
+
return h("div", {
|
|
21275
|
+
role: "presentation",
|
|
21276
|
+
ref: trackRef,
|
|
21277
|
+
class: [
|
|
21278
|
+
nsVirtualScrollbar.b(),
|
|
21279
|
+
props.class,
|
|
21280
|
+
(props.alwaysOn || state.isDragging) && "always-on"
|
|
21281
|
+
],
|
|
21282
|
+
style: trackStyle.value,
|
|
21283
|
+
onMousedown: withModifiers(clickTrackHandler, ["stop", "prevent"]),
|
|
21284
|
+
onTouchstartPrevent: onThumbMouseDown
|
|
21285
|
+
}, h("div", {
|
|
21286
|
+
ref: thumbRef,
|
|
21287
|
+
class: nsScrollbar.e("thumb"),
|
|
21288
|
+
style: thumbStyle.value,
|
|
21289
|
+
onMousedown: onThumbMouseDown
|
|
21290
|
+
}, []));
|
|
21291
|
+
};
|
|
21292
|
+
}
|
|
21293
|
+
});
|
|
21294
|
+
|
|
21295
|
+
const createList = ({
|
|
21296
|
+
name,
|
|
21297
|
+
getOffset,
|
|
21298
|
+
getItemSize,
|
|
21299
|
+
getItemOffset,
|
|
21300
|
+
getEstimatedTotalSize,
|
|
21301
|
+
getStartIndexForOffset,
|
|
21302
|
+
getStopIndexForStartIndex,
|
|
21303
|
+
initCache,
|
|
21304
|
+
clearCache,
|
|
21305
|
+
validateProps
|
|
21306
|
+
}) => {
|
|
21307
|
+
return defineComponent({
|
|
21308
|
+
name: name != null ? name : "ElVirtualList",
|
|
21309
|
+
props: virtualizedListProps,
|
|
21310
|
+
emits: [ITEM_RENDER_EVT, SCROLL_EVT],
|
|
21311
|
+
setup(props, { emit, expose }) {
|
|
21312
|
+
validateProps(props);
|
|
21313
|
+
const instance = getCurrentInstance();
|
|
21314
|
+
const ns = useNamespace("vl");
|
|
21315
|
+
const dynamicSizeCache = ref(initCache(props, instance));
|
|
21316
|
+
const getItemStyleCache = useCache();
|
|
21317
|
+
const windowRef = ref();
|
|
21318
|
+
const innerRef = ref();
|
|
21319
|
+
const scrollbarRef = ref();
|
|
21320
|
+
const states = ref({
|
|
21321
|
+
isScrolling: false,
|
|
21322
|
+
scrollDir: "forward",
|
|
21323
|
+
scrollOffset: isNumber(props.initScrollOffset) ? props.initScrollOffset : 0,
|
|
21324
|
+
updateRequested: false,
|
|
21325
|
+
isScrollbarDragging: false,
|
|
21326
|
+
scrollbarAlwaysOn: props.scrollbarAlwaysOn
|
|
21327
|
+
});
|
|
21328
|
+
const itemsToRender = computed(() => {
|
|
21329
|
+
const { total, cache } = props;
|
|
21330
|
+
const { isScrolling, scrollDir, scrollOffset } = unref(states);
|
|
21331
|
+
if (total === 0) {
|
|
21332
|
+
return [0, 0, 0, 0];
|
|
21333
|
+
}
|
|
21334
|
+
const startIndex = getStartIndexForOffset(props, scrollOffset, unref(dynamicSizeCache));
|
|
21335
|
+
const stopIndex = getStopIndexForStartIndex(props, startIndex, scrollOffset, unref(dynamicSizeCache));
|
|
21336
|
+
const cacheBackward = !isScrolling || scrollDir === BACKWARD ? Math.max(1, cache) : 1;
|
|
21337
|
+
const cacheForward = !isScrolling || scrollDir === FORWARD ? Math.max(1, cache) : 1;
|
|
21338
|
+
return [
|
|
21339
|
+
Math.max(0, startIndex - cacheBackward),
|
|
21340
|
+
Math.max(0, Math.min(total - 1, stopIndex + cacheForward)),
|
|
21341
|
+
startIndex,
|
|
21342
|
+
stopIndex
|
|
21343
|
+
];
|
|
21344
|
+
});
|
|
21345
|
+
const estimatedTotalSize = computed(() => getEstimatedTotalSize(props, unref(dynamicSizeCache)));
|
|
21346
|
+
const _isHorizontal = computed(() => isHorizontal(props.layout));
|
|
21347
|
+
const windowStyle = computed(() => [
|
|
21348
|
+
{
|
|
21349
|
+
position: "relative",
|
|
21350
|
+
[`overflow-${_isHorizontal.value ? "x" : "y"}`]: "scroll",
|
|
21351
|
+
WebkitOverflowScrolling: "touch",
|
|
21352
|
+
willChange: "transform"
|
|
21353
|
+
},
|
|
21354
|
+
{
|
|
21355
|
+
direction: props.direction,
|
|
21356
|
+
height: isNumber(props.height) ? `${props.height}px` : props.height,
|
|
21357
|
+
width: isNumber(props.width) ? `${props.width}px` : props.width
|
|
21358
|
+
},
|
|
21359
|
+
props.style
|
|
21360
|
+
]);
|
|
21361
|
+
const innerStyle = computed(() => {
|
|
21362
|
+
const size = unref(estimatedTotalSize);
|
|
21363
|
+
const horizontal = unref(_isHorizontal);
|
|
21364
|
+
return {
|
|
21365
|
+
height: horizontal ? "100%" : `${size}px`,
|
|
21366
|
+
pointerEvents: unref(states).isScrolling ? "none" : void 0,
|
|
21367
|
+
width: horizontal ? `${size}px` : "100%"
|
|
21368
|
+
};
|
|
21369
|
+
});
|
|
21370
|
+
const clientSize = computed(() => _isHorizontal.value ? props.width : props.height);
|
|
21371
|
+
const { onWheel } = useWheel({
|
|
21372
|
+
atStartEdge: computed(() => states.value.scrollOffset <= 0),
|
|
21373
|
+
atEndEdge: computed(() => states.value.scrollOffset >= estimatedTotalSize.value),
|
|
21374
|
+
layout: computed(() => props.layout)
|
|
21375
|
+
}, (offset) => {
|
|
21376
|
+
var _a, _b;
|
|
21377
|
+
(_b = (_a = scrollbarRef.value).onMouseUp) == null ? void 0 : _b.call(_a);
|
|
21378
|
+
scrollTo(Math.min(states.value.scrollOffset + offset, estimatedTotalSize.value - clientSize.value));
|
|
21379
|
+
});
|
|
21380
|
+
useEventListener(windowRef, "wheel", onWheel, {
|
|
21381
|
+
passive: false
|
|
21382
|
+
});
|
|
21383
|
+
const emitEvents = () => {
|
|
21384
|
+
const { total } = props;
|
|
21385
|
+
if (total > 0) {
|
|
21386
|
+
const [cacheStart, cacheEnd, visibleStart, visibleEnd] = unref(itemsToRender);
|
|
21387
|
+
emit(ITEM_RENDER_EVT, cacheStart, cacheEnd, visibleStart, visibleEnd);
|
|
21388
|
+
}
|
|
21389
|
+
const { scrollDir, scrollOffset, updateRequested } = unref(states);
|
|
21390
|
+
emit(SCROLL_EVT, scrollDir, scrollOffset, updateRequested);
|
|
21391
|
+
};
|
|
21392
|
+
const scrollVertically = (e) => {
|
|
21393
|
+
const { clientHeight, scrollHeight, scrollTop } = e.currentTarget;
|
|
21394
|
+
const _states = unref(states);
|
|
21395
|
+
if (_states.scrollOffset === scrollTop) {
|
|
21396
|
+
return;
|
|
21397
|
+
}
|
|
21398
|
+
const scrollOffset = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));
|
|
21399
|
+
states.value = {
|
|
21400
|
+
..._states,
|
|
21401
|
+
isScrolling: true,
|
|
21402
|
+
scrollDir: getScrollDir(_states.scrollOffset, scrollOffset),
|
|
21403
|
+
scrollOffset,
|
|
21404
|
+
updateRequested: false
|
|
21405
|
+
};
|
|
21406
|
+
nextTick(resetIsScrolling);
|
|
21407
|
+
};
|
|
21408
|
+
const scrollHorizontally = (e) => {
|
|
21409
|
+
const { clientWidth, scrollLeft, scrollWidth } = e.currentTarget;
|
|
21410
|
+
const _states = unref(states);
|
|
21411
|
+
if (_states.scrollOffset === scrollLeft) {
|
|
21412
|
+
return;
|
|
21413
|
+
}
|
|
21414
|
+
const { direction } = props;
|
|
21415
|
+
let scrollOffset = scrollLeft;
|
|
21416
|
+
if (direction === RTL) {
|
|
21417
|
+
switch (getRTLOffsetType()) {
|
|
21418
|
+
case RTL_OFFSET_NAG: {
|
|
21419
|
+
scrollOffset = -scrollLeft;
|
|
21420
|
+
break;
|
|
21421
|
+
}
|
|
21422
|
+
case RTL_OFFSET_POS_DESC: {
|
|
21423
|
+
scrollOffset = scrollWidth - clientWidth - scrollLeft;
|
|
21424
|
+
break;
|
|
21425
|
+
}
|
|
21426
|
+
}
|
|
21427
|
+
}
|
|
21428
|
+
scrollOffset = Math.max(0, Math.min(scrollOffset, scrollWidth - clientWidth));
|
|
21429
|
+
states.value = {
|
|
21430
|
+
..._states,
|
|
21431
|
+
isScrolling: true,
|
|
21432
|
+
scrollDir: getScrollDir(_states.scrollOffset, scrollOffset),
|
|
21433
|
+
scrollOffset,
|
|
21434
|
+
updateRequested: false
|
|
21435
|
+
};
|
|
21436
|
+
nextTick(resetIsScrolling);
|
|
21437
|
+
};
|
|
21438
|
+
const onScroll = (e) => {
|
|
21439
|
+
unref(_isHorizontal) ? scrollHorizontally(e) : scrollVertically(e);
|
|
21440
|
+
emitEvents();
|
|
21441
|
+
};
|
|
21442
|
+
const onScrollbarScroll = (distanceToGo, totalSteps) => {
|
|
21443
|
+
const offset = (estimatedTotalSize.value - clientSize.value) / totalSteps * distanceToGo;
|
|
21444
|
+
scrollTo(Math.min(estimatedTotalSize.value - clientSize.value, offset));
|
|
21445
|
+
};
|
|
21446
|
+
const scrollTo = (offset) => {
|
|
21447
|
+
offset = Math.max(offset, 0);
|
|
21448
|
+
if (offset === unref(states).scrollOffset) {
|
|
21449
|
+
return;
|
|
21450
|
+
}
|
|
21451
|
+
states.value = {
|
|
21452
|
+
...unref(states),
|
|
21453
|
+
scrollOffset: offset,
|
|
21454
|
+
scrollDir: getScrollDir(unref(states).scrollOffset, offset),
|
|
21455
|
+
updateRequested: true
|
|
21456
|
+
};
|
|
21457
|
+
nextTick(resetIsScrolling);
|
|
21458
|
+
};
|
|
21459
|
+
const scrollToItem = (idx, alignment = AUTO_ALIGNMENT) => {
|
|
21460
|
+
const { scrollOffset } = unref(states);
|
|
21461
|
+
idx = Math.max(0, Math.min(idx, props.total - 1));
|
|
21462
|
+
scrollTo(getOffset(props, idx, alignment, scrollOffset, unref(dynamicSizeCache)));
|
|
21463
|
+
};
|
|
21464
|
+
const getItemStyle = (idx) => {
|
|
21465
|
+
const { direction, itemSize, layout } = props;
|
|
21466
|
+
const itemStyleCache = getItemStyleCache.value(clearCache && itemSize, clearCache && layout, clearCache && direction);
|
|
21467
|
+
let style;
|
|
21468
|
+
if (hasOwn(itemStyleCache, String(idx))) {
|
|
21469
|
+
style = itemStyleCache[idx];
|
|
21470
|
+
} else {
|
|
21471
|
+
const offset = getItemOffset(props, idx, unref(dynamicSizeCache));
|
|
21472
|
+
const size = getItemSize(props, idx, unref(dynamicSizeCache));
|
|
21473
|
+
const horizontal = unref(_isHorizontal);
|
|
21474
|
+
const isRtl = direction === RTL;
|
|
21475
|
+
const offsetHorizontal = horizontal ? offset : 0;
|
|
21476
|
+
itemStyleCache[idx] = style = {
|
|
21477
|
+
position: "absolute",
|
|
21478
|
+
left: isRtl ? void 0 : `${offsetHorizontal}px`,
|
|
21479
|
+
right: isRtl ? `${offsetHorizontal}px` : void 0,
|
|
21480
|
+
top: !horizontal ? `${offset}px` : 0,
|
|
21481
|
+
height: !horizontal ? `${size}px` : "100%",
|
|
21482
|
+
width: horizontal ? `${size}px` : "100%"
|
|
21483
|
+
};
|
|
21484
|
+
}
|
|
21485
|
+
return style;
|
|
21486
|
+
};
|
|
21487
|
+
const resetIsScrolling = () => {
|
|
21488
|
+
states.value.isScrolling = false;
|
|
21489
|
+
nextTick(() => {
|
|
21490
|
+
getItemStyleCache.value(-1, null, null);
|
|
21491
|
+
});
|
|
21492
|
+
};
|
|
21493
|
+
const resetScrollTop = () => {
|
|
21494
|
+
const window = windowRef.value;
|
|
21495
|
+
if (window) {
|
|
21496
|
+
window.scrollTop = 0;
|
|
21497
|
+
}
|
|
21498
|
+
};
|
|
21499
|
+
onMounted(() => {
|
|
21500
|
+
if (!isClient)
|
|
21501
|
+
return;
|
|
21502
|
+
const { initScrollOffset } = props;
|
|
21503
|
+
const windowElement = unref(windowRef);
|
|
21504
|
+
if (isNumber(initScrollOffset) && windowElement) {
|
|
21505
|
+
if (unref(_isHorizontal)) {
|
|
21506
|
+
windowElement.scrollLeft = initScrollOffset;
|
|
21507
|
+
} else {
|
|
21508
|
+
windowElement.scrollTop = initScrollOffset;
|
|
21509
|
+
}
|
|
21510
|
+
}
|
|
21511
|
+
emitEvents();
|
|
21512
|
+
});
|
|
21513
|
+
onUpdated(() => {
|
|
21514
|
+
const { direction, layout } = props;
|
|
21515
|
+
const { scrollOffset, updateRequested } = unref(states);
|
|
21516
|
+
const windowElement = unref(windowRef);
|
|
21517
|
+
if (updateRequested && windowElement) {
|
|
21518
|
+
if (layout === HORIZONTAL) {
|
|
21519
|
+
if (direction === RTL) {
|
|
21520
|
+
switch (getRTLOffsetType()) {
|
|
21521
|
+
case RTL_OFFSET_NAG: {
|
|
21522
|
+
windowElement.scrollLeft = -scrollOffset;
|
|
21523
|
+
break;
|
|
21524
|
+
}
|
|
21525
|
+
case RTL_OFFSET_POS_ASC: {
|
|
21526
|
+
windowElement.scrollLeft = scrollOffset;
|
|
21527
|
+
break;
|
|
21528
|
+
}
|
|
21529
|
+
default: {
|
|
21530
|
+
const { clientWidth, scrollWidth } = windowElement;
|
|
21531
|
+
windowElement.scrollLeft = scrollWidth - clientWidth - scrollOffset;
|
|
21532
|
+
break;
|
|
21533
|
+
}
|
|
21534
|
+
}
|
|
21535
|
+
} else {
|
|
21536
|
+
windowElement.scrollLeft = scrollOffset;
|
|
21537
|
+
}
|
|
21538
|
+
} else {
|
|
21539
|
+
windowElement.scrollTop = scrollOffset;
|
|
21540
|
+
}
|
|
21541
|
+
}
|
|
21542
|
+
});
|
|
21543
|
+
onActivated(() => {
|
|
21544
|
+
unref(windowRef).scrollTop = unref(states).scrollOffset;
|
|
21545
|
+
});
|
|
21546
|
+
const api = {
|
|
21547
|
+
ns,
|
|
21548
|
+
clientSize,
|
|
21549
|
+
estimatedTotalSize,
|
|
21550
|
+
windowStyle,
|
|
21551
|
+
windowRef,
|
|
21552
|
+
innerRef,
|
|
21553
|
+
innerStyle,
|
|
21554
|
+
itemsToRender,
|
|
21555
|
+
scrollbarRef,
|
|
21556
|
+
states,
|
|
21557
|
+
getItemStyle,
|
|
21558
|
+
onScroll,
|
|
21559
|
+
onScrollbarScroll,
|
|
21560
|
+
onWheel,
|
|
21561
|
+
scrollTo,
|
|
21562
|
+
scrollToItem,
|
|
21563
|
+
resetScrollTop
|
|
21564
|
+
};
|
|
21565
|
+
expose({
|
|
21566
|
+
windowRef,
|
|
21567
|
+
innerRef,
|
|
21568
|
+
getItemStyleCache,
|
|
21569
|
+
scrollTo,
|
|
21570
|
+
scrollToItem,
|
|
21571
|
+
resetScrollTop,
|
|
21572
|
+
states
|
|
21573
|
+
});
|
|
21574
|
+
return api;
|
|
21575
|
+
},
|
|
21576
|
+
render(ctx) {
|
|
21577
|
+
var _a;
|
|
21578
|
+
const {
|
|
21579
|
+
$slots,
|
|
21580
|
+
className,
|
|
21581
|
+
clientSize,
|
|
21582
|
+
containerElement,
|
|
21583
|
+
data,
|
|
21584
|
+
getItemStyle,
|
|
21585
|
+
innerElement,
|
|
21586
|
+
itemsToRender,
|
|
21587
|
+
innerStyle,
|
|
21588
|
+
layout,
|
|
21589
|
+
total,
|
|
21590
|
+
onScroll,
|
|
21591
|
+
onScrollbarScroll,
|
|
21592
|
+
states,
|
|
21593
|
+
useIsScrolling,
|
|
21594
|
+
windowStyle,
|
|
21595
|
+
ns
|
|
21596
|
+
} = ctx;
|
|
21597
|
+
const [start, end] = itemsToRender;
|
|
21598
|
+
const Container = resolveDynamicComponent(containerElement);
|
|
21599
|
+
const Inner = resolveDynamicComponent(innerElement);
|
|
21600
|
+
const children = [];
|
|
21601
|
+
if (total > 0) {
|
|
21602
|
+
for (let i = start; i <= end; i++) {
|
|
21603
|
+
children.push(h(Fragment, { key: i }, (_a = $slots.default) == null ? void 0 : _a.call($slots, {
|
|
21604
|
+
data,
|
|
21605
|
+
index: i,
|
|
21606
|
+
isScrolling: useIsScrolling ? states.isScrolling : void 0,
|
|
21607
|
+
style: getItemStyle(i)
|
|
21608
|
+
})));
|
|
21609
|
+
}
|
|
21610
|
+
}
|
|
21611
|
+
const InnerNode = [
|
|
21612
|
+
h(Inner, {
|
|
21613
|
+
style: innerStyle,
|
|
21614
|
+
ref: "innerRef"
|
|
21615
|
+
}, !isString$1(Inner) ? {
|
|
21616
|
+
default: () => children
|
|
21617
|
+
} : children)
|
|
21618
|
+
];
|
|
21619
|
+
const scrollbar = h(ScrollBar, {
|
|
21620
|
+
ref: "scrollbarRef",
|
|
21621
|
+
clientSize,
|
|
21622
|
+
layout,
|
|
21623
|
+
onScroll: onScrollbarScroll,
|
|
21624
|
+
ratio: clientSize * 100 / this.estimatedTotalSize,
|
|
21625
|
+
scrollFrom: states.scrollOffset / (this.estimatedTotalSize - clientSize),
|
|
21626
|
+
total
|
|
21627
|
+
});
|
|
21628
|
+
const listContainer = h(Container, {
|
|
21629
|
+
class: [ns.e("window"), className],
|
|
21630
|
+
style: windowStyle,
|
|
21631
|
+
onScroll,
|
|
21632
|
+
ref: "windowRef",
|
|
21633
|
+
key: 0
|
|
21634
|
+
}, !isString$1(Container) ? { default: () => [InnerNode] } : [InnerNode]);
|
|
21635
|
+
return h("div", {
|
|
21636
|
+
key: 0,
|
|
21637
|
+
class: [ns.e("wrapper"), states.scrollbarAlwaysOn ? "always-on" : ""]
|
|
21638
|
+
}, [listContainer, scrollbar]);
|
|
21639
|
+
}
|
|
21640
|
+
});
|
|
21641
|
+
};
|
|
21642
|
+
|
|
21643
|
+
const FixedSizeList = createList({
|
|
21644
|
+
name: "ElFixedSizeList",
|
|
21645
|
+
getItemOffset: ({ itemSize }, index) => index * itemSize,
|
|
21646
|
+
getItemSize: ({ itemSize }) => itemSize,
|
|
21647
|
+
getEstimatedTotalSize: ({ total, itemSize }) => itemSize * total,
|
|
21648
|
+
getOffset: ({ height, total, itemSize, layout, width }, index, alignment, scrollOffset) => {
|
|
21649
|
+
const size = isHorizontal(layout) ? width : height;
|
|
21650
|
+
const lastItemOffset = Math.max(0, total * itemSize - size);
|
|
21651
|
+
const maxOffset = Math.min(lastItemOffset, index * itemSize);
|
|
21652
|
+
const minOffset = Math.max(0, (index + 1) * itemSize - size);
|
|
21653
|
+
if (alignment === SMART_ALIGNMENT) {
|
|
21654
|
+
if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {
|
|
21655
|
+
alignment = AUTO_ALIGNMENT;
|
|
21656
|
+
} else {
|
|
21657
|
+
alignment = CENTERED_ALIGNMENT;
|
|
21658
|
+
}
|
|
21659
|
+
}
|
|
21660
|
+
switch (alignment) {
|
|
21661
|
+
case START_ALIGNMENT: {
|
|
21662
|
+
return maxOffset;
|
|
21663
|
+
}
|
|
21664
|
+
case END_ALIGNMENT: {
|
|
21665
|
+
return minOffset;
|
|
21666
|
+
}
|
|
21667
|
+
case CENTERED_ALIGNMENT: {
|
|
21668
|
+
const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);
|
|
21669
|
+
if (middleOffset < Math.ceil(size / 2)) {
|
|
21670
|
+
return 0;
|
|
21671
|
+
} else if (middleOffset > lastItemOffset + Math.floor(size / 2)) {
|
|
21672
|
+
return lastItemOffset;
|
|
21673
|
+
} else {
|
|
21674
|
+
return middleOffset;
|
|
21675
|
+
}
|
|
21676
|
+
}
|
|
21677
|
+
case AUTO_ALIGNMENT:
|
|
21678
|
+
default: {
|
|
21679
|
+
if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {
|
|
21680
|
+
return scrollOffset;
|
|
21681
|
+
} else if (scrollOffset < minOffset) {
|
|
21682
|
+
return minOffset;
|
|
21683
|
+
} else {
|
|
21684
|
+
return maxOffset;
|
|
21685
|
+
}
|
|
21686
|
+
}
|
|
21687
|
+
}
|
|
21688
|
+
},
|
|
21689
|
+
getStartIndexForOffset: ({ total, itemSize }, offset) => Math.max(0, Math.min(total - 1, Math.floor(offset / itemSize))),
|
|
21690
|
+
getStopIndexForStartIndex: ({ height, total, itemSize, layout, width }, startIndex, scrollOffset) => {
|
|
21691
|
+
const offset = startIndex * itemSize;
|
|
21692
|
+
const size = isHorizontal(layout) ? width : height;
|
|
21693
|
+
const numVisibleItems = Math.ceil((size + scrollOffset - offset) / itemSize);
|
|
21694
|
+
return Math.max(0, Math.min(total - 1, startIndex + numVisibleItems - 1));
|
|
21695
|
+
},
|
|
21696
|
+
initCache() {
|
|
21697
|
+
return void 0;
|
|
21698
|
+
},
|
|
21699
|
+
clearCache: true,
|
|
21700
|
+
validateProps() {
|
|
21701
|
+
}
|
|
21702
|
+
});
|
|
21703
|
+
|
|
21704
|
+
const getItemFromCache = (props, index, listCache) => {
|
|
21705
|
+
const { itemSize } = props;
|
|
21706
|
+
const { items, lastVisitedIndex } = listCache;
|
|
21707
|
+
if (index > lastVisitedIndex) {
|
|
21708
|
+
let offset = 0;
|
|
21709
|
+
if (lastVisitedIndex >= 0) {
|
|
21710
|
+
const item = items[lastVisitedIndex];
|
|
21711
|
+
offset = item.offset + item.size;
|
|
21712
|
+
}
|
|
21713
|
+
for (let i = lastVisitedIndex + 1; i <= index; i++) {
|
|
21714
|
+
const size = itemSize(i);
|
|
21715
|
+
items[i] = {
|
|
21716
|
+
offset,
|
|
21717
|
+
size
|
|
21718
|
+
};
|
|
21719
|
+
offset += size;
|
|
21720
|
+
}
|
|
21721
|
+
listCache.lastVisitedIndex = index;
|
|
21722
|
+
}
|
|
21723
|
+
return items[index];
|
|
21724
|
+
};
|
|
21725
|
+
const findItem = (props, listCache, offset) => {
|
|
21726
|
+
const { items, lastVisitedIndex } = listCache;
|
|
21727
|
+
const lastVisitedOffset = lastVisitedIndex > 0 ? items[lastVisitedIndex].offset : 0;
|
|
21728
|
+
if (lastVisitedOffset >= offset) {
|
|
21729
|
+
return bs(props, listCache, 0, lastVisitedIndex, offset);
|
|
21730
|
+
}
|
|
21731
|
+
return es(props, listCache, Math.max(0, lastVisitedIndex), offset);
|
|
21732
|
+
};
|
|
21733
|
+
const bs = (props, listCache, low, high, offset) => {
|
|
21734
|
+
while (low <= high) {
|
|
21735
|
+
const mid = low + Math.floor((high - low) / 2);
|
|
21736
|
+
const currentOffset = getItemFromCache(props, mid, listCache).offset;
|
|
21737
|
+
if (currentOffset === offset) {
|
|
21738
|
+
return mid;
|
|
21739
|
+
} else if (currentOffset < offset) {
|
|
21740
|
+
low = mid + 1;
|
|
21741
|
+
} else if (currentOffset > offset) {
|
|
21742
|
+
high = mid - 1;
|
|
21743
|
+
}
|
|
21744
|
+
}
|
|
21745
|
+
return Math.max(0, low - 1);
|
|
21746
|
+
};
|
|
21747
|
+
const es = (props, listCache, index, offset) => {
|
|
21748
|
+
const { total } = props;
|
|
21749
|
+
let exponent = 1;
|
|
21750
|
+
while (index < total && getItemFromCache(props, index, listCache).offset < offset) {
|
|
21751
|
+
index += exponent;
|
|
21752
|
+
exponent *= 2;
|
|
21753
|
+
}
|
|
21754
|
+
return bs(props, listCache, Math.floor(index / 2), Math.min(index, total - 1), offset);
|
|
21755
|
+
};
|
|
21756
|
+
const getEstimatedTotalSize = ({ total }, { items, estimatedItemSize, lastVisitedIndex }) => {
|
|
21757
|
+
let totalSizeOfMeasuredItems = 0;
|
|
21758
|
+
if (lastVisitedIndex >= total) {
|
|
21759
|
+
lastVisitedIndex = total - 1;
|
|
21760
|
+
}
|
|
21761
|
+
if (lastVisitedIndex >= 0) {
|
|
21762
|
+
const item = items[lastVisitedIndex];
|
|
21763
|
+
totalSizeOfMeasuredItems = item.offset + item.size;
|
|
21764
|
+
}
|
|
21765
|
+
const numUnmeasuredItems = total - lastVisitedIndex - 1;
|
|
21766
|
+
const totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedItemSize;
|
|
21767
|
+
return totalSizeOfMeasuredItems + totalSizeOfUnmeasuredItems;
|
|
21768
|
+
};
|
|
21769
|
+
const DynamicSizeList = createList({
|
|
21770
|
+
name: "ElDynamicSizeList",
|
|
21771
|
+
getItemOffset: (props, index, listCache) => getItemFromCache(props, index, listCache).offset,
|
|
21772
|
+
getItemSize: (_, index, { items }) => items[index].size,
|
|
21773
|
+
getEstimatedTotalSize,
|
|
21774
|
+
getOffset: (props, index, alignment, scrollOffset, listCache) => {
|
|
21775
|
+
const { height, layout, width } = props;
|
|
21776
|
+
const size = isHorizontal(layout) ? width : height;
|
|
21777
|
+
const item = getItemFromCache(props, index, listCache);
|
|
21778
|
+
const estimatedTotalSize = getEstimatedTotalSize(props, listCache);
|
|
21779
|
+
const maxOffset = Math.max(0, Math.min(estimatedTotalSize - size, item.offset));
|
|
21780
|
+
const minOffset = Math.max(0, item.offset - size + item.size);
|
|
21781
|
+
if (alignment === SMART_ALIGNMENT) {
|
|
21782
|
+
if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {
|
|
21783
|
+
alignment = AUTO_ALIGNMENT;
|
|
21784
|
+
} else {
|
|
21785
|
+
alignment = CENTERED_ALIGNMENT;
|
|
21786
|
+
}
|
|
21787
|
+
}
|
|
21788
|
+
switch (alignment) {
|
|
21789
|
+
case START_ALIGNMENT: {
|
|
21790
|
+
return maxOffset;
|
|
21791
|
+
}
|
|
21792
|
+
case END_ALIGNMENT: {
|
|
21793
|
+
return minOffset;
|
|
21794
|
+
}
|
|
21795
|
+
case CENTERED_ALIGNMENT: {
|
|
21796
|
+
return Math.round(minOffset + (maxOffset - minOffset) / 2);
|
|
21797
|
+
}
|
|
21798
|
+
case AUTO_ALIGNMENT:
|
|
21799
|
+
default: {
|
|
21800
|
+
if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {
|
|
21801
|
+
return scrollOffset;
|
|
21802
|
+
} else if (scrollOffset < minOffset) {
|
|
21803
|
+
return minOffset;
|
|
21804
|
+
} else {
|
|
21805
|
+
return maxOffset;
|
|
21806
|
+
}
|
|
21807
|
+
}
|
|
21808
|
+
}
|
|
21809
|
+
},
|
|
21810
|
+
getStartIndexForOffset: (props, offset, listCache) => findItem(props, listCache, offset),
|
|
21811
|
+
getStopIndexForStartIndex: (props, startIndex, scrollOffset, listCache) => {
|
|
21812
|
+
const { height, total, layout, width } = props;
|
|
21813
|
+
const size = isHorizontal(layout) ? width : height;
|
|
21814
|
+
const item = getItemFromCache(props, startIndex, listCache);
|
|
21815
|
+
const maxOffset = scrollOffset + size;
|
|
21816
|
+
let offset = item.offset + item.size;
|
|
21817
|
+
let stopIndex = startIndex;
|
|
21818
|
+
while (stopIndex < total - 1 && offset < maxOffset) {
|
|
21819
|
+
stopIndex++;
|
|
21820
|
+
offset += getItemFromCache(props, stopIndex, listCache).size;
|
|
21821
|
+
}
|
|
21822
|
+
return stopIndex;
|
|
21823
|
+
},
|
|
21824
|
+
initCache({ estimatedItemSize = DEFAULT_DYNAMIC_LIST_ITEM_SIZE }, instance) {
|
|
21825
|
+
const cache = {
|
|
21826
|
+
items: {},
|
|
21827
|
+
estimatedItemSize,
|
|
21828
|
+
lastVisitedIndex: -1
|
|
21829
|
+
};
|
|
21830
|
+
cache.clearCacheAfterIndex = (index, forceUpdate = true) => {
|
|
21831
|
+
var _a, _b;
|
|
21832
|
+
cache.lastVisitedIndex = Math.min(cache.lastVisitedIndex, index - 1);
|
|
21833
|
+
(_a = instance.exposed) == null ? void 0 : _a.getItemStyleCache(-1);
|
|
21834
|
+
if (forceUpdate) {
|
|
21835
|
+
(_b = instance.proxy) == null ? void 0 : _b.$forceUpdate();
|
|
21836
|
+
}
|
|
21837
|
+
};
|
|
21838
|
+
return cache;
|
|
21839
|
+
},
|
|
21840
|
+
clearCache: false,
|
|
21841
|
+
validateProps: ({ itemSize }) => {
|
|
21842
|
+
}
|
|
21843
|
+
});
|
|
21844
|
+
|
|
21845
|
+
const props = {
|
|
21846
|
+
loading: Boolean,
|
|
21847
|
+
data: {
|
|
21848
|
+
type: Array,
|
|
21849
|
+
required: true
|
|
21850
|
+
},
|
|
21851
|
+
hoveringIndex: Number,
|
|
21852
|
+
width: Number
|
|
21853
|
+
};
|
|
21854
|
+
var ElSelectMenu = defineComponent({
|
|
21855
|
+
name: "ElSelectDropdown",
|
|
21856
|
+
props,
|
|
21857
|
+
setup(props2, {
|
|
21858
|
+
slots,
|
|
21859
|
+
expose
|
|
21860
|
+
}) {
|
|
21861
|
+
const select = inject(selectV2InjectionKey);
|
|
21862
|
+
const ns = useNamespace("select");
|
|
21863
|
+
const {
|
|
21864
|
+
getLabel,
|
|
21865
|
+
getValue,
|
|
21866
|
+
getDisabled
|
|
21867
|
+
} = useProps(select.props);
|
|
21868
|
+
const cachedHeights = ref([]);
|
|
21869
|
+
const listRef = ref();
|
|
21870
|
+
const size = computed(() => props2.data.length);
|
|
21871
|
+
watch(() => size.value, () => {
|
|
21872
|
+
var _a, _b;
|
|
21873
|
+
(_b = (_a = select.tooltipRef.value).updatePopper) == null ? void 0 : _b.call(_a);
|
|
21874
|
+
});
|
|
21875
|
+
const isSized = computed(() => isUndefined(select.props.estimatedOptionHeight));
|
|
21876
|
+
const listProps = computed(() => {
|
|
21877
|
+
if (isSized.value) {
|
|
21878
|
+
return {
|
|
21879
|
+
itemSize: select.props.itemHeight
|
|
21880
|
+
};
|
|
21881
|
+
}
|
|
21882
|
+
return {
|
|
21883
|
+
estimatedSize: select.props.estimatedOptionHeight,
|
|
21884
|
+
itemSize: (idx) => cachedHeights.value[idx]
|
|
21885
|
+
};
|
|
21886
|
+
});
|
|
21887
|
+
const contains = (arr = [], target) => {
|
|
21888
|
+
const {
|
|
21889
|
+
props: {
|
|
21890
|
+
valueKey
|
|
21891
|
+
}
|
|
21892
|
+
} = select;
|
|
21893
|
+
if (!isObject$1(target)) {
|
|
21894
|
+
return arr.includes(target);
|
|
21895
|
+
}
|
|
21896
|
+
return arr && arr.some((item) => {
|
|
21897
|
+
return toRaw(get(item, valueKey)) === get(target, valueKey);
|
|
21898
|
+
});
|
|
21899
|
+
};
|
|
21900
|
+
const isEqual = (selected, target) => {
|
|
21901
|
+
if (!isObject$1(target)) {
|
|
21902
|
+
return selected === target;
|
|
21903
|
+
} else {
|
|
21904
|
+
const {
|
|
21905
|
+
valueKey
|
|
21906
|
+
} = select.props;
|
|
21907
|
+
return get(selected, valueKey) === get(target, valueKey);
|
|
21908
|
+
}
|
|
21909
|
+
};
|
|
21910
|
+
const isItemSelected = (modelValue, target) => {
|
|
21911
|
+
if (select.props.multiple) {
|
|
21912
|
+
return contains(modelValue, getValue(target));
|
|
21913
|
+
}
|
|
21914
|
+
return isEqual(modelValue, getValue(target));
|
|
21915
|
+
};
|
|
21916
|
+
const isItemDisabled = (modelValue, selected) => {
|
|
21917
|
+
const {
|
|
21918
|
+
disabled,
|
|
21919
|
+
multiple,
|
|
21920
|
+
multipleLimit
|
|
21921
|
+
} = select.props;
|
|
21922
|
+
return disabled || !selected && (multiple ? multipleLimit > 0 && modelValue.length >= multipleLimit : false);
|
|
21923
|
+
};
|
|
21924
|
+
const isItemHovering = (target) => props2.hoveringIndex === target;
|
|
21925
|
+
const scrollToItem = (index) => {
|
|
21926
|
+
const list = listRef.value;
|
|
21927
|
+
if (list) {
|
|
21928
|
+
list.scrollToItem(index);
|
|
21929
|
+
}
|
|
21930
|
+
};
|
|
21931
|
+
const resetScrollTop = () => {
|
|
21932
|
+
const list = listRef.value;
|
|
21933
|
+
if (list) {
|
|
21934
|
+
list.resetScrollTop();
|
|
21935
|
+
}
|
|
21936
|
+
};
|
|
21937
|
+
const exposed = {
|
|
21938
|
+
listRef,
|
|
21939
|
+
isSized,
|
|
21940
|
+
isItemDisabled,
|
|
21941
|
+
isItemHovering,
|
|
21942
|
+
isItemSelected,
|
|
21943
|
+
scrollToItem,
|
|
21944
|
+
resetScrollTop
|
|
21945
|
+
};
|
|
21946
|
+
expose(exposed);
|
|
21947
|
+
const Item = (itemProps) => {
|
|
21948
|
+
const {
|
|
21949
|
+
index,
|
|
21950
|
+
data,
|
|
21951
|
+
style
|
|
21952
|
+
} = itemProps;
|
|
21953
|
+
const sized = unref(isSized);
|
|
21954
|
+
const {
|
|
21955
|
+
itemSize,
|
|
21956
|
+
estimatedSize
|
|
21957
|
+
} = unref(listProps);
|
|
21958
|
+
const {
|
|
21959
|
+
modelValue
|
|
21960
|
+
} = select.props;
|
|
21961
|
+
const {
|
|
21962
|
+
onSelect,
|
|
21963
|
+
onHover
|
|
21964
|
+
} = select;
|
|
21965
|
+
const item = data[index];
|
|
21966
|
+
if (item.type === "Group") {
|
|
21967
|
+
return createVNode(GroupItem, {
|
|
21968
|
+
"item": item,
|
|
21969
|
+
"style": style,
|
|
21970
|
+
"height": sized ? itemSize : estimatedSize
|
|
21971
|
+
}, null);
|
|
21972
|
+
}
|
|
21973
|
+
const isSelected = isItemSelected(modelValue, item);
|
|
21974
|
+
const isDisabled = isItemDisabled(modelValue, isSelected);
|
|
21975
|
+
const isHovering = isItemHovering(index);
|
|
21976
|
+
return createVNode(OptionItem, mergeProps(itemProps, {
|
|
21977
|
+
"selected": isSelected,
|
|
21978
|
+
"disabled": getDisabled(item) || isDisabled,
|
|
21979
|
+
"created": !!item.created,
|
|
21980
|
+
"hovering": isHovering,
|
|
21981
|
+
"item": item,
|
|
21982
|
+
"onSelect": onSelect,
|
|
21983
|
+
"onHover": onHover
|
|
21984
|
+
}), {
|
|
21985
|
+
default: (props3) => {
|
|
21986
|
+
var _a;
|
|
21987
|
+
return ((_a = slots.default) == null ? void 0 : _a.call(slots, props3)) || createVNode("span", null, [getLabel(item)]);
|
|
21988
|
+
}
|
|
21989
|
+
});
|
|
21990
|
+
};
|
|
21991
|
+
const {
|
|
21992
|
+
onKeyboardNavigate,
|
|
21993
|
+
onKeyboardSelect
|
|
21994
|
+
} = select;
|
|
21995
|
+
const onForward = () => {
|
|
21996
|
+
onKeyboardNavigate("forward");
|
|
21997
|
+
};
|
|
21998
|
+
const onBackward = () => {
|
|
21999
|
+
onKeyboardNavigate("backward");
|
|
22000
|
+
};
|
|
22001
|
+
const onKeydown = (e) => {
|
|
22002
|
+
const {
|
|
22003
|
+
code
|
|
22004
|
+
} = e;
|
|
22005
|
+
const {
|
|
22006
|
+
tab,
|
|
22007
|
+
esc,
|
|
22008
|
+
down,
|
|
22009
|
+
up,
|
|
22010
|
+
enter,
|
|
22011
|
+
numpadEnter
|
|
22012
|
+
} = EVENT_CODE;
|
|
22013
|
+
if (code !== tab) {
|
|
22014
|
+
e.preventDefault();
|
|
22015
|
+
e.stopPropagation();
|
|
22016
|
+
}
|
|
22017
|
+
switch (code) {
|
|
22018
|
+
case tab:
|
|
22019
|
+
case esc:
|
|
22020
|
+
break;
|
|
22021
|
+
case down:
|
|
22022
|
+
onForward();
|
|
22023
|
+
break;
|
|
22024
|
+
case up:
|
|
22025
|
+
onBackward();
|
|
22026
|
+
break;
|
|
22027
|
+
case enter:
|
|
22028
|
+
case numpadEnter:
|
|
22029
|
+
onKeyboardSelect();
|
|
22030
|
+
break;
|
|
22031
|
+
}
|
|
22032
|
+
};
|
|
22033
|
+
return () => {
|
|
22034
|
+
var _a, _b, _c, _d;
|
|
22035
|
+
const {
|
|
22036
|
+
data,
|
|
22037
|
+
width
|
|
22038
|
+
} = props2;
|
|
22039
|
+
const {
|
|
22040
|
+
height,
|
|
22041
|
+
multiple,
|
|
22042
|
+
scrollbarAlwaysOn
|
|
22043
|
+
} = select.props;
|
|
22044
|
+
const List = unref(isSized) ? FixedSizeList : DynamicSizeList;
|
|
22045
|
+
return createVNode("div", {
|
|
22046
|
+
"class": [ns.b("dropdown"), ns.is("multiple", multiple)],
|
|
22047
|
+
"style": {
|
|
22048
|
+
width: `${width}px`
|
|
22049
|
+
}
|
|
22050
|
+
}, [(_a = slots.header) == null ? void 0 : _a.call(slots), ((_b = slots.loading) == null ? void 0 : _b.call(slots)) || ((_c = slots.empty) == null ? void 0 : _c.call(slots)) || createVNode(List, mergeProps({
|
|
22051
|
+
"ref": listRef
|
|
22052
|
+
}, unref(listProps), {
|
|
22053
|
+
"className": ns.be("dropdown", "list"),
|
|
22054
|
+
"scrollbarAlwaysOn": scrollbarAlwaysOn,
|
|
22055
|
+
"data": data,
|
|
22056
|
+
"height": height,
|
|
22057
|
+
"width": width,
|
|
22058
|
+
"total": data.length,
|
|
22059
|
+
"onKeydown": onKeydown
|
|
22060
|
+
}), {
|
|
22061
|
+
default: (props3) => createVNode(Item, props3, null)
|
|
22062
|
+
}), (_d = slots.footer) == null ? void 0 : _d.call(slots)]);
|
|
22063
|
+
};
|
|
22064
|
+
}
|
|
22065
|
+
});
|
|
22066
|
+
|
|
22067
|
+
function useAllowCreate(props, states) {
|
|
22068
|
+
const { aliasProps, getLabel, getValue } = useProps(props);
|
|
22069
|
+
const createOptionCount = ref(0);
|
|
22070
|
+
const cachedSelectedOption = ref();
|
|
22071
|
+
const enableAllowCreateMode = computed(() => {
|
|
22072
|
+
return props.allowCreate && props.filterable;
|
|
22073
|
+
});
|
|
22074
|
+
function hasExistingOption(query) {
|
|
22075
|
+
const hasOption = (option) => getLabel(option) === query;
|
|
22076
|
+
return props.options && props.options.some(hasOption) || states.createdOptions.some(hasOption);
|
|
22077
|
+
}
|
|
22078
|
+
function selectNewOption(option) {
|
|
22079
|
+
if (!enableAllowCreateMode.value) {
|
|
22080
|
+
return;
|
|
22081
|
+
}
|
|
22082
|
+
if (props.multiple && option.created) {
|
|
22083
|
+
createOptionCount.value++;
|
|
22084
|
+
} else {
|
|
22085
|
+
cachedSelectedOption.value = option;
|
|
22086
|
+
}
|
|
22087
|
+
}
|
|
22088
|
+
function createNewOption(query) {
|
|
22089
|
+
if (enableAllowCreateMode.value) {
|
|
22090
|
+
if (query && query.length > 0) {
|
|
22091
|
+
if (hasExistingOption(query)) {
|
|
22092
|
+
return;
|
|
22093
|
+
}
|
|
22094
|
+
const newOption = {
|
|
22095
|
+
[aliasProps.value.value]: query,
|
|
22096
|
+
[aliasProps.value.label]: query,
|
|
22097
|
+
created: true,
|
|
22098
|
+
[aliasProps.value.disabled]: false
|
|
22099
|
+
};
|
|
22100
|
+
if (states.createdOptions.length >= createOptionCount.value) {
|
|
22101
|
+
states.createdOptions[createOptionCount.value] = newOption;
|
|
22102
|
+
} else {
|
|
22103
|
+
states.createdOptions.push(newOption);
|
|
22104
|
+
}
|
|
22105
|
+
} else {
|
|
22106
|
+
if (props.multiple) {
|
|
22107
|
+
states.createdOptions.length = createOptionCount.value;
|
|
22108
|
+
} else {
|
|
22109
|
+
const selectedOption = cachedSelectedOption.value;
|
|
22110
|
+
states.createdOptions.length = 0;
|
|
22111
|
+
if (selectedOption && selectedOption.created) {
|
|
22112
|
+
states.createdOptions.push(selectedOption);
|
|
22113
|
+
}
|
|
22114
|
+
}
|
|
22115
|
+
}
|
|
22116
|
+
}
|
|
22117
|
+
}
|
|
22118
|
+
function removeNewOption(option) {
|
|
22119
|
+
if (!enableAllowCreateMode.value || !option || !option.created || option.created && props.reserveKeyword && states.inputValue === getLabel(option)) {
|
|
22120
|
+
return;
|
|
22121
|
+
}
|
|
22122
|
+
const idx = states.createdOptions.findIndex((it) => getValue(it) === getValue(option));
|
|
22123
|
+
if (~idx) {
|
|
22124
|
+
states.createdOptions.splice(idx, 1);
|
|
22125
|
+
createOptionCount.value--;
|
|
22126
|
+
}
|
|
22127
|
+
}
|
|
22128
|
+
function clearAllNewOption() {
|
|
22129
|
+
if (enableAllowCreateMode.value) {
|
|
22130
|
+
states.createdOptions.length = 0;
|
|
22131
|
+
createOptionCount.value = 0;
|
|
22132
|
+
}
|
|
22133
|
+
}
|
|
22134
|
+
return {
|
|
22135
|
+
createNewOption,
|
|
22136
|
+
removeNewOption,
|
|
22137
|
+
selectNewOption,
|
|
22138
|
+
clearAllNewOption
|
|
22139
|
+
};
|
|
22140
|
+
}
|
|
22141
|
+
|
|
22142
|
+
const useSelect = (props, emit) => {
|
|
22143
|
+
const { t } = useLocale();
|
|
22144
|
+
const nsSelect = useNamespace("select");
|
|
22145
|
+
const nsInput = useNamespace("input");
|
|
22146
|
+
const { form: elForm, formItem: elFormItem } = useFormItem();
|
|
22147
|
+
const { inputId } = useFormItemInputId(props, {
|
|
22148
|
+
formItemContext: elFormItem
|
|
22149
|
+
});
|
|
22150
|
+
const { aliasProps, getLabel, getValue, getDisabled, getOptions } = useProps(props);
|
|
22151
|
+
const { valueOnClear, isEmptyValue } = useEmptyValues(props);
|
|
22152
|
+
const states = reactive({
|
|
22153
|
+
inputValue: "",
|
|
22154
|
+
cachedOptions: [],
|
|
22155
|
+
createdOptions: [],
|
|
22156
|
+
hoveringIndex: -1,
|
|
22157
|
+
inputHovering: false,
|
|
22158
|
+
selectionWidth: 0,
|
|
22159
|
+
collapseItemWidth: 0,
|
|
22160
|
+
previousQuery: null,
|
|
22161
|
+
previousValue: void 0,
|
|
22162
|
+
selectedLabel: "",
|
|
22163
|
+
menuVisibleOnFocus: false,
|
|
22164
|
+
isBeforeHide: false
|
|
22165
|
+
});
|
|
22166
|
+
const popperSize = ref(-1);
|
|
22167
|
+
const selectRef = ref();
|
|
22168
|
+
const selectionRef = ref();
|
|
22169
|
+
const tooltipRef = ref();
|
|
22170
|
+
const tagTooltipRef = ref();
|
|
22171
|
+
const inputRef = ref();
|
|
22172
|
+
const prefixRef = ref();
|
|
22173
|
+
const suffixRef = ref();
|
|
22174
|
+
const menuRef = ref();
|
|
22175
|
+
const tagMenuRef = ref();
|
|
22176
|
+
const collapseItemRef = ref();
|
|
22177
|
+
const {
|
|
22178
|
+
isComposing,
|
|
22179
|
+
handleCompositionStart,
|
|
22180
|
+
handleCompositionEnd,
|
|
22181
|
+
handleCompositionUpdate
|
|
22182
|
+
} = useComposition({
|
|
22183
|
+
afterComposition: (e) => onInput(e)
|
|
22184
|
+
});
|
|
22185
|
+
const { wrapperRef, isFocused, handleBlur } = useFocusController(inputRef, {
|
|
22186
|
+
beforeFocus() {
|
|
22187
|
+
return selectDisabled.value;
|
|
22188
|
+
},
|
|
22189
|
+
afterFocus() {
|
|
22190
|
+
if (props.automaticDropdown && !expanded.value) {
|
|
22191
|
+
expanded.value = true;
|
|
22192
|
+
states.menuVisibleOnFocus = true;
|
|
22193
|
+
}
|
|
22194
|
+
},
|
|
22195
|
+
beforeBlur(event) {
|
|
22196
|
+
var _a, _b;
|
|
22197
|
+
return ((_a = tooltipRef.value) == null ? void 0 : _a.isFocusInsideContent(event)) || ((_b = tagTooltipRef.value) == null ? void 0 : _b.isFocusInsideContent(event));
|
|
22198
|
+
},
|
|
22199
|
+
afterBlur() {
|
|
22200
|
+
expanded.value = false;
|
|
22201
|
+
states.menuVisibleOnFocus = false;
|
|
22202
|
+
}
|
|
22203
|
+
});
|
|
22204
|
+
const allOptions = ref([]);
|
|
22205
|
+
const filteredOptions = ref([]);
|
|
22206
|
+
const expanded = ref(false);
|
|
22207
|
+
const selectDisabled = computed(() => props.disabled || (elForm == null ? void 0 : elForm.disabled));
|
|
22208
|
+
const needStatusIcon = computed(() => {
|
|
22209
|
+
var _a;
|
|
22210
|
+
return (_a = elForm == null ? void 0 : elForm.statusIcon) != null ? _a : false;
|
|
22211
|
+
});
|
|
22212
|
+
const popupHeight = computed(() => {
|
|
22213
|
+
const totalHeight = filteredOptions.value.length * props.itemHeight;
|
|
22214
|
+
return totalHeight > props.height ? props.height : totalHeight;
|
|
22215
|
+
});
|
|
22216
|
+
const hasModelValue = computed(() => {
|
|
22217
|
+
return props.multiple ? isArray$1(props.modelValue) && props.modelValue.length > 0 : !isEmptyValue(props.modelValue);
|
|
22218
|
+
});
|
|
22219
|
+
const showClearBtn = computed(() => {
|
|
22220
|
+
return props.clearable && !selectDisabled.value && states.inputHovering && hasModelValue.value;
|
|
22221
|
+
});
|
|
22222
|
+
const iconComponent = computed(() => props.remote && props.filterable ? "" : arrow_down_default);
|
|
22223
|
+
const iconReverse = computed(() => iconComponent.value && nsSelect.is("reverse", expanded.value));
|
|
22224
|
+
const validateState = computed(() => (elFormItem == null ? void 0 : elFormItem.validateState) || "");
|
|
22225
|
+
const validateIcon = computed(() => {
|
|
22226
|
+
if (!validateState.value)
|
|
22227
|
+
return;
|
|
22228
|
+
return ValidateComponentsMap[validateState.value];
|
|
22229
|
+
});
|
|
22230
|
+
const debounce$1 = computed(() => props.remote ? 300 : 0);
|
|
22231
|
+
const emptyText = computed(() => {
|
|
22232
|
+
if (props.loading) {
|
|
22233
|
+
return props.loadingText || t("el.select.loading");
|
|
22234
|
+
} else {
|
|
22235
|
+
if (props.remote && !states.inputValue && allOptions.value.length === 0)
|
|
22236
|
+
return false;
|
|
22237
|
+
if (props.filterable && states.inputValue && allOptions.value.length > 0 && filteredOptions.value.length === 0) {
|
|
22238
|
+
return props.noMatchText || t("el.select.noMatch");
|
|
22239
|
+
}
|
|
22240
|
+
if (allOptions.value.length === 0) {
|
|
22241
|
+
return props.noDataText || t("el.select.noData");
|
|
22242
|
+
}
|
|
22243
|
+
}
|
|
22244
|
+
return null;
|
|
22245
|
+
});
|
|
22246
|
+
const filterOptions = (query) => {
|
|
22247
|
+
const isValidOption = (o) => {
|
|
22248
|
+
if (props.filterable && isFunction$1(props.filterMethod))
|
|
22249
|
+
return true;
|
|
22250
|
+
if (props.filterable && props.remote && isFunction$1(props.remoteMethod))
|
|
22251
|
+
return true;
|
|
22252
|
+
const regexp = new RegExp(escapeStringRegexp(query), "i");
|
|
22253
|
+
return query ? regexp.test(getLabel(o) || "") : true;
|
|
22254
|
+
};
|
|
22255
|
+
if (props.loading) {
|
|
22256
|
+
return [];
|
|
22257
|
+
}
|
|
22258
|
+
return [...states.createdOptions, ...props.options].reduce((all, item) => {
|
|
22259
|
+
const options = getOptions(item);
|
|
22260
|
+
if (isArray$1(options)) {
|
|
22261
|
+
const filtered = options.filter(isValidOption);
|
|
22262
|
+
if (filtered.length > 0) {
|
|
22263
|
+
all.push({
|
|
22264
|
+
label: getLabel(item),
|
|
22265
|
+
type: "Group"
|
|
22266
|
+
}, ...filtered);
|
|
22267
|
+
}
|
|
22268
|
+
} else if (props.remote || isValidOption(item)) {
|
|
22269
|
+
all.push(item);
|
|
22270
|
+
}
|
|
22271
|
+
return all;
|
|
22272
|
+
}, []);
|
|
22273
|
+
};
|
|
22274
|
+
const updateOptions = () => {
|
|
22275
|
+
allOptions.value = filterOptions("");
|
|
22276
|
+
filteredOptions.value = filterOptions(states.inputValue);
|
|
22277
|
+
};
|
|
22278
|
+
const allOptionsValueMap = computed(() => {
|
|
22279
|
+
const valueMap = /* @__PURE__ */ new Map();
|
|
22280
|
+
allOptions.value.forEach((option, index) => {
|
|
22281
|
+
valueMap.set(getValueKey(getValue(option)), { option, index });
|
|
22282
|
+
});
|
|
22283
|
+
return valueMap;
|
|
22284
|
+
});
|
|
22285
|
+
const filteredOptionsValueMap = computed(() => {
|
|
22286
|
+
const valueMap = /* @__PURE__ */ new Map();
|
|
22287
|
+
filteredOptions.value.forEach((option, index) => {
|
|
22288
|
+
valueMap.set(getValueKey(getValue(option)), { option, index });
|
|
22289
|
+
});
|
|
22290
|
+
return valueMap;
|
|
22291
|
+
});
|
|
22292
|
+
const optionsAllDisabled = computed(() => filteredOptions.value.every((option) => getDisabled(option)));
|
|
22293
|
+
const selectSize = useFormSize();
|
|
22294
|
+
const collapseTagSize = computed(() => selectSize.value === "small" ? "small" : "default");
|
|
22295
|
+
const calculatePopperSize = () => {
|
|
22296
|
+
var _a;
|
|
22297
|
+
if (isNumber(props.fitInputWidth)) {
|
|
22298
|
+
popperSize.value = props.fitInputWidth;
|
|
22299
|
+
return;
|
|
22300
|
+
}
|
|
22301
|
+
const width = ((_a = selectRef.value) == null ? void 0 : _a.offsetWidth) || 200;
|
|
22302
|
+
if (!props.fitInputWidth && allOptions.value.length > 0) {
|
|
22303
|
+
nextTick(() => {
|
|
22304
|
+
popperSize.value = Math.max(width, calculateLabelMaxWidth());
|
|
22305
|
+
});
|
|
22306
|
+
} else {
|
|
22307
|
+
popperSize.value = width;
|
|
22308
|
+
}
|
|
22309
|
+
};
|
|
22310
|
+
const calculateLabelMaxWidth = () => {
|
|
22311
|
+
var _a, _b;
|
|
22312
|
+
const canvas = document.createElement("canvas");
|
|
22313
|
+
const ctx = canvas.getContext("2d");
|
|
22314
|
+
const selector = nsSelect.be("dropdown", "item");
|
|
22315
|
+
const dom = ((_b = (_a = menuRef.value) == null ? void 0 : _a.listRef) == null ? void 0 : _b.innerRef) || document;
|
|
22316
|
+
const dropdownItemEl = dom.querySelector(`.${selector}`);
|
|
22317
|
+
if (dropdownItemEl === null || ctx === null)
|
|
22318
|
+
return 0;
|
|
22319
|
+
const style = getComputedStyle(dropdownItemEl);
|
|
22320
|
+
const padding = Number.parseFloat(style.paddingLeft) + Number.parseFloat(style.paddingRight);
|
|
22321
|
+
ctx.font = style.font;
|
|
22322
|
+
const maxWidth = filteredOptions.value.reduce((max, option) => {
|
|
22323
|
+
const metrics = ctx.measureText(getLabel(option));
|
|
22324
|
+
return Math.max(metrics.width, max);
|
|
22325
|
+
}, 0);
|
|
22326
|
+
return maxWidth + padding;
|
|
22327
|
+
};
|
|
22328
|
+
const getGapWidth = () => {
|
|
22329
|
+
if (!selectionRef.value)
|
|
22330
|
+
return 0;
|
|
22331
|
+
const style = window.getComputedStyle(selectionRef.value);
|
|
22332
|
+
return Number.parseFloat(style.gap || "6px");
|
|
22333
|
+
};
|
|
22334
|
+
const tagStyle = computed(() => {
|
|
22335
|
+
const gapWidth = getGapWidth();
|
|
22336
|
+
const maxWidth = collapseItemRef.value && props.maxCollapseTags === 1 ? states.selectionWidth - states.collapseItemWidth - gapWidth : states.selectionWidth;
|
|
22337
|
+
return { maxWidth: `${maxWidth}px` };
|
|
22338
|
+
});
|
|
22339
|
+
const collapseTagStyle = computed(() => {
|
|
22340
|
+
return { maxWidth: `${states.selectionWidth}px` };
|
|
22341
|
+
});
|
|
22342
|
+
const shouldShowPlaceholder = computed(() => {
|
|
22343
|
+
if (isArray$1(props.modelValue)) {
|
|
22344
|
+
return props.modelValue.length === 0 && !states.inputValue;
|
|
22345
|
+
}
|
|
22346
|
+
return props.filterable ? !states.inputValue : true;
|
|
22347
|
+
});
|
|
22348
|
+
const currentPlaceholder = computed(() => {
|
|
22349
|
+
var _a;
|
|
22350
|
+
const _placeholder = (_a = props.placeholder) != null ? _a : t("el.select.placeholder");
|
|
22351
|
+
return props.multiple || !hasModelValue.value ? _placeholder : states.selectedLabel;
|
|
22352
|
+
});
|
|
22353
|
+
const popperRef = computed(() => {
|
|
22354
|
+
var _a, _b;
|
|
22355
|
+
return (_b = (_a = tooltipRef.value) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.contentRef;
|
|
22356
|
+
});
|
|
22357
|
+
const indexRef = computed(() => {
|
|
22358
|
+
if (props.multiple) {
|
|
22359
|
+
const len = props.modelValue.length;
|
|
22360
|
+
if (props.modelValue.length > 0 && filteredOptionsValueMap.value.has(props.modelValue[len - 1])) {
|
|
22361
|
+
const { index } = filteredOptionsValueMap.value.get(props.modelValue[len - 1]);
|
|
22362
|
+
return index;
|
|
22363
|
+
}
|
|
22364
|
+
} else {
|
|
22365
|
+
if (!isEmptyValue(props.modelValue) && filteredOptionsValueMap.value.has(props.modelValue)) {
|
|
22366
|
+
const { index } = filteredOptionsValueMap.value.get(props.modelValue);
|
|
22367
|
+
return index;
|
|
22368
|
+
}
|
|
22369
|
+
}
|
|
22370
|
+
return -1;
|
|
22371
|
+
});
|
|
22372
|
+
const dropdownMenuVisible = computed({
|
|
22373
|
+
get() {
|
|
22374
|
+
return expanded.value && emptyText.value !== false;
|
|
22375
|
+
},
|
|
22376
|
+
set(val) {
|
|
22377
|
+
expanded.value = val;
|
|
22378
|
+
}
|
|
22379
|
+
});
|
|
22380
|
+
const showTagList = computed(() => {
|
|
22381
|
+
if (!props.multiple) {
|
|
22382
|
+
return [];
|
|
22383
|
+
}
|
|
22384
|
+
return props.collapseTags ? states.cachedOptions.slice(0, props.maxCollapseTags) : states.cachedOptions;
|
|
22385
|
+
});
|
|
22386
|
+
const collapseTagList = computed(() => {
|
|
22387
|
+
if (!props.multiple) {
|
|
22388
|
+
return [];
|
|
22389
|
+
}
|
|
22390
|
+
return props.collapseTags ? states.cachedOptions.slice(props.maxCollapseTags) : [];
|
|
22391
|
+
});
|
|
22392
|
+
const {
|
|
22393
|
+
createNewOption,
|
|
22394
|
+
removeNewOption,
|
|
22395
|
+
selectNewOption,
|
|
22396
|
+
clearAllNewOption
|
|
22397
|
+
} = useAllowCreate(props, states);
|
|
22398
|
+
const toggleMenu = () => {
|
|
22399
|
+
if (selectDisabled.value)
|
|
22400
|
+
return;
|
|
22401
|
+
if (states.menuVisibleOnFocus) {
|
|
22402
|
+
states.menuVisibleOnFocus = false;
|
|
22403
|
+
} else {
|
|
22404
|
+
expanded.value = !expanded.value;
|
|
22405
|
+
}
|
|
22406
|
+
};
|
|
22407
|
+
const onInputChange = () => {
|
|
22408
|
+
if (states.inputValue.length > 0 && !expanded.value) {
|
|
22409
|
+
expanded.value = true;
|
|
22410
|
+
}
|
|
22411
|
+
createNewOption(states.inputValue);
|
|
22412
|
+
handleQueryChange(states.inputValue);
|
|
22413
|
+
};
|
|
22414
|
+
const debouncedOnInputChange = debounce(onInputChange, debounce$1.value);
|
|
22415
|
+
const handleQueryChange = (val) => {
|
|
22416
|
+
if (states.previousQuery === val || isComposing.value) {
|
|
22417
|
+
return;
|
|
22418
|
+
}
|
|
22419
|
+
states.previousQuery = val;
|
|
22420
|
+
if (props.filterable && isFunction$1(props.filterMethod)) {
|
|
22421
|
+
props.filterMethod(val);
|
|
22422
|
+
} else if (props.filterable && props.remote && isFunction$1(props.remoteMethod)) {
|
|
22423
|
+
props.remoteMethod(val);
|
|
22424
|
+
}
|
|
22425
|
+
if (props.defaultFirstOption && (props.filterable || props.remote) && filteredOptions.value.length) {
|
|
22426
|
+
nextTick(checkDefaultFirstOption);
|
|
22427
|
+
} else {
|
|
22428
|
+
nextTick(updateHoveringIndex);
|
|
22429
|
+
}
|
|
22430
|
+
};
|
|
22431
|
+
const checkDefaultFirstOption = () => {
|
|
22432
|
+
const optionsInDropdown = filteredOptions.value.filter((n) => !n.disabled && n.type !== "Group");
|
|
22433
|
+
const userCreatedOption = optionsInDropdown.find((n) => n.created);
|
|
22434
|
+
const firstOriginOption = optionsInDropdown[0];
|
|
22435
|
+
states.hoveringIndex = getValueIndex(filteredOptions.value, userCreatedOption || firstOriginOption);
|
|
22436
|
+
};
|
|
22437
|
+
const emitChange = (val) => {
|
|
22438
|
+
if (!isEqual$1(props.modelValue, val)) {
|
|
22439
|
+
emit(CHANGE_EVENT, val);
|
|
22440
|
+
}
|
|
22441
|
+
};
|
|
22442
|
+
const update = (val) => {
|
|
22443
|
+
emit(UPDATE_MODEL_EVENT, val);
|
|
22444
|
+
emitChange(val);
|
|
22445
|
+
states.previousValue = props.multiple ? String(val) : val;
|
|
22446
|
+
};
|
|
22447
|
+
const getValueIndex = (arr = [], value) => {
|
|
22448
|
+
if (!isObject$1(value)) {
|
|
22449
|
+
return arr.indexOf(value);
|
|
22450
|
+
}
|
|
22451
|
+
const valueKey = props.valueKey;
|
|
22452
|
+
let index = -1;
|
|
22453
|
+
arr.some((item, i) => {
|
|
22454
|
+
if (get(item, valueKey) === get(value, valueKey)) {
|
|
22455
|
+
index = i;
|
|
22456
|
+
return true;
|
|
22457
|
+
}
|
|
22458
|
+
return false;
|
|
22459
|
+
});
|
|
22460
|
+
return index;
|
|
22461
|
+
};
|
|
22462
|
+
const getValueKey = (item) => {
|
|
22463
|
+
return isObject$1(item) ? get(item, props.valueKey) : item;
|
|
22464
|
+
};
|
|
22465
|
+
const handleResize = () => {
|
|
22466
|
+
calculatePopperSize();
|
|
22467
|
+
};
|
|
22468
|
+
const resetSelectionWidth = () => {
|
|
22469
|
+
states.selectionWidth = selectionRef.value.getBoundingClientRect().width;
|
|
22470
|
+
};
|
|
22471
|
+
const resetCollapseItemWidth = () => {
|
|
22472
|
+
states.collapseItemWidth = collapseItemRef.value.getBoundingClientRect().width;
|
|
22473
|
+
};
|
|
22474
|
+
const updateTooltip = () => {
|
|
22475
|
+
var _a, _b;
|
|
22476
|
+
(_b = (_a = tooltipRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a);
|
|
22477
|
+
};
|
|
22478
|
+
const updateTagTooltip = () => {
|
|
22479
|
+
var _a, _b;
|
|
22480
|
+
(_b = (_a = tagTooltipRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a);
|
|
22481
|
+
};
|
|
22482
|
+
const onSelect = (option) => {
|
|
22483
|
+
if (props.multiple) {
|
|
22484
|
+
let selectedOptions = props.modelValue.slice();
|
|
22485
|
+
const index = getValueIndex(selectedOptions, getValue(option));
|
|
22486
|
+
if (index > -1) {
|
|
22487
|
+
selectedOptions = [
|
|
22488
|
+
...selectedOptions.slice(0, index),
|
|
22489
|
+
...selectedOptions.slice(index + 1)
|
|
22490
|
+
];
|
|
22491
|
+
states.cachedOptions.splice(index, 1);
|
|
22492
|
+
removeNewOption(option);
|
|
22493
|
+
} else if (props.multipleLimit <= 0 || selectedOptions.length < props.multipleLimit) {
|
|
22494
|
+
selectedOptions = [...selectedOptions, getValue(option)];
|
|
22495
|
+
states.cachedOptions.push(option);
|
|
22496
|
+
selectNewOption(option);
|
|
22497
|
+
}
|
|
22498
|
+
update(selectedOptions);
|
|
22499
|
+
if (option.created) {
|
|
22500
|
+
handleQueryChange("");
|
|
22501
|
+
}
|
|
22502
|
+
if (props.filterable && !props.reserveKeyword) {
|
|
22503
|
+
states.inputValue = "";
|
|
22504
|
+
}
|
|
22505
|
+
} else {
|
|
22506
|
+
states.selectedLabel = getLabel(option);
|
|
22507
|
+
update(getValue(option));
|
|
22508
|
+
expanded.value = false;
|
|
22509
|
+
selectNewOption(option);
|
|
22510
|
+
if (!option.created) {
|
|
22511
|
+
clearAllNewOption();
|
|
22512
|
+
}
|
|
22513
|
+
}
|
|
22514
|
+
focus();
|
|
22515
|
+
};
|
|
22516
|
+
const deleteTag = (event, option) => {
|
|
22517
|
+
let selectedOptions = props.modelValue.slice();
|
|
22518
|
+
const index = getValueIndex(selectedOptions, getValue(option));
|
|
22519
|
+
if (index > -1 && !selectDisabled.value) {
|
|
22520
|
+
selectedOptions = [
|
|
22521
|
+
...props.modelValue.slice(0, index),
|
|
22522
|
+
...props.modelValue.slice(index + 1)
|
|
22523
|
+
];
|
|
22524
|
+
states.cachedOptions.splice(index, 1);
|
|
22525
|
+
update(selectedOptions);
|
|
22526
|
+
emit("remove-tag", getValue(option));
|
|
22527
|
+
removeNewOption(option);
|
|
22528
|
+
}
|
|
22529
|
+
event.stopPropagation();
|
|
22530
|
+
focus();
|
|
22531
|
+
};
|
|
22532
|
+
const focus = () => {
|
|
22533
|
+
var _a;
|
|
22534
|
+
(_a = inputRef.value) == null ? void 0 : _a.focus();
|
|
22535
|
+
};
|
|
22536
|
+
const blur = () => {
|
|
22537
|
+
var _a;
|
|
22538
|
+
if (expanded.value) {
|
|
22539
|
+
expanded.value = false;
|
|
22540
|
+
nextTick(() => {
|
|
22541
|
+
var _a2;
|
|
22542
|
+
return (_a2 = inputRef.value) == null ? void 0 : _a2.blur();
|
|
22543
|
+
});
|
|
22544
|
+
return;
|
|
22545
|
+
}
|
|
22546
|
+
(_a = inputRef.value) == null ? void 0 : _a.blur();
|
|
22547
|
+
};
|
|
22548
|
+
const handleEsc = () => {
|
|
22549
|
+
if (states.inputValue.length > 0) {
|
|
22550
|
+
states.inputValue = "";
|
|
22551
|
+
} else {
|
|
22552
|
+
expanded.value = false;
|
|
22553
|
+
}
|
|
22554
|
+
};
|
|
22555
|
+
const getLastNotDisabledIndex = (value) => findLastIndex(value, (it) => !states.cachedOptions.some((option) => getValue(option) === it && getDisabled(option)));
|
|
22556
|
+
const handleDel = (e) => {
|
|
22557
|
+
if (!props.multiple)
|
|
22558
|
+
return;
|
|
22559
|
+
if (e.code === EVENT_CODE.delete)
|
|
22560
|
+
return;
|
|
22561
|
+
if (states.inputValue.length === 0) {
|
|
22562
|
+
e.preventDefault();
|
|
22563
|
+
const selected = props.modelValue.slice();
|
|
22564
|
+
const lastNotDisabledIndex = getLastNotDisabledIndex(selected);
|
|
22565
|
+
if (lastNotDisabledIndex < 0)
|
|
22566
|
+
return;
|
|
22567
|
+
const removeTagValue = selected[lastNotDisabledIndex];
|
|
22568
|
+
selected.splice(lastNotDisabledIndex, 1);
|
|
22569
|
+
const option = states.cachedOptions[lastNotDisabledIndex];
|
|
22570
|
+
states.cachedOptions.splice(lastNotDisabledIndex, 1);
|
|
22571
|
+
removeNewOption(option);
|
|
22572
|
+
update(selected);
|
|
22573
|
+
emit("remove-tag", removeTagValue);
|
|
22574
|
+
}
|
|
22575
|
+
};
|
|
22576
|
+
const handleClear = () => {
|
|
22577
|
+
let emptyValue;
|
|
22578
|
+
if (isArray$1(props.modelValue)) {
|
|
22579
|
+
emptyValue = [];
|
|
22580
|
+
} else {
|
|
22581
|
+
emptyValue = valueOnClear.value;
|
|
22582
|
+
}
|
|
22583
|
+
if (props.multiple) {
|
|
22584
|
+
states.cachedOptions = [];
|
|
22585
|
+
} else {
|
|
22586
|
+
states.selectedLabel = "";
|
|
22587
|
+
}
|
|
22588
|
+
expanded.value = false;
|
|
22589
|
+
update(emptyValue);
|
|
22590
|
+
emit("clear");
|
|
22591
|
+
clearAllNewOption();
|
|
22592
|
+
focus();
|
|
22593
|
+
};
|
|
22594
|
+
const onKeyboardNavigate = (direction, hoveringIndex = void 0) => {
|
|
22595
|
+
const options = filteredOptions.value;
|
|
22596
|
+
if (!["forward", "backward"].includes(direction) || selectDisabled.value || options.length <= 0 || optionsAllDisabled.value || isComposing.value) {
|
|
22597
|
+
return;
|
|
22598
|
+
}
|
|
22599
|
+
if (!expanded.value) {
|
|
22600
|
+
return toggleMenu();
|
|
22601
|
+
}
|
|
22602
|
+
if (hoveringIndex === void 0) {
|
|
22603
|
+
hoveringIndex = states.hoveringIndex;
|
|
22604
|
+
}
|
|
22605
|
+
let newIndex = -1;
|
|
22606
|
+
if (direction === "forward") {
|
|
22607
|
+
newIndex = hoveringIndex + 1;
|
|
22608
|
+
if (newIndex >= options.length) {
|
|
22609
|
+
newIndex = 0;
|
|
22610
|
+
}
|
|
22611
|
+
} else if (direction === "backward") {
|
|
22612
|
+
newIndex = hoveringIndex - 1;
|
|
22613
|
+
if (newIndex < 0 || newIndex >= options.length) {
|
|
22614
|
+
newIndex = options.length - 1;
|
|
22615
|
+
}
|
|
22616
|
+
}
|
|
22617
|
+
const option = options[newIndex];
|
|
22618
|
+
if (getDisabled(option) || option.type === "Group") {
|
|
22619
|
+
return onKeyboardNavigate(direction, newIndex);
|
|
22620
|
+
} else {
|
|
22621
|
+
states.hoveringIndex = newIndex;
|
|
22622
|
+
scrollToItem(newIndex);
|
|
22623
|
+
}
|
|
22624
|
+
};
|
|
22625
|
+
const onKeyboardSelect = () => {
|
|
22626
|
+
if (!expanded.value) {
|
|
22627
|
+
return toggleMenu();
|
|
22628
|
+
} else if (~states.hoveringIndex && filteredOptions.value[states.hoveringIndex]) {
|
|
22629
|
+
onSelect(filteredOptions.value[states.hoveringIndex]);
|
|
22630
|
+
}
|
|
22631
|
+
};
|
|
22632
|
+
const onHoverOption = (idx) => {
|
|
22633
|
+
states.hoveringIndex = idx != null ? idx : -1;
|
|
22634
|
+
};
|
|
22635
|
+
const updateHoveringIndex = () => {
|
|
22636
|
+
if (!props.multiple) {
|
|
22637
|
+
states.hoveringIndex = filteredOptions.value.findIndex((item) => {
|
|
22638
|
+
return getValueKey(item) === getValueKey(props.modelValue);
|
|
22639
|
+
});
|
|
22640
|
+
} else {
|
|
22641
|
+
states.hoveringIndex = filteredOptions.value.findIndex((item) => props.modelValue.some((modelValue) => getValueKey(modelValue) === getValueKey(item)));
|
|
22642
|
+
}
|
|
22643
|
+
};
|
|
22644
|
+
const onInput = (event) => {
|
|
22645
|
+
states.inputValue = event.target.value;
|
|
22646
|
+
if (props.remote) {
|
|
22647
|
+
debouncedOnInputChange();
|
|
22648
|
+
} else {
|
|
22649
|
+
return onInputChange();
|
|
22650
|
+
}
|
|
22651
|
+
};
|
|
22652
|
+
const handleClickOutside = (event) => {
|
|
22653
|
+
expanded.value = false;
|
|
22654
|
+
if (isFocused.value) {
|
|
22655
|
+
const _event = new FocusEvent("focus", event);
|
|
22656
|
+
handleBlur(_event);
|
|
22657
|
+
}
|
|
22658
|
+
};
|
|
22659
|
+
const handleMenuEnter = () => {
|
|
22660
|
+
states.isBeforeHide = false;
|
|
22661
|
+
return nextTick(() => {
|
|
22662
|
+
if (~indexRef.value) {
|
|
22663
|
+
scrollToItem(states.hoveringIndex);
|
|
22664
|
+
}
|
|
22665
|
+
});
|
|
22666
|
+
};
|
|
22667
|
+
const scrollToItem = (index) => {
|
|
22668
|
+
menuRef.value.scrollToItem(index);
|
|
22669
|
+
};
|
|
22670
|
+
const getOption = (value, cachedOptions) => {
|
|
22671
|
+
const selectValue = getValueKey(value);
|
|
22672
|
+
if (allOptionsValueMap.value.has(selectValue)) {
|
|
22673
|
+
const { option } = allOptionsValueMap.value.get(selectValue);
|
|
22674
|
+
return option;
|
|
22675
|
+
}
|
|
22676
|
+
if (cachedOptions && cachedOptions.length) {
|
|
22677
|
+
const option = cachedOptions.find((option2) => getValueKey(getValue(option2)) === selectValue);
|
|
22678
|
+
if (option) {
|
|
22679
|
+
return option;
|
|
22680
|
+
}
|
|
22681
|
+
}
|
|
22682
|
+
return {
|
|
22683
|
+
[aliasProps.value.value]: value,
|
|
22684
|
+
[aliasProps.value.label]: value
|
|
22685
|
+
};
|
|
22686
|
+
};
|
|
22687
|
+
const initStates = (needUpdateSelectedLabel = false) => {
|
|
22688
|
+
if (props.multiple) {
|
|
22689
|
+
if (props.modelValue.length > 0) {
|
|
22690
|
+
const cachedOptions = states.cachedOptions.slice();
|
|
22691
|
+
states.cachedOptions.length = 0;
|
|
22692
|
+
states.previousValue = props.modelValue.toString();
|
|
22693
|
+
for (const value of props.modelValue) {
|
|
22694
|
+
const option = getOption(value, cachedOptions);
|
|
22695
|
+
states.cachedOptions.push(option);
|
|
22696
|
+
}
|
|
22697
|
+
} else {
|
|
22698
|
+
states.cachedOptions = [];
|
|
22699
|
+
states.previousValue = void 0;
|
|
22700
|
+
}
|
|
22701
|
+
} else {
|
|
22702
|
+
if (hasModelValue.value) {
|
|
22703
|
+
states.previousValue = props.modelValue;
|
|
22704
|
+
const options = filteredOptions.value;
|
|
22705
|
+
const selectedItemIndex = options.findIndex((option) => getValueKey(getValue(option)) === getValueKey(props.modelValue));
|
|
22706
|
+
if (~selectedItemIndex) {
|
|
22707
|
+
states.selectedLabel = getLabel(options[selectedItemIndex]);
|
|
22708
|
+
} else {
|
|
22709
|
+
if (!states.selectedLabel || needUpdateSelectedLabel) {
|
|
22710
|
+
states.selectedLabel = getValueKey(props.modelValue);
|
|
22711
|
+
}
|
|
22712
|
+
}
|
|
22713
|
+
} else {
|
|
22714
|
+
states.selectedLabel = "";
|
|
22715
|
+
states.previousValue = void 0;
|
|
22716
|
+
}
|
|
22717
|
+
}
|
|
22718
|
+
clearAllNewOption();
|
|
22719
|
+
calculatePopperSize();
|
|
22720
|
+
};
|
|
22721
|
+
watch(() => props.fitInputWidth, () => {
|
|
22722
|
+
calculatePopperSize();
|
|
22723
|
+
});
|
|
22724
|
+
watch(expanded, (val) => {
|
|
22725
|
+
if (val) {
|
|
22726
|
+
if (!props.persistent) {
|
|
22727
|
+
calculatePopperSize();
|
|
22728
|
+
}
|
|
22729
|
+
handleQueryChange("");
|
|
22730
|
+
} else {
|
|
22731
|
+
states.inputValue = "";
|
|
22732
|
+
states.previousQuery = null;
|
|
22733
|
+
states.isBeforeHide = true;
|
|
22734
|
+
createNewOption("");
|
|
22735
|
+
}
|
|
22736
|
+
emit("visible-change", val);
|
|
22737
|
+
});
|
|
22738
|
+
watch(() => props.modelValue, (val, oldVal) => {
|
|
22739
|
+
var _a;
|
|
22740
|
+
const isValEmpty = !val || isArray$1(val) && val.length === 0;
|
|
22741
|
+
if (isValEmpty || props.multiple && !isEqual$1(val.toString(), states.previousValue) || !props.multiple && getValueKey(val) !== getValueKey(states.previousValue)) {
|
|
22742
|
+
initStates(true);
|
|
22743
|
+
}
|
|
22744
|
+
if (!isEqual$1(val, oldVal) && props.validateEvent) {
|
|
22745
|
+
(_a = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a.call(elFormItem, "change").catch((err) => debugWarn());
|
|
22746
|
+
}
|
|
22747
|
+
}, {
|
|
22748
|
+
deep: true
|
|
22749
|
+
});
|
|
22750
|
+
watch(() => props.options, () => {
|
|
22751
|
+
const input = inputRef.value;
|
|
22752
|
+
if (!input || input && document.activeElement !== input) {
|
|
22753
|
+
initStates();
|
|
22754
|
+
}
|
|
22755
|
+
}, {
|
|
22756
|
+
deep: true,
|
|
22757
|
+
flush: "post"
|
|
22758
|
+
});
|
|
22759
|
+
watch(() => filteredOptions.value, () => {
|
|
22760
|
+
calculatePopperSize();
|
|
22761
|
+
return menuRef.value && nextTick(menuRef.value.resetScrollTop);
|
|
22762
|
+
});
|
|
22763
|
+
watchEffect(() => {
|
|
22764
|
+
if (states.isBeforeHide)
|
|
22765
|
+
return;
|
|
22766
|
+
updateOptions();
|
|
22767
|
+
});
|
|
22768
|
+
watchEffect(() => {
|
|
22769
|
+
const { valueKey, options } = props;
|
|
22770
|
+
const duplicateValue = /* @__PURE__ */ new Map();
|
|
22771
|
+
for (const item of options) {
|
|
22772
|
+
const optionValue = getValue(item);
|
|
22773
|
+
let v = optionValue;
|
|
22774
|
+
if (isObject$1(v)) {
|
|
22775
|
+
v = get(optionValue, valueKey);
|
|
22776
|
+
}
|
|
22777
|
+
if (duplicateValue.get(v)) {
|
|
22778
|
+
break;
|
|
22779
|
+
} else {
|
|
22780
|
+
duplicateValue.set(v, true);
|
|
22781
|
+
}
|
|
22782
|
+
}
|
|
22783
|
+
});
|
|
22784
|
+
onMounted(() => {
|
|
22785
|
+
initStates();
|
|
22786
|
+
});
|
|
22787
|
+
useResizeObserver(selectRef, handleResize);
|
|
22788
|
+
useResizeObserver(selectionRef, resetSelectionWidth);
|
|
22789
|
+
useResizeObserver(menuRef, updateTooltip);
|
|
22790
|
+
useResizeObserver(wrapperRef, updateTooltip);
|
|
22791
|
+
useResizeObserver(tagMenuRef, updateTagTooltip);
|
|
22792
|
+
useResizeObserver(collapseItemRef, resetCollapseItemWidth);
|
|
22793
|
+
return {
|
|
22794
|
+
inputId,
|
|
22795
|
+
collapseTagSize,
|
|
22796
|
+
currentPlaceholder,
|
|
22797
|
+
expanded,
|
|
22798
|
+
emptyText,
|
|
22799
|
+
popupHeight,
|
|
22800
|
+
debounce: debounce$1,
|
|
22801
|
+
allOptions,
|
|
22802
|
+
filteredOptions,
|
|
22803
|
+
iconComponent,
|
|
22804
|
+
iconReverse,
|
|
22805
|
+
tagStyle,
|
|
22806
|
+
collapseTagStyle,
|
|
22807
|
+
popperSize,
|
|
22808
|
+
dropdownMenuVisible,
|
|
22809
|
+
hasModelValue,
|
|
22810
|
+
shouldShowPlaceholder,
|
|
22811
|
+
selectDisabled,
|
|
22812
|
+
selectSize,
|
|
22813
|
+
needStatusIcon,
|
|
22814
|
+
showClearBtn,
|
|
22815
|
+
states,
|
|
22816
|
+
isFocused,
|
|
22817
|
+
nsSelect,
|
|
22818
|
+
nsInput,
|
|
22819
|
+
inputRef,
|
|
22820
|
+
menuRef,
|
|
22821
|
+
tagMenuRef,
|
|
22822
|
+
tooltipRef,
|
|
22823
|
+
tagTooltipRef,
|
|
22824
|
+
selectRef,
|
|
22825
|
+
wrapperRef,
|
|
22826
|
+
selectionRef,
|
|
22827
|
+
prefixRef,
|
|
22828
|
+
suffixRef,
|
|
22829
|
+
collapseItemRef,
|
|
22830
|
+
popperRef,
|
|
22831
|
+
validateState,
|
|
22832
|
+
validateIcon,
|
|
22833
|
+
showTagList,
|
|
22834
|
+
collapseTagList,
|
|
22835
|
+
debouncedOnInputChange,
|
|
22836
|
+
deleteTag,
|
|
22837
|
+
getLabel,
|
|
22838
|
+
getValue,
|
|
22839
|
+
getDisabled,
|
|
22840
|
+
getValueKey,
|
|
22841
|
+
handleClear,
|
|
22842
|
+
handleClickOutside,
|
|
22843
|
+
handleDel,
|
|
22844
|
+
handleEsc,
|
|
22845
|
+
focus,
|
|
22846
|
+
blur,
|
|
22847
|
+
handleMenuEnter,
|
|
22848
|
+
handleResize,
|
|
22849
|
+
resetSelectionWidth,
|
|
22850
|
+
updateTooltip,
|
|
22851
|
+
updateTagTooltip,
|
|
22852
|
+
updateOptions,
|
|
22853
|
+
toggleMenu,
|
|
22854
|
+
scrollTo: scrollToItem,
|
|
22855
|
+
onInput,
|
|
22856
|
+
onKeyboardNavigate,
|
|
22857
|
+
onKeyboardSelect,
|
|
22858
|
+
onSelect,
|
|
22859
|
+
onHover: onHoverOption,
|
|
22860
|
+
handleCompositionStart,
|
|
22861
|
+
handleCompositionEnd,
|
|
22862
|
+
handleCompositionUpdate
|
|
22863
|
+
};
|
|
22864
|
+
};
|
|
22865
|
+
|
|
22866
|
+
const _sfc_main$d = defineComponent({
|
|
22867
|
+
name: "ElSelectV2",
|
|
22868
|
+
components: {
|
|
22869
|
+
ElSelectMenu,
|
|
22870
|
+
ElTag,
|
|
22871
|
+
ElTooltip,
|
|
22872
|
+
ElIcon
|
|
22873
|
+
},
|
|
22874
|
+
directives: { ClickOutside },
|
|
22875
|
+
props: SelectProps,
|
|
22876
|
+
emits: selectEmits,
|
|
22877
|
+
setup(props, { emit }) {
|
|
22878
|
+
const modelValue = computed(() => {
|
|
22879
|
+
const { modelValue: rawModelValue, multiple } = props;
|
|
22880
|
+
const fallback = multiple ? [] : void 0;
|
|
22881
|
+
if (isArray$1(rawModelValue)) {
|
|
22882
|
+
return multiple ? rawModelValue : fallback;
|
|
22883
|
+
}
|
|
22884
|
+
return multiple ? fallback : rawModelValue;
|
|
22885
|
+
});
|
|
22886
|
+
const API = useSelect(reactive({
|
|
22887
|
+
...toRefs(props),
|
|
22888
|
+
modelValue
|
|
22889
|
+
}), emit);
|
|
22890
|
+
const { calculatorRef, inputStyle } = useCalcInputWidth();
|
|
22891
|
+
provide(selectV2InjectionKey, {
|
|
22892
|
+
props: reactive({
|
|
22893
|
+
...toRefs(props),
|
|
22894
|
+
height: API.popupHeight,
|
|
22895
|
+
modelValue
|
|
22896
|
+
}),
|
|
22897
|
+
expanded: API.expanded,
|
|
22898
|
+
tooltipRef: API.tooltipRef,
|
|
22899
|
+
onSelect: API.onSelect,
|
|
22900
|
+
onHover: API.onHover,
|
|
22901
|
+
onKeyboardNavigate: API.onKeyboardNavigate,
|
|
22902
|
+
onKeyboardSelect: API.onKeyboardSelect
|
|
22903
|
+
});
|
|
22904
|
+
const selectedLabel = computed(() => {
|
|
22905
|
+
if (!props.multiple) {
|
|
22906
|
+
return API.states.selectedLabel;
|
|
22907
|
+
}
|
|
22908
|
+
return API.states.cachedOptions.map((i) => i.label);
|
|
22909
|
+
});
|
|
22910
|
+
return {
|
|
22911
|
+
...API,
|
|
22912
|
+
modelValue,
|
|
22913
|
+
selectedLabel,
|
|
22914
|
+
calculatorRef,
|
|
22915
|
+
inputStyle
|
|
22916
|
+
};
|
|
22917
|
+
}
|
|
22918
|
+
});
|
|
22919
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
22920
|
+
const _component_el_tag = resolveComponent("el-tag");
|
|
22921
|
+
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
22922
|
+
const _component_el_icon = resolveComponent("el-icon");
|
|
22923
|
+
const _component_el_select_menu = resolveComponent("el-select-menu");
|
|
22924
|
+
const _directive_click_outside = resolveDirective("click-outside");
|
|
22925
|
+
return withDirectives((openBlock(), createElementBlock("div", {
|
|
22926
|
+
ref: "selectRef",
|
|
22927
|
+
class: normalizeClass([_ctx.nsSelect.b(), _ctx.nsSelect.m(_ctx.selectSize)]),
|
|
22928
|
+
onMouseenter: ($event) => _ctx.states.inputHovering = true,
|
|
22929
|
+
onMouseleave: ($event) => _ctx.states.inputHovering = false
|
|
22930
|
+
}, [
|
|
22931
|
+
createVNode(_component_el_tooltip, {
|
|
22932
|
+
ref: "tooltipRef",
|
|
22933
|
+
visible: _ctx.dropdownMenuVisible,
|
|
22934
|
+
teleported: _ctx.teleported,
|
|
22935
|
+
"popper-class": [_ctx.nsSelect.e("popper"), _ctx.popperClass],
|
|
22936
|
+
"gpu-acceleration": false,
|
|
22937
|
+
"stop-popper-mouse-event": false,
|
|
22938
|
+
"popper-options": _ctx.popperOptions,
|
|
22939
|
+
"fallback-placements": _ctx.fallbackPlacements,
|
|
22940
|
+
effect: _ctx.effect,
|
|
22941
|
+
placement: _ctx.placement,
|
|
22942
|
+
pure: "",
|
|
22943
|
+
transition: `${_ctx.nsSelect.namespace.value}-zoom-in-top`,
|
|
22944
|
+
trigger: "click",
|
|
22945
|
+
persistent: _ctx.persistent,
|
|
22946
|
+
"append-to": _ctx.appendTo,
|
|
22947
|
+
"show-arrow": _ctx.showArrow,
|
|
22948
|
+
offset: _ctx.offset,
|
|
22949
|
+
onBeforeShow: _ctx.handleMenuEnter,
|
|
22950
|
+
onHide: ($event) => _ctx.states.isBeforeHide = false
|
|
22951
|
+
}, {
|
|
22952
|
+
default: withCtx(() => [
|
|
22953
|
+
createElementVNode("div", {
|
|
22954
|
+
ref: "wrapperRef",
|
|
22955
|
+
class: normalizeClass([
|
|
22956
|
+
_ctx.nsSelect.e("wrapper"),
|
|
22957
|
+
_ctx.nsSelect.is("focused", _ctx.isFocused),
|
|
22958
|
+
_ctx.nsSelect.is("hovering", _ctx.states.inputHovering),
|
|
22959
|
+
_ctx.nsSelect.is("filterable", _ctx.filterable),
|
|
22960
|
+
_ctx.nsSelect.is("disabled", _ctx.selectDisabled)
|
|
22961
|
+
]),
|
|
22962
|
+
onClick: withModifiers(_ctx.toggleMenu, ["prevent"])
|
|
22963
|
+
}, [
|
|
22964
|
+
_ctx.$slots.prefix ? (openBlock(), createElementBlock("div", {
|
|
22965
|
+
key: 0,
|
|
22966
|
+
ref: "prefixRef",
|
|
22967
|
+
class: normalizeClass(_ctx.nsSelect.e("prefix"))
|
|
22968
|
+
}, [
|
|
22969
|
+
renderSlot(_ctx.$slots, "prefix")
|
|
22970
|
+
], 2)) : createCommentVNode("v-if", true),
|
|
22971
|
+
createElementVNode("div", {
|
|
22972
|
+
ref: "selectionRef",
|
|
22973
|
+
class: normalizeClass([
|
|
22974
|
+
_ctx.nsSelect.e("selection"),
|
|
22975
|
+
_ctx.nsSelect.is("near", _ctx.multiple && !_ctx.$slots.prefix && !!_ctx.modelValue.length)
|
|
22976
|
+
])
|
|
22977
|
+
}, [
|
|
22978
|
+
_ctx.multiple ? renderSlot(_ctx.$slots, "tag", { key: 0 }, () => [
|
|
22979
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.showTagList, (item) => {
|
|
22980
|
+
return openBlock(), createElementBlock("div", {
|
|
22981
|
+
key: _ctx.getValueKey(_ctx.getValue(item)),
|
|
22982
|
+
class: normalizeClass(_ctx.nsSelect.e("selected-item"))
|
|
22983
|
+
}, [
|
|
22984
|
+
createVNode(_component_el_tag, {
|
|
22985
|
+
closable: !_ctx.selectDisabled && !_ctx.getDisabled(item),
|
|
22986
|
+
size: _ctx.collapseTagSize,
|
|
22987
|
+
type: _ctx.tagType,
|
|
22988
|
+
effect: _ctx.tagEffect,
|
|
22989
|
+
"disable-transitions": "",
|
|
22990
|
+
style: normalizeStyle(_ctx.tagStyle),
|
|
22991
|
+
onClose: ($event) => _ctx.deleteTag($event, item)
|
|
22992
|
+
}, {
|
|
22993
|
+
default: withCtx(() => [
|
|
22994
|
+
createElementVNode("span", {
|
|
22995
|
+
class: normalizeClass(_ctx.nsSelect.e("tags-text"))
|
|
22996
|
+
}, [
|
|
22997
|
+
renderSlot(_ctx.$slots, "label", {
|
|
22998
|
+
label: _ctx.getLabel(item),
|
|
22999
|
+
value: _ctx.getValue(item)
|
|
23000
|
+
}, () => [
|
|
23001
|
+
createTextVNode(toDisplayString(_ctx.getLabel(item)), 1)
|
|
23002
|
+
])
|
|
23003
|
+
], 2)
|
|
23004
|
+
]),
|
|
23005
|
+
_: 2
|
|
23006
|
+
}, 1032, ["closable", "size", "type", "effect", "style", "onClose"])
|
|
23007
|
+
], 2);
|
|
23008
|
+
}), 128)),
|
|
23009
|
+
_ctx.collapseTags && _ctx.modelValue.length > _ctx.maxCollapseTags ? (openBlock(), createBlock(_component_el_tooltip, {
|
|
23010
|
+
key: 0,
|
|
23011
|
+
ref: "tagTooltipRef",
|
|
23012
|
+
disabled: _ctx.dropdownMenuVisible || !_ctx.collapseTagsTooltip,
|
|
23013
|
+
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
23014
|
+
effect: _ctx.effect,
|
|
23015
|
+
placement: "bottom",
|
|
23016
|
+
teleported: _ctx.teleported
|
|
23017
|
+
}, {
|
|
23018
|
+
default: withCtx(() => [
|
|
23019
|
+
createElementVNode("div", {
|
|
23020
|
+
ref: "collapseItemRef",
|
|
23021
|
+
class: normalizeClass(_ctx.nsSelect.e("selected-item"))
|
|
23022
|
+
}, [
|
|
23023
|
+
createVNode(_component_el_tag, {
|
|
23024
|
+
closable: false,
|
|
23025
|
+
size: _ctx.collapseTagSize,
|
|
23026
|
+
type: _ctx.tagType,
|
|
23027
|
+
effect: _ctx.tagEffect,
|
|
23028
|
+
style: normalizeStyle(_ctx.collapseTagStyle),
|
|
23029
|
+
"disable-transitions": ""
|
|
23030
|
+
}, {
|
|
23031
|
+
default: withCtx(() => [
|
|
23032
|
+
createElementVNode("span", {
|
|
23033
|
+
class: normalizeClass(_ctx.nsSelect.e("tags-text"))
|
|
23034
|
+
}, " + " + toDisplayString(_ctx.modelValue.length - _ctx.maxCollapseTags), 3)
|
|
23035
|
+
]),
|
|
23036
|
+
_: 1
|
|
23037
|
+
}, 8, ["size", "type", "effect", "style"])
|
|
23038
|
+
], 2)
|
|
23039
|
+
]),
|
|
23040
|
+
content: withCtx(() => [
|
|
23041
|
+
createElementVNode("div", {
|
|
23042
|
+
ref: "tagMenuRef",
|
|
23043
|
+
class: normalizeClass(_ctx.nsSelect.e("selection"))
|
|
23044
|
+
}, [
|
|
23045
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.collapseTagList, (selected) => {
|
|
23046
|
+
return openBlock(), createElementBlock("div", {
|
|
23047
|
+
key: _ctx.getValueKey(_ctx.getValue(selected)),
|
|
23048
|
+
class: normalizeClass(_ctx.nsSelect.e("selected-item"))
|
|
23049
|
+
}, [
|
|
23050
|
+
createVNode(_component_el_tag, {
|
|
23051
|
+
class: "in-tooltip",
|
|
23052
|
+
closable: !_ctx.selectDisabled && !_ctx.getDisabled(selected),
|
|
23053
|
+
size: _ctx.collapseTagSize,
|
|
23054
|
+
type: _ctx.tagType,
|
|
23055
|
+
effect: _ctx.tagEffect,
|
|
23056
|
+
"disable-transitions": "",
|
|
23057
|
+
onClose: ($event) => _ctx.deleteTag($event, selected)
|
|
23058
|
+
}, {
|
|
23059
|
+
default: withCtx(() => [
|
|
23060
|
+
createElementVNode("span", {
|
|
23061
|
+
class: normalizeClass(_ctx.nsSelect.e("tags-text"))
|
|
23062
|
+
}, [
|
|
23063
|
+
renderSlot(_ctx.$slots, "label", {
|
|
23064
|
+
label: _ctx.getLabel(selected),
|
|
23065
|
+
value: _ctx.getValue(selected)
|
|
23066
|
+
}, () => [
|
|
23067
|
+
createTextVNode(toDisplayString(_ctx.getLabel(selected)), 1)
|
|
23068
|
+
])
|
|
23069
|
+
], 2)
|
|
23070
|
+
]),
|
|
23071
|
+
_: 2
|
|
23072
|
+
}, 1032, ["closable", "size", "type", "effect", "onClose"])
|
|
23073
|
+
], 2);
|
|
23074
|
+
}), 128))
|
|
23075
|
+
], 2)
|
|
23076
|
+
]),
|
|
23077
|
+
_: 3
|
|
23078
|
+
}, 8, ["disabled", "effect", "teleported"])) : createCommentVNode("v-if", true)
|
|
23079
|
+
]) : createCommentVNode("v-if", true),
|
|
23080
|
+
createElementVNode("div", {
|
|
23081
|
+
class: normalizeClass([
|
|
23082
|
+
_ctx.nsSelect.e("selected-item"),
|
|
23083
|
+
_ctx.nsSelect.e("input-wrapper"),
|
|
23084
|
+
_ctx.nsSelect.is("hidden", !_ctx.filterable)
|
|
23085
|
+
])
|
|
23086
|
+
}, [
|
|
23087
|
+
withDirectives(createElementVNode("input", {
|
|
23088
|
+
id: _ctx.inputId,
|
|
23089
|
+
ref: "inputRef",
|
|
23090
|
+
"onUpdate:modelValue": ($event) => _ctx.states.inputValue = $event,
|
|
23091
|
+
style: normalizeStyle(_ctx.inputStyle),
|
|
23092
|
+
autocomplete: _ctx.autocomplete,
|
|
23093
|
+
tabindex: _ctx.tabindex,
|
|
23094
|
+
"aria-autocomplete": "list",
|
|
23095
|
+
"aria-haspopup": "listbox",
|
|
23096
|
+
autocapitalize: "off",
|
|
23097
|
+
"aria-expanded": _ctx.expanded,
|
|
23098
|
+
"aria-label": _ctx.ariaLabel,
|
|
23099
|
+
class: normalizeClass([_ctx.nsSelect.e("input"), _ctx.nsSelect.is(_ctx.selectSize)]),
|
|
23100
|
+
disabled: _ctx.selectDisabled,
|
|
23101
|
+
role: "combobox",
|
|
23102
|
+
readonly: !_ctx.filterable,
|
|
23103
|
+
spellcheck: "false",
|
|
23104
|
+
type: "text",
|
|
23105
|
+
name: _ctx.name,
|
|
23106
|
+
onInput: _ctx.onInput,
|
|
23107
|
+
onCompositionstart: _ctx.handleCompositionStart,
|
|
23108
|
+
onCompositionupdate: _ctx.handleCompositionUpdate,
|
|
23109
|
+
onCompositionend: _ctx.handleCompositionEnd,
|
|
23110
|
+
onKeydown: [
|
|
23111
|
+
withKeys(withModifiers(($event) => _ctx.onKeyboardNavigate("backward"), ["stop", "prevent"]), ["up"]),
|
|
23112
|
+
withKeys(withModifiers(($event) => _ctx.onKeyboardNavigate("forward"), ["stop", "prevent"]), ["down"]),
|
|
23113
|
+
withKeys(withModifiers(_ctx.onKeyboardSelect, ["stop", "prevent"]), ["enter"]),
|
|
23114
|
+
withKeys(withModifiers(_ctx.handleEsc, ["stop", "prevent"]), ["esc"]),
|
|
23115
|
+
withKeys(withModifiers(_ctx.handleDel, ["stop"]), ["delete"])
|
|
23116
|
+
],
|
|
23117
|
+
onClick: withModifiers(_ctx.toggleMenu, ["stop"])
|
|
23118
|
+
}, null, 46, ["id", "onUpdate:modelValue", "autocomplete", "tabindex", "aria-expanded", "aria-label", "disabled", "readonly", "name", "onInput", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onKeydown", "onClick"]), [
|
|
23119
|
+
[vModelText, _ctx.states.inputValue]
|
|
23120
|
+
]),
|
|
23121
|
+
_ctx.filterable ? (openBlock(), createElementBlock("span", {
|
|
23122
|
+
key: 0,
|
|
23123
|
+
ref: "calculatorRef",
|
|
23124
|
+
"aria-hidden": "true",
|
|
23125
|
+
class: normalizeClass(_ctx.nsSelect.e("input-calculator")),
|
|
23126
|
+
textContent: toDisplayString(_ctx.states.inputValue)
|
|
23127
|
+
}, null, 10, ["textContent"])) : createCommentVNode("v-if", true)
|
|
23128
|
+
], 2),
|
|
23129
|
+
_ctx.shouldShowPlaceholder ? (openBlock(), createElementBlock("div", {
|
|
23130
|
+
key: 1,
|
|
23131
|
+
class: normalizeClass([
|
|
23132
|
+
_ctx.nsSelect.e("selected-item"),
|
|
23133
|
+
_ctx.nsSelect.e("placeholder"),
|
|
23134
|
+
_ctx.nsSelect.is("transparent", !_ctx.hasModelValue || _ctx.expanded && !_ctx.states.inputValue)
|
|
23135
|
+
])
|
|
23136
|
+
}, [
|
|
23137
|
+
_ctx.hasModelValue ? renderSlot(_ctx.$slots, "label", {
|
|
23138
|
+
key: 0,
|
|
23139
|
+
label: _ctx.currentPlaceholder,
|
|
23140
|
+
value: _ctx.modelValue
|
|
23141
|
+
}, () => [
|
|
23142
|
+
createElementVNode("span", null, toDisplayString(_ctx.currentPlaceholder), 1)
|
|
23143
|
+
]) : (openBlock(), createElementBlock("span", { key: 1 }, toDisplayString(_ctx.currentPlaceholder), 1))
|
|
23144
|
+
], 2)) : createCommentVNode("v-if", true)
|
|
23145
|
+
], 2),
|
|
23146
|
+
createElementVNode("div", {
|
|
23147
|
+
ref: "suffixRef",
|
|
23148
|
+
class: normalizeClass(_ctx.nsSelect.e("suffix"))
|
|
23149
|
+
}, [
|
|
23150
|
+
_ctx.iconComponent ? withDirectives((openBlock(), createBlock(_component_el_icon, {
|
|
23151
|
+
key: 0,
|
|
23152
|
+
class: normalizeClass([_ctx.nsSelect.e("caret"), _ctx.nsInput.e("icon"), _ctx.iconReverse])
|
|
23153
|
+
}, {
|
|
23154
|
+
default: withCtx(() => [
|
|
23155
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))
|
|
23156
|
+
]),
|
|
23157
|
+
_: 1
|
|
23158
|
+
}, 8, ["class"])), [
|
|
23159
|
+
[vShow, !_ctx.showClearBtn]
|
|
23160
|
+
]) : createCommentVNode("v-if", true),
|
|
23161
|
+
_ctx.showClearBtn && _ctx.clearIcon ? (openBlock(), createBlock(_component_el_icon, {
|
|
23162
|
+
key: 1,
|
|
23163
|
+
class: normalizeClass([
|
|
23164
|
+
_ctx.nsSelect.e("caret"),
|
|
23165
|
+
_ctx.nsInput.e("icon"),
|
|
23166
|
+
_ctx.nsSelect.e("clear")
|
|
23167
|
+
]),
|
|
23168
|
+
onClick: withModifiers(_ctx.handleClear, ["prevent", "stop"])
|
|
23169
|
+
}, {
|
|
23170
|
+
default: withCtx(() => [
|
|
23171
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))
|
|
23172
|
+
]),
|
|
23173
|
+
_: 1
|
|
23174
|
+
}, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
|
|
23175
|
+
_ctx.validateState && _ctx.validateIcon && _ctx.needStatusIcon ? (openBlock(), createBlock(_component_el_icon, {
|
|
23176
|
+
key: 2,
|
|
23177
|
+
class: normalizeClass([
|
|
23178
|
+
_ctx.nsInput.e("icon"),
|
|
23179
|
+
_ctx.nsInput.e("validateIcon"),
|
|
23180
|
+
_ctx.nsInput.is("loading", _ctx.validateState === "validating")
|
|
23181
|
+
])
|
|
23182
|
+
}, {
|
|
23183
|
+
default: withCtx(() => [
|
|
23184
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.validateIcon)))
|
|
23185
|
+
]),
|
|
23186
|
+
_: 1
|
|
23187
|
+
}, 8, ["class"])) : createCommentVNode("v-if", true)
|
|
23188
|
+
], 2)
|
|
23189
|
+
], 10, ["onClick"])
|
|
23190
|
+
]),
|
|
23191
|
+
content: withCtx(() => [
|
|
23192
|
+
createVNode(_component_el_select_menu, {
|
|
23193
|
+
ref: "menuRef",
|
|
23194
|
+
data: _ctx.filteredOptions,
|
|
23195
|
+
width: _ctx.popperSize,
|
|
23196
|
+
"hovering-index": _ctx.states.hoveringIndex,
|
|
23197
|
+
"scrollbar-always-on": _ctx.scrollbarAlwaysOn
|
|
23198
|
+
}, createSlots({
|
|
23199
|
+
default: withCtx((scope) => [
|
|
23200
|
+
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(scope)))
|
|
23201
|
+
]),
|
|
23202
|
+
_: 2
|
|
23203
|
+
}, [
|
|
23204
|
+
_ctx.$slots.header ? {
|
|
23205
|
+
name: "header",
|
|
23206
|
+
fn: withCtx(() => [
|
|
23207
|
+
createElementVNode("div", {
|
|
23208
|
+
class: normalizeClass(_ctx.nsSelect.be("dropdown", "header"))
|
|
23209
|
+
}, [
|
|
23210
|
+
renderSlot(_ctx.$slots, "header")
|
|
23211
|
+
], 2)
|
|
23212
|
+
])
|
|
23213
|
+
} : void 0,
|
|
23214
|
+
_ctx.$slots.loading && _ctx.loading ? {
|
|
23215
|
+
name: "loading",
|
|
23216
|
+
fn: withCtx(() => [
|
|
23217
|
+
createElementVNode("div", {
|
|
23218
|
+
class: normalizeClass(_ctx.nsSelect.be("dropdown", "loading"))
|
|
23219
|
+
}, [
|
|
23220
|
+
renderSlot(_ctx.$slots, "loading")
|
|
23221
|
+
], 2)
|
|
23222
|
+
])
|
|
23223
|
+
} : _ctx.loading || _ctx.filteredOptions.length === 0 ? {
|
|
23224
|
+
name: "empty",
|
|
23225
|
+
fn: withCtx(() => [
|
|
23226
|
+
createElementVNode("div", {
|
|
23227
|
+
class: normalizeClass(_ctx.nsSelect.be("dropdown", "empty"))
|
|
23228
|
+
}, [
|
|
23229
|
+
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
23230
|
+
createElementVNode("span", null, toDisplayString(_ctx.emptyText), 1)
|
|
23231
|
+
])
|
|
23232
|
+
], 2)
|
|
23233
|
+
])
|
|
23234
|
+
} : void 0,
|
|
23235
|
+
_ctx.$slots.footer ? {
|
|
23236
|
+
name: "footer",
|
|
23237
|
+
fn: withCtx(() => [
|
|
23238
|
+
createElementVNode("div", {
|
|
23239
|
+
class: normalizeClass(_ctx.nsSelect.be("dropdown", "footer"))
|
|
23240
|
+
}, [
|
|
23241
|
+
renderSlot(_ctx.$slots, "footer")
|
|
23242
|
+
], 2)
|
|
23243
|
+
])
|
|
23244
|
+
} : void 0
|
|
23245
|
+
]), 1032, ["data", "width", "hovering-index", "scrollbar-always-on"])
|
|
23246
|
+
]),
|
|
23247
|
+
_: 3
|
|
23248
|
+
}, 8, ["visible", "teleported", "popper-class", "popper-options", "fallback-placements", "effect", "placement", "transition", "persistent", "append-to", "show-arrow", "offset", "onBeforeShow", "onHide"])
|
|
23249
|
+
], 42, ["onMouseenter", "onMouseleave"])), [
|
|
23250
|
+
[_directive_click_outside, _ctx.handleClickOutside, _ctx.popperRef]
|
|
23251
|
+
]);
|
|
23252
|
+
}
|
|
23253
|
+
var Select = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render], ["__file", "select.vue"]]);
|
|
23254
|
+
|
|
23255
|
+
const ElSelectV2 = withInstall(Select);
|
|
23256
|
+
|
|
23257
|
+
const _hoisted_1$a = ["onClick"];
|
|
23258
|
+
const _hoisted_2$9 = { class: "hzzt-dropdown-name" };
|
|
23259
|
+
const _hoisted_3$6 = /* @__PURE__ */ createElementVNode("span", { class: "caret" }, null, -1);
|
|
23260
|
+
const _hoisted_4$5 = { class: "hzzt-dropdown-menu" };
|
|
23261
|
+
const _hoisted_5$3 = ["onClick"];
|
|
23262
|
+
const _hoisted_6$3 = { class: "submenu" };
|
|
23263
|
+
const _hoisted_7$3 = ["onClick"];
|
|
23264
|
+
const __default__$b = defineComponent({
|
|
23265
|
+
name: "HzztDropDown"
|
|
23266
|
+
});
|
|
23267
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
23268
|
+
...__default__$b,
|
|
23269
|
+
props: {
|
|
23270
|
+
options: {
|
|
23271
|
+
type: definePropType$1(Array),
|
|
23272
|
+
default: () => []
|
|
23273
|
+
},
|
|
23274
|
+
label: String,
|
|
23275
|
+
value: String,
|
|
23276
|
+
defaultValue: {
|
|
23277
|
+
type: Array,
|
|
23278
|
+
default: () => []
|
|
23279
|
+
},
|
|
23280
|
+
position: {
|
|
23281
|
+
type: String,
|
|
23282
|
+
default: "right"
|
|
23283
|
+
},
|
|
23284
|
+
props: {
|
|
23285
|
+
type: Object,
|
|
23286
|
+
default: () => ({
|
|
23287
|
+
children: "children",
|
|
23288
|
+
label: "label",
|
|
23289
|
+
value: "value"
|
|
23290
|
+
})
|
|
23291
|
+
},
|
|
23292
|
+
returnType: {
|
|
23293
|
+
type: String,
|
|
23294
|
+
default: "Array"
|
|
23295
|
+
}
|
|
23296
|
+
},
|
|
23297
|
+
emits: ["change"],
|
|
23298
|
+
setup(__props, { emit: emits }) {
|
|
23299
|
+
const dProps = __props;
|
|
23300
|
+
const toggle = ref(false);
|
|
23301
|
+
function dropToggle() {
|
|
23302
|
+
toggle.value = !toggle.value;
|
|
23303
|
+
}
|
|
23304
|
+
function close() {
|
|
23305
|
+
toggle.value = false;
|
|
23306
|
+
}
|
|
23307
|
+
function selectValue(val) {
|
|
23308
|
+
if (dProps.returnType === "Array") {
|
|
23309
|
+
emits("change", val);
|
|
23310
|
+
}
|
|
23311
|
+
if (dProps.returnType === "String") {
|
|
23312
|
+
emits("change", val[val.length - 1]);
|
|
23313
|
+
}
|
|
23314
|
+
}
|
|
23315
|
+
return (_ctx, _cache) => {
|
|
23316
|
+
return withDirectives((openBlock(), createElementBlock("ul", {
|
|
23317
|
+
class: "hzzt-dropdown",
|
|
23318
|
+
onClick: withModifiers(dropToggle, ["stop"])
|
|
23319
|
+
}, [
|
|
23320
|
+
createElementVNode("li", {
|
|
23321
|
+
class: normalizeClass({ "hzzt-dropdown-li": true, "hzzt-dropdown-li-show": toggle.value })
|
|
23322
|
+
}, [
|
|
23323
|
+
createElementVNode("span", _hoisted_2$9, toDisplayString(__props.label), 1),
|
|
23324
|
+
_hoisted_3$6,
|
|
23325
|
+
createElementVNode("ul", _hoisted_4$5, [
|
|
23326
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option, index) => {
|
|
23327
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
23328
|
+
unref(isEmpty)(option[__props.props.children]) ? (openBlock(), createElementBlock("li", {
|
|
23329
|
+
key: index,
|
|
23330
|
+
class: normalizeClass({
|
|
23331
|
+
"hzzt-dropdown-menu-item": true,
|
|
23332
|
+
selected: __props.defaultValue.includes(option[__props.props.value])
|
|
23333
|
+
})
|
|
23334
|
+
}, [
|
|
23335
|
+
createElementVNode("a", {
|
|
23336
|
+
class: "hzzt-dropdown-menu-item-label",
|
|
23337
|
+
onClick: ($event) => selectValue([option[__props.props.value]])
|
|
23338
|
+
}, toDisplayString(option[__props.props.label]), 9, _hoisted_5$3)
|
|
23339
|
+
], 2)) : (openBlock(), createElementBlock("li", {
|
|
23340
|
+
key: index + "submenu",
|
|
23341
|
+
class: "hzzt-dropdown-menu-item hzzt-dropdown-submenu"
|
|
23342
|
+
}, [
|
|
23343
|
+
createElementVNode("a", _hoisted_6$3, toDisplayString(option[__props.props.label]), 1),
|
|
23344
|
+
createElementVNode("ul", {
|
|
23345
|
+
class: normalizeClass([["pull-" + __props.position], "hzzt-dropdown-menu"])
|
|
23346
|
+
}, [
|
|
23347
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(option.children, (child, cIndex) => {
|
|
23348
|
+
return openBlock(), createElementBlock("li", {
|
|
23349
|
+
key: cIndex,
|
|
23350
|
+
class: normalizeClass({
|
|
23351
|
+
"hzzt-dropdown-menu-item": true,
|
|
23352
|
+
selected: __props.defaultValue.includes(child[__props.props.value])
|
|
23353
|
+
})
|
|
23354
|
+
}, [
|
|
23355
|
+
createElementVNode("a", {
|
|
23356
|
+
class: "hzzt-dropdown-menu-item-label",
|
|
23357
|
+
onClick: ($event) => selectValue([option[__props.props.value], child[__props.props.value]])
|
|
23358
|
+
}, toDisplayString(child[__props.props.label]), 9, _hoisted_7$3)
|
|
23359
|
+
], 2);
|
|
23360
|
+
}), 128))
|
|
23361
|
+
], 2)
|
|
23362
|
+
])),
|
|
23363
|
+
option.divider ? (openBlock(), createElementBlock("li", {
|
|
23364
|
+
key: index + "divider",
|
|
23365
|
+
class: "divider"
|
|
23366
|
+
})) : createCommentVNode("v-if", true)
|
|
23367
|
+
], 64);
|
|
23368
|
+
}), 256))
|
|
23369
|
+
])
|
|
23370
|
+
], 2)
|
|
23371
|
+
], 8, _hoisted_1$a)), [
|
|
23372
|
+
[unref(ClickOutside), close]
|
|
23373
|
+
]);
|
|
23374
|
+
};
|
|
23375
|
+
}
|
|
23376
|
+
});
|
|
23377
|
+
var Dropdown = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["__file", "index.vue"]]);
|
|
23378
|
+
|
|
23379
|
+
const HzztDropdown = withInstall$1(Dropdown);
|
|
23380
|
+
|
|
23381
|
+
const _hoisted_1$9 = { class: "hzzt-collapse" };
|
|
23382
|
+
const _hoisted_2$8 = { class: "flex align-items-center" };
|
|
23383
|
+
const _hoisted_3$5 = { class: "hzzt-collapse-title-wrapper" };
|
|
23384
|
+
const _hoisted_4$4 = /* @__PURE__ */ createElementVNode("div", { class: "hzzt-collapse-title-block" }, null, -1);
|
|
23385
|
+
const _hoisted_5$2 = { class: "hzzt-collapse-title" };
|
|
23386
|
+
const _hoisted_6$2 = /* @__PURE__ */ createElementVNode("div", { class: "hzzt-collapse-line" }, null, -1);
|
|
23387
|
+
const _hoisted_7$2 = {
|
|
23388
|
+
key: 0,
|
|
23389
|
+
class: "hzzt-collapse-text"
|
|
23390
|
+
};
|
|
23391
|
+
const __default__$a = defineComponent({
|
|
23392
|
+
name: "HzztCollapse"
|
|
23393
|
+
});
|
|
23394
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
23395
|
+
...__default__$a,
|
|
23396
|
+
props: {
|
|
23397
|
+
defaultActive: {
|
|
23398
|
+
type: Boolean,
|
|
23399
|
+
default: false
|
|
23400
|
+
},
|
|
23401
|
+
title: {
|
|
23402
|
+
type: String,
|
|
20680
23403
|
default: ""
|
|
20681
23404
|
},
|
|
20682
23405
|
expand: {
|
|
@@ -20701,7 +23424,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
20701
23424
|
onClick: toggle
|
|
20702
23425
|
}, [
|
|
20703
23426
|
createElementVNode("div", _hoisted_2$8, [
|
|
20704
|
-
createElementVNode("div", _hoisted_3$
|
|
23427
|
+
createElementVNode("div", _hoisted_3$5, [
|
|
20705
23428
|
_hoisted_4$4,
|
|
20706
23429
|
createElementVNode("div", _hoisted_5$2, toDisplayString(__props.title), 1)
|
|
20707
23430
|
]),
|
|
@@ -20715,7 +23438,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
20715
23438
|
};
|
|
20716
23439
|
}
|
|
20717
23440
|
});
|
|
20718
|
-
var Collapse = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__file", "collapse.vue"]]);
|
|
23441
|
+
var Collapse = /* @__PURE__ */ _export_sfc$1(_sfc_main$b, [["__file", "collapse.vue"]]);
|
|
20719
23442
|
|
|
20720
23443
|
const HzztCollapse = withInstall$1(Collapse);
|
|
20721
23444
|
|
|
@@ -20745,11 +23468,11 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
20745
23468
|
};
|
|
20746
23469
|
}
|
|
20747
23470
|
});
|
|
20748
|
-
var HzztIcon$1 = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__file", "index.vue"]]);
|
|
23471
|
+
var HzztIcon$1 = /* @__PURE__ */ _export_sfc$1(_sfc_main$a, [["__file", "index.vue"]]);
|
|
20749
23472
|
|
|
20750
23473
|
const _hoisted_1$8 = { class: "hzzt-tab flex align-items-center justify-content-between wrap" };
|
|
20751
23474
|
const _hoisted_2$7 = { class: "flex align-items-center" };
|
|
20752
|
-
const _hoisted_3$
|
|
23475
|
+
const _hoisted_3$4 = { class: "flex" };
|
|
20753
23476
|
const _hoisted_4$3 = ["onClick"];
|
|
20754
23477
|
const _hoisted_5$1 = { class: "hzzt-tab-badge" };
|
|
20755
23478
|
const _hoisted_6$1 = {
|
|
@@ -20800,7 +23523,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
20800
23523
|
return (_ctx, _cache) => {
|
|
20801
23524
|
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
20802
23525
|
createElementVNode("div", _hoisted_2$7, [
|
|
20803
|
-
createElementVNode("div", _hoisted_3$
|
|
23526
|
+
createElementVNode("div", _hoisted_3$4, [
|
|
20804
23527
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(customTabList), (tab, index) => {
|
|
20805
23528
|
return openBlock(), createElementBlock("div", {
|
|
20806
23529
|
key: tab.key,
|
|
@@ -20832,7 +23555,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
20832
23555
|
};
|
|
20833
23556
|
}
|
|
20834
23557
|
});
|
|
20835
|
-
var Tab = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__file", "index.vue"]]);
|
|
23558
|
+
var Tab = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["__file", "index.vue"]]);
|
|
20836
23559
|
|
|
20837
23560
|
const HzztTab = withInstall$1(Tab);
|
|
20838
23561
|
|
|
@@ -20850,7 +23573,7 @@ function tarnsElIconName(name) {
|
|
|
20850
23573
|
|
|
20851
23574
|
const _hoisted_1$7 = { class: "flex justify-content-between hzzt-pagination" };
|
|
20852
23575
|
const _hoisted_2$6 = { class: "flex align-items-center font-12 hzzt-pagination-total" };
|
|
20853
|
-
const _hoisted_3$
|
|
23576
|
+
const _hoisted_3$3 = { class: "flex align-items-center hzzt-pagination-page font-14" };
|
|
20854
23577
|
const _hoisted_4$2 = { class: "flex" };
|
|
20855
23578
|
const __default__$8 = defineComponent({
|
|
20856
23579
|
name: "HzztPagination"
|
|
@@ -20888,7 +23611,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
20888
23611
|
return (_ctx, _cache) => {
|
|
20889
23612
|
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
20890
23613
|
createElementVNode("p", _hoisted_2$6, toDisplayString(unref(t)("hzzt.pagination.total")) + toDisplayString(__props.pagination.total) + toDisplayString(unref(t)("hzzt.pagination.strip")), 1),
|
|
20891
|
-
createElementVNode("div", _hoisted_3$
|
|
23614
|
+
createElementVNode("div", _hoisted_3$3, [
|
|
20892
23615
|
renderSlot(_ctx.$slots, "right"),
|
|
20893
23616
|
createVNode(HzztIcon$1, {
|
|
20894
23617
|
class: normalizeClass(["hzzt-pagination-arrow", { active: __props.pagination.current_page > 1 }]),
|
|
@@ -20906,13 +23629,13 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
20906
23629
|
};
|
|
20907
23630
|
}
|
|
20908
23631
|
});
|
|
20909
|
-
var Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__file", "index.vue"]]);
|
|
23632
|
+
var Pagination = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["__file", "index.vue"]]);
|
|
20910
23633
|
|
|
20911
23634
|
const HzztPagination = withInstall$1(Pagination);
|
|
20912
23635
|
|
|
20913
23636
|
const _hoisted_1$6 = { class: "flex align-content-center" };
|
|
20914
23637
|
const _hoisted_2$5 = { style: { "max-width": "300px" } };
|
|
20915
|
-
const _hoisted_3$
|
|
23638
|
+
const _hoisted_3$2 = { style: { "padding": "0", "margin": "0", "word-break": "break-all", "white-space": "pre-wrap" } };
|
|
20916
23639
|
const __default__$7 = defineComponent({
|
|
20917
23640
|
name: "HzztTooltip"
|
|
20918
23641
|
});
|
|
@@ -20933,7 +23656,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
20933
23656
|
content: withCtx(() => [
|
|
20934
23657
|
renderSlot(_ctx.$slots, "content", {}, () => [
|
|
20935
23658
|
createElementVNode("div", _hoisted_2$5, [
|
|
20936
|
-
createElementVNode("pre", _hoisted_3$
|
|
23659
|
+
createElementVNode("pre", _hoisted_3$2, toDisplayString(__props.content), 1)
|
|
20937
23660
|
])
|
|
20938
23661
|
])
|
|
20939
23662
|
]),
|
|
@@ -20951,7 +23674,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
20951
23674
|
};
|
|
20952
23675
|
}
|
|
20953
23676
|
});
|
|
20954
|
-
var Tooltip = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__file", "tooltip.vue"]]);
|
|
23677
|
+
var Tooltip = /* @__PURE__ */ _export_sfc$1(_sfc_main$7, [["__file", "tooltip.vue"]]);
|
|
20955
23678
|
|
|
20956
23679
|
const HzztTooltip = withInstall$1(Tooltip);
|
|
20957
23680
|
|
|
@@ -20963,7 +23686,7 @@ const _hoisted_2$4 = {
|
|
|
20963
23686
|
key: 1,
|
|
20964
23687
|
style: { "white-space": "nowrap" }
|
|
20965
23688
|
};
|
|
20966
|
-
const _hoisted_3$
|
|
23689
|
+
const _hoisted_3$1 = { class: "line-height-1" };
|
|
20967
23690
|
const _hoisted_4$1 = {
|
|
20968
23691
|
key: 0,
|
|
20969
23692
|
class: "margin-l-1 margin-r-2"
|
|
@@ -21035,7 +23758,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
21035
23758
|
key: 2,
|
|
21036
23759
|
class: normalizeClass([unref(ns).e("option"), "flex align-items-center"])
|
|
21037
23760
|
}, [
|
|
21038
|
-
createElementVNode("span", _hoisted_3$
|
|
23761
|
+
createElementVNode("span", _hoisted_3$1, toDisplayString(unref(t)("hzzt.pageSize.per_page")), 1),
|
|
21039
23762
|
createVNode(unref(ElSelect), {
|
|
21040
23763
|
modelValue: sizeValue.value,
|
|
21041
23764
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => sizeValue.value = $event),
|
|
@@ -21099,7 +23822,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
21099
23822
|
};
|
|
21100
23823
|
}
|
|
21101
23824
|
});
|
|
21102
|
-
var PageSize = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__file", "index.vue"]]);
|
|
23825
|
+
var PageSize = /* @__PURE__ */ _export_sfc$1(_sfc_main$6, [["__file", "index.vue"]]);
|
|
21103
23826
|
|
|
21104
23827
|
const HzztPageSize = withInstall$1(PageSize);
|
|
21105
23828
|
|
|
@@ -21167,7 +23890,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
21167
23890
|
};
|
|
21168
23891
|
}
|
|
21169
23892
|
});
|
|
21170
|
-
var ConfirmPassword = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__file", "confirm-password.vue"]]);
|
|
23893
|
+
var ConfirmPassword = /* @__PURE__ */ _export_sfc$1(_sfc_main$5, [["__file", "confirm-password.vue"]]);
|
|
21171
23894
|
|
|
21172
23895
|
const HzztConfirmPassword = withInstall$1(ConfirmPassword);
|
|
21173
23896
|
|
|
@@ -21246,7 +23969,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
21246
23969
|
};
|
|
21247
23970
|
}
|
|
21248
23971
|
});
|
|
21249
|
-
var CheckButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__file", "index.vue"]]);
|
|
23972
|
+
var CheckButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["__file", "index.vue"]]);
|
|
21250
23973
|
|
|
21251
23974
|
const HzztCheckButton = withInstall$1(CheckButton);
|
|
21252
23975
|
|
|
@@ -21489,7 +24212,7 @@ function range(n) {
|
|
|
21489
24212
|
|
|
21490
24213
|
const _hoisted_1$3 = { class: "el-date-picker" };
|
|
21491
24214
|
const _hoisted_2$3 = { class: "el-picker-panel__body" };
|
|
21492
|
-
const _hoisted_3
|
|
24215
|
+
const _hoisted_3 = {
|
|
21493
24216
|
class: "el-date-picker__header el-date-picker__header--bordered",
|
|
21494
24217
|
style: { "margin": "0px", "line-height": "30px" }
|
|
21495
24218
|
};
|
|
@@ -21688,7 +24411,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
21688
24411
|
default: withCtx(() => [
|
|
21689
24412
|
createElementVNode("div", _hoisted_1$3, [
|
|
21690
24413
|
createElementVNode("div", _hoisted_2$3, [
|
|
21691
|
-
createElementVNode("div", _hoisted_3
|
|
24414
|
+
createElementVNode("div", _hoisted_3, [
|
|
21692
24415
|
createElementVNode("button", {
|
|
21693
24416
|
type: "button",
|
|
21694
24417
|
"aria-label": unref(t)(`hzzt.quarterpicker.prevYear`),
|
|
@@ -21748,7 +24471,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
21748
24471
|
};
|
|
21749
24472
|
}
|
|
21750
24473
|
});
|
|
21751
|
-
var QuarterPicker = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "index.vue"]]);
|
|
24474
|
+
var QuarterPicker = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["__file", "index.vue"]]);
|
|
21752
24475
|
|
|
21753
24476
|
const HzztQuarterPicker = withInstall$1(QuarterPicker);
|
|
21754
24477
|
|
|
@@ -21912,7 +24635,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
21912
24635
|
};
|
|
21913
24636
|
}
|
|
21914
24637
|
});
|
|
21915
|
-
var Scan = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "scan.vue"]]);
|
|
24638
|
+
var Scan = /* @__PURE__ */ _export_sfc$1(_sfc_main$2, [["__file", "scan.vue"]]);
|
|
21916
24639
|
|
|
21917
24640
|
const HzztScan = withInstall$1(Scan);
|
|
21918
24641
|
|
|
@@ -22033,7 +24756,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
22033
24756
|
class: normalizeClass(unref(inputContainerCls))
|
|
22034
24757
|
}, [
|
|
22035
24758
|
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
22036
|
-
createVNode(
|
|
24759
|
+
createVNode(HzztTitle$1, { label: _ctx.label }, null, 8, ["label"])
|
|
22037
24760
|
]),
|
|
22038
24761
|
createVNode(unref(ElInput), mergeProps({
|
|
22039
24762
|
ref: "inputRef",
|
|
@@ -22071,56 +24794,129 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
22071
24794
|
};
|
|
22072
24795
|
}
|
|
22073
24796
|
});
|
|
22074
|
-
var SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "select-input.vue"]]);
|
|
24797
|
+
var SelectInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["__file", "select-input.vue"]]);
|
|
22075
24798
|
|
|
22076
24799
|
const HzztSelectInput = withInstall$1(SelectInput);
|
|
22077
24800
|
|
|
22078
|
-
const
|
|
22079
|
-
|
|
22080
|
-
|
|
22081
|
-
|
|
22082
|
-
|
|
22083
|
-
|
|
22084
|
-
|
|
24801
|
+
const selectTextareaProps = buildProps$1({
|
|
24802
|
+
size: useSizeProp$1,
|
|
24803
|
+
disabled: Boolean,
|
|
24804
|
+
label: String,
|
|
24805
|
+
data: {
|
|
24806
|
+
type: definePropType$1(Array),
|
|
24807
|
+
default: () => []
|
|
24808
|
+
},
|
|
24809
|
+
inputProps: Object,
|
|
24810
|
+
replace: Boolean,
|
|
24811
|
+
modelValue: {
|
|
24812
|
+
type: definePropType$1([
|
|
24813
|
+
String,
|
|
24814
|
+
Number
|
|
24815
|
+
]),
|
|
24816
|
+
default: ""
|
|
24817
|
+
}
|
|
24818
|
+
});
|
|
24819
|
+
const selectTextareaEmits = {
|
|
24820
|
+
[UPDATE_MODEL_EVENT$1]: (value) => isString$1(value),
|
|
24821
|
+
input: (value) => isString$1(value),
|
|
24822
|
+
change: (value) => isString$1(value),
|
|
24823
|
+
select: (value) => isString$1(value)
|
|
22085
24824
|
};
|
|
22086
|
-
|
|
24825
|
+
|
|
24826
|
+
const _hoisted_1 = { class: "flex column" };
|
|
24827
|
+
const _hoisted_2 = { class: "flex align-items-center" };
|
|
22087
24828
|
const __default__ = defineComponent({
|
|
22088
|
-
name: "
|
|
24829
|
+
name: "HzztSelectTextarea"
|
|
22089
24830
|
});
|
|
22090
24831
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
22091
24832
|
...__default__,
|
|
22092
|
-
props:
|
|
22093
|
-
|
|
24833
|
+
props: selectTextareaProps,
|
|
24834
|
+
emits: selectTextareaEmits,
|
|
24835
|
+
setup(__props, { emit }) {
|
|
22094
24836
|
const props = __props;
|
|
22095
|
-
const
|
|
22096
|
-
const
|
|
22097
|
-
|
|
22098
|
-
|
|
24837
|
+
const inputVal = ref(props.modelValue);
|
|
24838
|
+
const selectValue = ref("");
|
|
24839
|
+
const inputRef = ref();
|
|
24840
|
+
const nsInput = useNamespace$1("select-textarea");
|
|
24841
|
+
const formSize = useFormSize();
|
|
24842
|
+
const formDisabled = useFormDisabled();
|
|
24843
|
+
const trueSize = computed(() => props.size || formSize.value || useGlobalSize$1().value);
|
|
24844
|
+
const trueDisabled = computed(() => props.disabled || formDisabled.value);
|
|
24845
|
+
const containerCls = computed(() => [
|
|
24846
|
+
nsInput.b(),
|
|
24847
|
+
nsInput.m(trueSize.value)
|
|
24848
|
+
]);
|
|
24849
|
+
const _inputProps = computed(() => ({
|
|
24850
|
+
disabled: trueDisabled.value,
|
|
24851
|
+
clearable: true,
|
|
24852
|
+
...props.inputProps,
|
|
24853
|
+
type: "textarea"
|
|
24854
|
+
}));
|
|
24855
|
+
watch(() => props.modelValue, (v) => {
|
|
24856
|
+
inputVal.value = v;
|
|
22099
24857
|
});
|
|
24858
|
+
function input(val) {
|
|
24859
|
+
emit("update:modelValue", val);
|
|
24860
|
+
emit("input", val);
|
|
24861
|
+
}
|
|
24862
|
+
function change(val) {
|
|
24863
|
+
emit("change", val);
|
|
24864
|
+
}
|
|
24865
|
+
function selectChange(val) {
|
|
24866
|
+
if (!inputVal.value && inputVal.value !== 0)
|
|
24867
|
+
inputVal.value = "";
|
|
24868
|
+
let content = val;
|
|
24869
|
+
if (!props.replace) {
|
|
24870
|
+
const inputEl = inputRef.value.getElementsByTagName("textarea")[0];
|
|
24871
|
+
content = insertCursorPosition(inputEl, val);
|
|
24872
|
+
}
|
|
24873
|
+
input(content);
|
|
24874
|
+
change(content);
|
|
24875
|
+
emit("select", val);
|
|
24876
|
+
}
|
|
22100
24877
|
return (_ctx, _cache) => {
|
|
22101
|
-
return
|
|
22102
|
-
|
|
22103
|
-
|
|
22104
|
-
createElementVNode("
|
|
22105
|
-
|
|
22106
|
-
|
|
22107
|
-
|
|
24878
|
+
return openBlock(), createElementBlock("div", {
|
|
24879
|
+
class: normalizeClass(unref(containerCls))
|
|
24880
|
+
}, [
|
|
24881
|
+
createElementVNode("div", _hoisted_1, [
|
|
24882
|
+
createElementVNode("div", _hoisted_2, [
|
|
24883
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
24884
|
+
createVNode(HzztTitle$1, {
|
|
24885
|
+
class: "margin-l-1",
|
|
24886
|
+
label: _ctx.label
|
|
24887
|
+
}, null, 8, ["label"])
|
|
24888
|
+
]),
|
|
24889
|
+
!unref(trueDisabled) ? (openBlock(), createBlock(unref(ElSelectV2), {
|
|
24890
|
+
key: 0,
|
|
24891
|
+
class: "flex-1",
|
|
24892
|
+
modelValue: selectValue.value,
|
|
24893
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectValue.value = $event),
|
|
24894
|
+
"allow-create": "",
|
|
24895
|
+
filterable: "",
|
|
24896
|
+
clearable: "",
|
|
24897
|
+
onChange: selectChange,
|
|
24898
|
+
options: _ctx.data
|
|
24899
|
+
}, null, 8, ["modelValue", "options"])) : createCommentVNode("v-if", true),
|
|
24900
|
+
renderSlot(_ctx.$slots, "right")
|
|
24901
|
+
]),
|
|
24902
|
+
createVNode(unref(ElInput), mergeProps({
|
|
24903
|
+
ref_key: "inputRef",
|
|
24904
|
+
ref: inputRef,
|
|
24905
|
+
class: "flex-1 margin-t-1",
|
|
24906
|
+
modelValue: inputVal.value,
|
|
24907
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inputVal.value = $event)
|
|
24908
|
+
}, unref(_inputProps), {
|
|
24909
|
+
onInput: input,
|
|
24910
|
+
onChange: change
|
|
24911
|
+
}), null, 16, ["modelValue"])
|
|
22108
24912
|
])
|
|
22109
|
-
]
|
|
24913
|
+
], 2);
|
|
22110
24914
|
};
|
|
22111
24915
|
}
|
|
22112
24916
|
});
|
|
22113
|
-
var
|
|
22114
|
-
|
|
22115
|
-
const titleProps = buildProps$1({
|
|
22116
|
-
label: String,
|
|
22117
|
-
sideline: {
|
|
22118
|
-
type: Boolean,
|
|
22119
|
-
default: true
|
|
22120
|
-
}
|
|
22121
|
-
});
|
|
24917
|
+
var SelectTextarea = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["__file", "select-textarea.vue"]]);
|
|
22122
24918
|
|
|
22123
|
-
const
|
|
24919
|
+
const HzztSelectTextarea = withInstall$1(SelectTextarea);
|
|
22124
24920
|
|
|
22125
24921
|
var Components = [
|
|
22126
24922
|
HzztConfigProvider,
|
|
@@ -22136,7 +24932,8 @@ var Components = [
|
|
|
22136
24932
|
HzztCheckButton,
|
|
22137
24933
|
HzztQuarterPicker,
|
|
22138
24934
|
HzztScan,
|
|
22139
|
-
HzztSelectInput
|
|
24935
|
+
HzztSelectInput,
|
|
24936
|
+
HzztSelectTextarea
|
|
22140
24937
|
];
|
|
22141
24938
|
|
|
22142
24939
|
var Plugins = [];
|
|
@@ -22348,4 +25145,4 @@ function initMouseEvent(el, callback) {
|
|
|
22348
25145
|
const install = installer.install;
|
|
22349
25146
|
const version = installer.version;
|
|
22350
25147
|
|
|
22351
|
-
export { Blur, CHANGE_EVENT$1 as CHANGE_EVENT, Download, Drag, Height, Highlight, HzztCheckButton, HzztCollapse, HzztConfigProvider, HzztConfirmPassword, HzztDropdown, HzztIcon, HzztPageSize, HzztPagination, HzztQuarterPicker, HzztScan, HzztSelectInput, HzztTab, HzztTitle, HzztTooltip, INPUT_EVENT$1 as INPUT_EVENT, INSTALLED_KEY, SIZE_INJECTION_KEY$1 as SIZE_INJECTION_KEY, UPDATE_MODEL_EVENT$1 as UPDATE_MODEL_EVENT, WEEK_DAYS, buildLocaleContext$1 as buildLocaleContext, buildTranslator$1 as buildTranslator, componentSizeMap, componentSizes$1 as componentSizes, configProviderContextKey$1 as configProviderContextKey, configProviderProps, datePickTypes, installer as default, defaultNamespace$1 as defaultNamespace, install, localeContextKey$1 as localeContextKey, makeInstaller, namespaceContextKey$1 as namespaceContextKey, numberToLetter, provideGlobalConfig, scanEmits, scanProps, selectInputEmits, selectInputProps, titleProps, translate$1 as translate, useGetDerivedNamespace$1 as useGetDerivedNamespace, useGlobalConfig$1 as useGlobalConfig, useGlobalSize$1 as useGlobalSize, useLocale$1 as useLocale, useNamespace$1 as useNamespace, useSizeProp$1 as useSizeProp, useSizeProps, version };
|
|
25148
|
+
export { Blur, CHANGE_EVENT$1 as CHANGE_EVENT, Download, Drag, Height, Highlight, HzztCheckButton, HzztCollapse, HzztConfigProvider, HzztConfirmPassword, HzztDropdown, HzztIcon, HzztPageSize, HzztPagination, HzztQuarterPicker, HzztScan, HzztSelectInput, HzztSelectTextarea, HzztTab, HzztTitle, HzztTooltip, INPUT_EVENT$1 as INPUT_EVENT, INSTALLED_KEY, SIZE_INJECTION_KEY$1 as SIZE_INJECTION_KEY, UPDATE_MODEL_EVENT$1 as UPDATE_MODEL_EVENT, WEEK_DAYS, buildLocaleContext$1 as buildLocaleContext, buildTranslator$1 as buildTranslator, componentSizeMap, componentSizes$1 as componentSizes, configProviderContextKey$1 as configProviderContextKey, configProviderProps, datePickTypes, installer as default, defaultNamespace$1 as defaultNamespace, insertCursorPosition, install, localeContextKey$1 as localeContextKey, makeInstaller, namespaceContextKey$1 as namespaceContextKey, numberToLetter, provideGlobalConfig, scanEmits, scanProps, selectInputEmits, selectInputProps, selectTextareaEmits, selectTextareaProps, titleProps, translate$1 as translate, useGetDerivedNamespace$1 as useGetDerivedNamespace, useGlobalConfig$1 as useGlobalConfig, useGlobalSize$1 as useGlobalSize, useLocale$1 as useLocale, useNamespace$1 as useNamespace, useSizeProp$1 as useSizeProp, useSizeProps, version };
|