hzzt-plus 0.0.3 → 0.0.5
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/dist/index.css +1 -1
- package/dist/index.full.js +419 -295
- package/dist/index.full.min.js +13 -13
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +13 -13
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +420 -297
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/confirm-password/index.d.ts +352 -283
- package/es/components/confirm-password/src/confirm-password.mjs.map +1 -1
- package/es/components/confirm-password/src/confirm-password.vue.d.ts +352 -283
- package/es/components/dropdown/src/index.mjs.map +1 -1
- package/es/components/icon/src/index.mjs.map +1 -1
- package/es/components/icon/src/index.vue.d.ts +75 -39
- package/es/components/page-size/index.d.ts +2201 -12995
- package/es/components/page-size/src/index.mjs.map +1 -1
- package/es/components/page-size/src/index.vue.d.ts +2201 -12995
- package/es/components/pagination/index.d.ts +75 -39
- package/es/components/pagination/src/index.mjs.map +1 -1
- package/es/components/pagination/src/index.vue.d.ts +75 -39
- package/es/components/tab/src/index.mjs.map +1 -1
- package/es/components/title/src/title.mjs.map +1 -1
- package/es/components/tooltip/index.d.ts +606 -2136
- package/es/components/tooltip/src/tooltip.vue.d.ts +606 -2136
- package/es/directives/drag/index.d.ts +3 -0
- package/es/directives/drag/index.mjs +74 -0
- package/es/directives/drag/index.mjs.map +1 -0
- package/es/directives/index.d.ts +1 -0
- package/es/directives/index.mjs +1 -0
- package/es/directives/index.mjs.map +1 -1
- package/es/index.mjs +1 -0
- package/es/index.mjs.map +1 -1
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/confirm-password/index.d.ts +352 -283
- package/lib/components/confirm-password/src/confirm-password.js.map +1 -1
- package/lib/components/confirm-password/src/confirm-password.vue.d.ts +352 -283
- package/lib/components/dropdown/src/index.js.map +1 -1
- package/lib/components/icon/src/index.js.map +1 -1
- package/lib/components/icon/src/index.vue.d.ts +75 -39
- package/lib/components/page-size/index.d.ts +2201 -12995
- package/lib/components/page-size/src/index.js.map +1 -1
- package/lib/components/page-size/src/index.vue.d.ts +2201 -12995
- package/lib/components/pagination/index.d.ts +75 -39
- package/lib/components/pagination/src/index.js.map +1 -1
- package/lib/components/pagination/src/index.vue.d.ts +75 -39
- package/lib/components/tab/src/index.js.map +1 -1
- package/lib/components/title/src/title.js.map +1 -1
- package/lib/components/tooltip/index.d.ts +606 -2136
- package/lib/components/tooltip/src/tooltip.vue.d.ts +606 -2136
- package/lib/directives/drag/index.d.ts +3 -0
- package/lib/directives/drag/index.js +78 -0
- package/lib/directives/drag/index.js.map +1 -0
- package/lib/directives/index.d.ts +1 -0
- package/lib/directives/index.js +2 -0
- package/lib/directives/index.js.map +1 -1
- package/lib/index.js +18 -16
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/theme/base.css +1 -1
- package/theme/index.css +1 -1
- package/theme/src/common/display.scss +1 -1
package/dist/index.full.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! Hzzt Plus v0.0.1 */
|
|
2
2
|
|
|
3
|
-
import { getCurrentScope, onScopeDispose, unref, getCurrentInstance, onMounted, nextTick, watch, ref, defineComponent, openBlock, createElementBlock, createElementVNode, warn, computed, isRef, inject, provide, renderSlot, useSlots, createCommentVNode, createTextVNode, toDisplayString, shallowRef, onBeforeUnmount, onBeforeMount, mergeProps, toRef, onUnmounted, useAttrs as useAttrs$1, Fragment, normalizeClass, createBlock, withCtx, resolveDynamicComponent, withModifiers, createVNode, normalizeStyle, Transition, withDirectives, vShow, reactive, onUpdated, cloneVNode, Text, Comment, Teleport, readonly, onDeactivated, withKeys, toRaw, toRefs, watchEffect, resolveComponent, resolveDirective, toHandlerKey, renderList, vModelText, normalizeProps, guardReactiveProps } from 'vue';
|
|
3
|
+
import { getCurrentScope, onScopeDispose, unref, getCurrentInstance, onMounted, nextTick, watch, ref, defineComponent, openBlock, createElementBlock, createElementVNode, warn, computed, isRef, inject, provide, renderSlot, useSlots, createCommentVNode, createTextVNode, toDisplayString, shallowRef, onBeforeUnmount, onBeforeMount, mergeProps, toRef, onUnmounted, useAttrs as useAttrs$1, Fragment, normalizeClass, createBlock, withCtx, resolveDynamicComponent, withModifiers, createVNode, normalizeStyle, Transition, withDirectives, vShow, reactive, onActivated, onUpdated, cloneVNode, Text, Comment, Teleport as Teleport$1, readonly, onDeactivated, withKeys, toRaw, toRefs, watchEffect, resolveComponent, resolveDirective, toHandlerKey, renderList, vModelText, normalizeProps, guardReactiveProps } from 'vue';
|
|
4
4
|
|
|
5
5
|
var _a;
|
|
6
6
|
const isClient = typeof window !== "undefined";
|
|
@@ -12889,19 +12889,19 @@ var _export_sfc$1 = (sfc, props) => {
|
|
|
12889
12889
|
return target;
|
|
12890
12890
|
};
|
|
12891
12891
|
|
|
12892
|
-
const _hoisted_1$
|
|
12892
|
+
const _hoisted_1$6 = {
|
|
12893
12893
|
key: 0,
|
|
12894
12894
|
class: "hzzt-title flex align-items-center"
|
|
12895
12895
|
};
|
|
12896
|
-
const _hoisted_2$
|
|
12896
|
+
const _hoisted_2$6 = {
|
|
12897
12897
|
key: 0,
|
|
12898
12898
|
class: "decorative-line"
|
|
12899
12899
|
};
|
|
12900
|
-
const _hoisted_3$
|
|
12900
|
+
const _hoisted_3$6 = { class: "label-name" };
|
|
12901
12901
|
const __default__$l = defineComponent({
|
|
12902
12902
|
name: "HzztTitle"
|
|
12903
12903
|
});
|
|
12904
|
-
const _sfc_main$
|
|
12904
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
12905
12905
|
...__default__$l,
|
|
12906
12906
|
props: {
|
|
12907
12907
|
label: String,
|
|
@@ -12918,10 +12918,10 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
12918
12918
|
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);
|
|
12919
12919
|
});
|
|
12920
12920
|
return (_ctx, _cache) => {
|
|
12921
|
-
return unref(showLabel) ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
12922
|
-
__props.sideline ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
12921
|
+
return unref(showLabel) ? (openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
12922
|
+
__props.sideline ? (openBlock(), createElementBlock("span", _hoisted_2$6)) : createCommentVNode("v-if", true),
|
|
12923
12923
|
renderSlot(_ctx.$slots, "before"),
|
|
12924
|
-
createElementVNode("label", _hoisted_3$
|
|
12924
|
+
createElementVNode("label", _hoisted_3$6, [
|
|
12925
12925
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
12926
12926
|
createTextVNode(toDisplayString(__props.label), 1)
|
|
12927
12927
|
])
|
|
@@ -12930,7 +12930,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
12930
12930
|
};
|
|
12931
12931
|
}
|
|
12932
12932
|
});
|
|
12933
|
-
var Title = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
12933
|
+
var Title = /* @__PURE__ */ _export_sfc$1(_sfc_main$u, [["__file", "title.vue"]]);
|
|
12934
12934
|
|
|
12935
12935
|
const HzztTitle = withInstall$1(Title);
|
|
12936
12936
|
|
|
@@ -13140,7 +13140,8 @@ var English = {
|
|
|
13140
13140
|
confirm: "OK",
|
|
13141
13141
|
clear: "Clear",
|
|
13142
13142
|
defaultLabel: "color picker",
|
|
13143
|
-
description: "current color is {color}. press enter to select a new color."
|
|
13143
|
+
description: "current color is {color}. press enter to select a new color.",
|
|
13144
|
+
alphaLabel: "pick alpha value"
|
|
13144
13145
|
},
|
|
13145
13146
|
datepicker: {
|
|
13146
13147
|
now: "Now",
|
|
@@ -13219,6 +13220,9 @@ var English = {
|
|
|
13219
13220
|
noData: "No data",
|
|
13220
13221
|
placeholder: "Select"
|
|
13221
13222
|
},
|
|
13223
|
+
mention: {
|
|
13224
|
+
loading: "Loading"
|
|
13225
|
+
},
|
|
13222
13226
|
dropdown: {
|
|
13223
13227
|
toggleDropdown: "Toggle Dropdown"
|
|
13224
13228
|
},
|
|
@@ -13698,7 +13702,7 @@ const usePopperContainer = () => {
|
|
|
13698
13702
|
onBeforeMount(() => {
|
|
13699
13703
|
if (!isClient)
|
|
13700
13704
|
return;
|
|
13701
|
-
if (!cachedContainer
|
|
13705
|
+
if (!cachedContainer || !document.body.querySelector(selector.value)) {
|
|
13702
13706
|
cachedContainer = createContainer(id.value);
|
|
13703
13707
|
}
|
|
13704
13708
|
});
|
|
@@ -13809,7 +13813,7 @@ const useZIndex = (zIndexOverrides) => {
|
|
|
13809
13813
|
};
|
|
13810
13814
|
|
|
13811
13815
|
function useCursor(input) {
|
|
13812
|
-
|
|
13816
|
+
let selectionInfo;
|
|
13813
13817
|
function recordCursor() {
|
|
13814
13818
|
if (input.value == void 0)
|
|
13815
13819
|
return;
|
|
@@ -13818,7 +13822,7 @@ function useCursor(input) {
|
|
|
13818
13822
|
return;
|
|
13819
13823
|
const beforeTxt = value.slice(0, Math.max(0, selectionStart));
|
|
13820
13824
|
const afterTxt = value.slice(Math.max(0, selectionEnd));
|
|
13821
|
-
|
|
13825
|
+
selectionInfo = {
|
|
13822
13826
|
selectionStart,
|
|
13823
13827
|
selectionEnd,
|
|
13824
13828
|
value,
|
|
@@ -13827,10 +13831,10 @@ function useCursor(input) {
|
|
|
13827
13831
|
};
|
|
13828
13832
|
}
|
|
13829
13833
|
function setCursor() {
|
|
13830
|
-
if (input.value == void 0 ||
|
|
13834
|
+
if (input.value == void 0 || selectionInfo == void 0)
|
|
13831
13835
|
return;
|
|
13832
13836
|
const { value } = input.value;
|
|
13833
|
-
const { beforeTxt, afterTxt, selectionStart } =
|
|
13837
|
+
const { beforeTxt, afterTxt, selectionStart } = selectionInfo;
|
|
13834
13838
|
if (beforeTxt == void 0 || afterTxt == void 0 || selectionStart == void 0)
|
|
13835
13839
|
return;
|
|
13836
13840
|
let startPos = value.length;
|
|
@@ -13863,13 +13867,19 @@ const useGlobalSize = () => {
|
|
|
13863
13867
|
});
|
|
13864
13868
|
};
|
|
13865
13869
|
|
|
13866
|
-
function useFocusController(target, {
|
|
13870
|
+
function useFocusController(target, {
|
|
13871
|
+
beforeFocus,
|
|
13872
|
+
afterFocus,
|
|
13873
|
+
beforeBlur,
|
|
13874
|
+
afterBlur
|
|
13875
|
+
} = {}) {
|
|
13867
13876
|
const instance = getCurrentInstance();
|
|
13868
13877
|
const { emit } = instance;
|
|
13869
13878
|
const wrapperRef = shallowRef();
|
|
13870
13879
|
const isFocused = ref(false);
|
|
13871
13880
|
const handleFocus = (event) => {
|
|
13872
|
-
|
|
13881
|
+
const cancelFocus = isFunction$1(beforeFocus) ? beforeFocus(event) : false;
|
|
13882
|
+
if (cancelFocus || isFocused.value)
|
|
13873
13883
|
return;
|
|
13874
13884
|
isFocused.value = true;
|
|
13875
13885
|
emit("focus", event);
|
|
@@ -13885,23 +13895,62 @@ function useFocusController(target, { afterFocus, beforeBlur, afterBlur } = {})
|
|
|
13885
13895
|
afterBlur == null ? void 0 : afterBlur();
|
|
13886
13896
|
};
|
|
13887
13897
|
const handleClick = () => {
|
|
13888
|
-
var _a;
|
|
13889
|
-
(_a =
|
|
13898
|
+
var _a, _b;
|
|
13899
|
+
if (((_a = wrapperRef.value) == null ? void 0 : _a.contains(document.activeElement)) && wrapperRef.value !== document.activeElement)
|
|
13900
|
+
return;
|
|
13901
|
+
(_b = target.value) == null ? void 0 : _b.focus();
|
|
13890
13902
|
};
|
|
13891
13903
|
watch(wrapperRef, (el) => {
|
|
13892
13904
|
if (el) {
|
|
13893
13905
|
el.setAttribute("tabindex", "-1");
|
|
13894
13906
|
}
|
|
13895
13907
|
});
|
|
13896
|
-
useEventListener(wrapperRef, "
|
|
13908
|
+
useEventListener(wrapperRef, "focus", handleFocus, true);
|
|
13909
|
+
useEventListener(wrapperRef, "blur", handleBlur, true);
|
|
13910
|
+
useEventListener(wrapperRef, "click", handleClick, true);
|
|
13897
13911
|
return {
|
|
13898
|
-
wrapperRef,
|
|
13899
13912
|
isFocused,
|
|
13913
|
+
wrapperRef,
|
|
13900
13914
|
handleFocus,
|
|
13901
13915
|
handleBlur
|
|
13902
13916
|
};
|
|
13903
13917
|
}
|
|
13904
13918
|
|
|
13919
|
+
function useComposition({
|
|
13920
|
+
afterComposition,
|
|
13921
|
+
emit
|
|
13922
|
+
}) {
|
|
13923
|
+
const isComposing = ref(false);
|
|
13924
|
+
const handleCompositionStart = (event) => {
|
|
13925
|
+
emit == null ? void 0 : emit("compositionstart", event);
|
|
13926
|
+
isComposing.value = true;
|
|
13927
|
+
};
|
|
13928
|
+
const handleCompositionUpdate = (event) => {
|
|
13929
|
+
var _a;
|
|
13930
|
+
emit == null ? void 0 : emit("compositionupdate", event);
|
|
13931
|
+
const text = (_a = event.target) == null ? void 0 : _a.value;
|
|
13932
|
+
const lastCharacter = text[text.length - 1] || "";
|
|
13933
|
+
isComposing.value = !isKorean(lastCharacter);
|
|
13934
|
+
};
|
|
13935
|
+
const handleCompositionEnd = (event) => {
|
|
13936
|
+
emit == null ? void 0 : emit("compositionend", event);
|
|
13937
|
+
if (isComposing.value) {
|
|
13938
|
+
isComposing.value = false;
|
|
13939
|
+
nextTick(() => afterComposition(event));
|
|
13940
|
+
}
|
|
13941
|
+
};
|
|
13942
|
+
const handleComposition = (event) => {
|
|
13943
|
+
event.type === "compositionend" ? handleCompositionEnd(event) : handleCompositionUpdate(event);
|
|
13944
|
+
};
|
|
13945
|
+
return {
|
|
13946
|
+
isComposing,
|
|
13947
|
+
handleComposition,
|
|
13948
|
+
handleCompositionStart,
|
|
13949
|
+
handleCompositionUpdate,
|
|
13950
|
+
handleCompositionEnd
|
|
13951
|
+
};
|
|
13952
|
+
}
|
|
13953
|
+
|
|
13905
13954
|
const emptyValuesContextKey = Symbol("emptyValuesContextKey");
|
|
13906
13955
|
const DEFAULT_EMPTY_VALUES = ["", void 0, null];
|
|
13907
13956
|
const DEFAULT_VALUE_ON_CLEAR = void 0;
|
|
@@ -13987,7 +14036,7 @@ const __default__$k = defineComponent({
|
|
|
13987
14036
|
name: "ElIcon",
|
|
13988
14037
|
inheritAttrs: false
|
|
13989
14038
|
});
|
|
13990
|
-
const _sfc_main$
|
|
14039
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
13991
14040
|
...__default__$k,
|
|
13992
14041
|
props: iconProps,
|
|
13993
14042
|
setup(__props) {
|
|
@@ -14012,7 +14061,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
14012
14061
|
};
|
|
14013
14062
|
}
|
|
14014
14063
|
});
|
|
14015
|
-
var Icon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
14064
|
+
var Icon = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__file", "icon.vue"]]);
|
|
14016
14065
|
|
|
14017
14066
|
const ElIcon = withInstall(Icon);
|
|
14018
14067
|
|
|
@@ -14221,10 +14270,6 @@ const inputProps = buildProps({
|
|
|
14221
14270
|
type: String,
|
|
14222
14271
|
default: void 0
|
|
14223
14272
|
},
|
|
14224
|
-
label: {
|
|
14225
|
-
type: String,
|
|
14226
|
-
default: void 0
|
|
14227
|
-
},
|
|
14228
14273
|
tabindex: {
|
|
14229
14274
|
type: [String, Number],
|
|
14230
14275
|
default: 0
|
|
@@ -14259,14 +14304,11 @@ const inputEmits = {
|
|
|
14259
14304
|
compositionend: (evt) => evt instanceof CompositionEvent
|
|
14260
14305
|
};
|
|
14261
14306
|
|
|
14262
|
-
const _hoisted_1$a = ["role"];
|
|
14263
|
-
const _hoisted_2$9 = ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus"];
|
|
14264
|
-
const _hoisted_3$7 = ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows"];
|
|
14265
14307
|
const __default__$j = defineComponent({
|
|
14266
14308
|
name: "ElInput",
|
|
14267
14309
|
inheritAttrs: false
|
|
14268
14310
|
});
|
|
14269
|
-
const _sfc_main$
|
|
14311
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
14270
14312
|
...__default__$j,
|
|
14271
14313
|
props: inputProps,
|
|
14272
14314
|
emits: inputEmits,
|
|
@@ -14317,12 +14359,14 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
14317
14359
|
const input = shallowRef();
|
|
14318
14360
|
const textarea = shallowRef();
|
|
14319
14361
|
const hovering = ref(false);
|
|
14320
|
-
const isComposing = ref(false);
|
|
14321
14362
|
const passwordVisible = ref(false);
|
|
14322
14363
|
const countStyle = ref();
|
|
14323
14364
|
const textareaCalcStyle = shallowRef(props.inputStyle);
|
|
14324
14365
|
const _ref = computed(() => input.value || textarea.value);
|
|
14325
14366
|
const { wrapperRef, isFocused, handleFocus, handleBlur } = useFocusController(_ref, {
|
|
14367
|
+
beforeFocus() {
|
|
14368
|
+
return inputDisabled.value;
|
|
14369
|
+
},
|
|
14326
14370
|
afterBlur() {
|
|
14327
14371
|
var _a;
|
|
14328
14372
|
if (props.validateEvent) {
|
|
@@ -14427,24 +14471,12 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
14427
14471
|
const handleChange = (event) => {
|
|
14428
14472
|
emit("change", event.target.value);
|
|
14429
14473
|
};
|
|
14430
|
-
const
|
|
14431
|
-
|
|
14432
|
-
|
|
14433
|
-
|
|
14434
|
-
|
|
14435
|
-
|
|
14436
|
-
emit("compositionupdate", event);
|
|
14437
|
-
const text = (_a = event.target) == null ? void 0 : _a.value;
|
|
14438
|
-
const lastCharacter = text[text.length - 1] || "";
|
|
14439
|
-
isComposing.value = !isKorean(lastCharacter);
|
|
14440
|
-
};
|
|
14441
|
-
const handleCompositionEnd = (event) => {
|
|
14442
|
-
emit("compositionend", event);
|
|
14443
|
-
if (isComposing.value) {
|
|
14444
|
-
isComposing.value = false;
|
|
14445
|
-
handleInput(event);
|
|
14446
|
-
}
|
|
14447
|
-
};
|
|
14474
|
+
const {
|
|
14475
|
+
isComposing,
|
|
14476
|
+
handleCompositionStart,
|
|
14477
|
+
handleCompositionUpdate,
|
|
14478
|
+
handleCompositionEnd
|
|
14479
|
+
} = useComposition({ emit, afterComposition: handleInput });
|
|
14448
14480
|
const handlePasswordVisible = () => {
|
|
14449
14481
|
passwordVisible.value = !passwordVisible.value;
|
|
14450
14482
|
focus();
|
|
@@ -14497,19 +14529,13 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
14497
14529
|
setNativeInputValue();
|
|
14498
14530
|
nextTick(resizeTextarea);
|
|
14499
14531
|
});
|
|
14500
|
-
useDeprecated({
|
|
14501
|
-
from: "label",
|
|
14502
|
-
replacement: "aria-label",
|
|
14503
|
-
version: "2.8.0",
|
|
14504
|
-
scope: "el-input",
|
|
14505
|
-
ref: "https://element-plus.org/en-US/component/input.html"
|
|
14506
|
-
}, computed(() => !!props.label));
|
|
14507
14532
|
expose({
|
|
14508
14533
|
input,
|
|
14509
14534
|
textarea,
|
|
14510
14535
|
ref: _ref,
|
|
14511
14536
|
textareaStyle,
|
|
14512
14537
|
autosize: toRef(props, "autosize"),
|
|
14538
|
+
isComposing,
|
|
14513
14539
|
focus,
|
|
14514
14540
|
blur,
|
|
14515
14541
|
select,
|
|
@@ -14577,20 +14603,18 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
14577
14603
|
readonly: _ctx.readonly,
|
|
14578
14604
|
autocomplete: _ctx.autocomplete,
|
|
14579
14605
|
tabindex: _ctx.tabindex,
|
|
14580
|
-
"aria-label": _ctx.
|
|
14606
|
+
"aria-label": _ctx.ariaLabel,
|
|
14581
14607
|
placeholder: _ctx.placeholder,
|
|
14582
14608
|
style: _ctx.inputStyle,
|
|
14583
14609
|
form: _ctx.form,
|
|
14584
14610
|
autofocus: _ctx.autofocus,
|
|
14585
|
-
onCompositionstart: handleCompositionStart,
|
|
14586
|
-
onCompositionupdate: handleCompositionUpdate,
|
|
14587
|
-
onCompositionend: handleCompositionEnd,
|
|
14611
|
+
onCompositionstart: unref(handleCompositionStart),
|
|
14612
|
+
onCompositionupdate: unref(handleCompositionUpdate),
|
|
14613
|
+
onCompositionend: unref(handleCompositionEnd),
|
|
14588
14614
|
onInput: handleInput,
|
|
14589
|
-
onFocus: _cache[0] || (_cache[0] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)),
|
|
14590
|
-
onBlur: _cache[1] || (_cache[1] = (...args) => unref(handleBlur) && unref(handleBlur)(...args)),
|
|
14591
14615
|
onChange: handleChange,
|
|
14592
14616
|
onKeydown: handleKeydown
|
|
14593
|
-
}), null, 16,
|
|
14617
|
+
}), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "onCompositionstart", "onCompositionupdate", "onCompositionend"]),
|
|
14594
14618
|
createCommentVNode(" suffix slot "),
|
|
14595
14619
|
unref(suffixVisible) ? (openBlock(), createElementBlock("span", {
|
|
14596
14620
|
key: 1,
|
|
@@ -14678,31 +14702,31 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
14678
14702
|
readonly: _ctx.readonly,
|
|
14679
14703
|
autocomplete: _ctx.autocomplete,
|
|
14680
14704
|
style: unref(textareaStyle),
|
|
14681
|
-
"aria-label": _ctx.
|
|
14705
|
+
"aria-label": _ctx.ariaLabel,
|
|
14682
14706
|
placeholder: _ctx.placeholder,
|
|
14683
14707
|
form: _ctx.form,
|
|
14684
14708
|
autofocus: _ctx.autofocus,
|
|
14685
14709
|
rows: _ctx.rows,
|
|
14686
|
-
onCompositionstart: handleCompositionStart,
|
|
14687
|
-
onCompositionupdate: handleCompositionUpdate,
|
|
14688
|
-
onCompositionend: handleCompositionEnd,
|
|
14710
|
+
onCompositionstart: unref(handleCompositionStart),
|
|
14711
|
+
onCompositionupdate: unref(handleCompositionUpdate),
|
|
14712
|
+
onCompositionend: unref(handleCompositionEnd),
|
|
14689
14713
|
onInput: handleInput,
|
|
14690
|
-
onFocus:
|
|
14691
|
-
onBlur:
|
|
14714
|
+
onFocus: unref(handleFocus),
|
|
14715
|
+
onBlur: unref(handleBlur),
|
|
14692
14716
|
onChange: handleChange,
|
|
14693
14717
|
onKeydown: handleKeydown
|
|
14694
|
-
}), null, 16,
|
|
14718
|
+
}), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]),
|
|
14695
14719
|
unref(isWordLimitVisible) ? (openBlock(), createElementBlock("span", {
|
|
14696
14720
|
key: 0,
|
|
14697
14721
|
style: normalizeStyle(countStyle.value),
|
|
14698
14722
|
class: normalizeClass(unref(nsInput).e("count"))
|
|
14699
14723
|
}, toDisplayString(unref(textLength)) + " / " + toDisplayString(_ctx.maxlength), 7)) : createCommentVNode("v-if", true)
|
|
14700
14724
|
], 64))
|
|
14701
|
-
], 16,
|
|
14725
|
+
], 16, ["role"]);
|
|
14702
14726
|
};
|
|
14703
14727
|
}
|
|
14704
14728
|
});
|
|
14705
|
-
var Input = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
14729
|
+
var Input = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__file", "input.vue"]]);
|
|
14706
14730
|
|
|
14707
14731
|
const ElInput = withInstall(Input);
|
|
14708
14732
|
|
|
@@ -14752,7 +14776,7 @@ const thumbProps = buildProps({
|
|
|
14752
14776
|
});
|
|
14753
14777
|
|
|
14754
14778
|
const COMPONENT_NAME$2 = "Thumb";
|
|
14755
|
-
const _sfc_main$
|
|
14779
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
14756
14780
|
__name: "thumb",
|
|
14757
14781
|
props: thumbProps,
|
|
14758
14782
|
setup(__props) {
|
|
@@ -14871,7 +14895,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
14871
14895
|
};
|
|
14872
14896
|
}
|
|
14873
14897
|
});
|
|
14874
|
-
var Thumb = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
14898
|
+
var Thumb = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__file", "thumb.vue"]]);
|
|
14875
14899
|
|
|
14876
14900
|
const barProps = buildProps({
|
|
14877
14901
|
always: {
|
|
@@ -14884,7 +14908,7 @@ const barProps = buildProps({
|
|
|
14884
14908
|
}
|
|
14885
14909
|
});
|
|
14886
14910
|
|
|
14887
|
-
const _sfc_main$
|
|
14911
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
14888
14912
|
__name: "bar",
|
|
14889
14913
|
props: barProps,
|
|
14890
14914
|
setup(__props, { expose }) {
|
|
@@ -14942,7 +14966,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
14942
14966
|
};
|
|
14943
14967
|
}
|
|
14944
14968
|
});
|
|
14945
|
-
var Bar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
14969
|
+
var Bar = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__file", "bar.vue"]]);
|
|
14946
14970
|
|
|
14947
14971
|
const scrollbarProps = buildProps({
|
|
14948
14972
|
height: {
|
|
@@ -14998,7 +15022,7 @@ const COMPONENT_NAME$1 = "ElScrollbar";
|
|
|
14998
15022
|
const __default__$i = defineComponent({
|
|
14999
15023
|
name: COMPONENT_NAME$1
|
|
15000
15024
|
});
|
|
15001
|
-
const _sfc_main$
|
|
15025
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
15002
15026
|
...__default__$i,
|
|
15003
15027
|
props: scrollbarProps,
|
|
15004
15028
|
emits: scrollbarEmits,
|
|
@@ -15007,6 +15031,8 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
15007
15031
|
const ns = useNamespace("scrollbar");
|
|
15008
15032
|
let stopResizeObserver = void 0;
|
|
15009
15033
|
let stopResizeListener = void 0;
|
|
15034
|
+
let wrapScrollTop = 0;
|
|
15035
|
+
let wrapScrollLeft = 0;
|
|
15010
15036
|
const scrollbarRef = ref();
|
|
15011
15037
|
const wrapRef = ref();
|
|
15012
15038
|
const resizeRef = ref();
|
|
@@ -15033,6 +15059,8 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
15033
15059
|
var _a;
|
|
15034
15060
|
if (wrapRef.value) {
|
|
15035
15061
|
(_a = barRef.value) == null ? void 0 : _a.handleScroll(wrapRef.value);
|
|
15062
|
+
wrapScrollTop = wrapRef.value.scrollTop;
|
|
15063
|
+
wrapScrollLeft = wrapRef.value.scrollLeft;
|
|
15036
15064
|
emit("scroll", {
|
|
15037
15065
|
scrollTop: wrapRef.value.scrollTop,
|
|
15038
15066
|
scrollLeft: wrapRef.value.scrollLeft
|
|
@@ -15085,6 +15113,10 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
15085
15113
|
scrollbarElement: scrollbarRef,
|
|
15086
15114
|
wrapElement: wrapRef
|
|
15087
15115
|
}));
|
|
15116
|
+
onActivated(() => {
|
|
15117
|
+
wrapRef.value.scrollTop = wrapScrollTop;
|
|
15118
|
+
wrapRef.value.scrollLeft = wrapScrollLeft;
|
|
15119
|
+
});
|
|
15088
15120
|
onMounted(() => {
|
|
15089
15121
|
if (!props.native)
|
|
15090
15122
|
nextTick(() => {
|
|
@@ -15140,7 +15172,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
15140
15172
|
};
|
|
15141
15173
|
}
|
|
15142
15174
|
});
|
|
15143
|
-
var Scrollbar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15175
|
+
var Scrollbar = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__file", "scrollbar.vue"]]);
|
|
15144
15176
|
|
|
15145
15177
|
const ElScrollbar = withInstall(Scrollbar);
|
|
15146
15178
|
|
|
@@ -15169,7 +15201,7 @@ const __default__$h = defineComponent({
|
|
|
15169
15201
|
name: "ElPopper",
|
|
15170
15202
|
inheritAttrs: false
|
|
15171
15203
|
});
|
|
15172
|
-
const _sfc_main$
|
|
15204
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
15173
15205
|
...__default__$h,
|
|
15174
15206
|
props: popperProps,
|
|
15175
15207
|
setup(__props, { expose }) {
|
|
@@ -15193,7 +15225,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
15193
15225
|
};
|
|
15194
15226
|
}
|
|
15195
15227
|
});
|
|
15196
|
-
var Popper = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15228
|
+
var Popper = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__file", "popper.vue"]]);
|
|
15197
15229
|
|
|
15198
15230
|
const popperArrowProps = buildProps({
|
|
15199
15231
|
arrowOffset: {
|
|
@@ -15206,7 +15238,7 @@ const __default__$g = defineComponent({
|
|
|
15206
15238
|
name: "ElPopperArrow",
|
|
15207
15239
|
inheritAttrs: false
|
|
15208
15240
|
});
|
|
15209
|
-
const _sfc_main$
|
|
15241
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
15210
15242
|
...__default__$g,
|
|
15211
15243
|
props: popperArrowProps,
|
|
15212
15244
|
setup(__props, { expose }) {
|
|
@@ -15233,7 +15265,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
15233
15265
|
};
|
|
15234
15266
|
}
|
|
15235
15267
|
});
|
|
15236
|
-
var ElPopperArrow = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15268
|
+
var ElPopperArrow = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__file", "arrow.vue"]]);
|
|
15237
15269
|
|
|
15238
15270
|
const NAME = "ElOnlyChild";
|
|
15239
15271
|
const OnlyChild = defineComponent({
|
|
@@ -15324,7 +15356,7 @@ const __default__$f = defineComponent({
|
|
|
15324
15356
|
name: "ElPopperTrigger",
|
|
15325
15357
|
inheritAttrs: false
|
|
15326
15358
|
});
|
|
15327
|
-
const _sfc_main$
|
|
15359
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
15328
15360
|
...__default__$f,
|
|
15329
15361
|
props: popperTriggerProps,
|
|
15330
15362
|
setup(__props, { expose }) {
|
|
@@ -15350,6 +15382,15 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
15350
15382
|
return ariaHaspopup.value ? `${props.open}` : void 0;
|
|
15351
15383
|
});
|
|
15352
15384
|
let virtualTriggerAriaStopWatch = void 0;
|
|
15385
|
+
const TRIGGER_ELE_EVENTS = [
|
|
15386
|
+
"onMouseenter",
|
|
15387
|
+
"onMouseleave",
|
|
15388
|
+
"onClick",
|
|
15389
|
+
"onKeydown",
|
|
15390
|
+
"onFocus",
|
|
15391
|
+
"onBlur",
|
|
15392
|
+
"onContextmenu"
|
|
15393
|
+
];
|
|
15353
15394
|
onMounted(() => {
|
|
15354
15395
|
watch(() => props.virtualRef, (virtualEl) => {
|
|
15355
15396
|
if (virtualEl) {
|
|
@@ -15362,15 +15403,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
15362
15403
|
virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch();
|
|
15363
15404
|
virtualTriggerAriaStopWatch = void 0;
|
|
15364
15405
|
if (isElement(el)) {
|
|
15365
|
-
|
|
15366
|
-
"onMouseenter",
|
|
15367
|
-
"onMouseleave",
|
|
15368
|
-
"onClick",
|
|
15369
|
-
"onKeydown",
|
|
15370
|
-
"onFocus",
|
|
15371
|
-
"onBlur",
|
|
15372
|
-
"onContextmenu"
|
|
15373
|
-
].forEach((eventName) => {
|
|
15406
|
+
TRIGGER_ELE_EVENTS.forEach((eventName) => {
|
|
15374
15407
|
var _a;
|
|
15375
15408
|
const handler = props[eventName];
|
|
15376
15409
|
if (handler) {
|
|
@@ -15404,6 +15437,16 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
15404
15437
|
onBeforeUnmount(() => {
|
|
15405
15438
|
virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch();
|
|
15406
15439
|
virtualTriggerAriaStopWatch = void 0;
|
|
15440
|
+
if (triggerRef.value && isElement(triggerRef.value)) {
|
|
15441
|
+
const el = triggerRef.value;
|
|
15442
|
+
TRIGGER_ELE_EVENTS.forEach((eventName) => {
|
|
15443
|
+
const handler = props[eventName];
|
|
15444
|
+
if (handler) {
|
|
15445
|
+
el.removeEventListener(eventName.slice(2).toLowerCase(), handler);
|
|
15446
|
+
}
|
|
15447
|
+
});
|
|
15448
|
+
triggerRef.value = void 0;
|
|
15449
|
+
}
|
|
15407
15450
|
});
|
|
15408
15451
|
expose({
|
|
15409
15452
|
triggerRef
|
|
@@ -15423,7 +15466,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
15423
15466
|
};
|
|
15424
15467
|
}
|
|
15425
15468
|
});
|
|
15426
|
-
var ElPopperTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15469
|
+
var ElPopperTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__file", "trigger.vue"]]);
|
|
15427
15470
|
|
|
15428
15471
|
const FOCUS_AFTER_TRAPPED = "focus-trap.focus-after-trapped";
|
|
15429
15472
|
const FOCUS_AFTER_RELEASED = "focus-trap.focus-after-released";
|
|
@@ -15573,7 +15616,7 @@ const createFocusOutPreventedEvent = (detail) => {
|
|
|
15573
15616
|
});
|
|
15574
15617
|
};
|
|
15575
15618
|
|
|
15576
|
-
const _sfc_main$
|
|
15619
|
+
const _sfc_main$l = defineComponent({
|
|
15577
15620
|
name: "ElFocusTrap",
|
|
15578
15621
|
inheritAttrs: false,
|
|
15579
15622
|
props: {
|
|
@@ -15803,6 +15846,12 @@ const _sfc_main$k = defineComponent({
|
|
|
15803
15846
|
if (props.trapped) {
|
|
15804
15847
|
stopTrap();
|
|
15805
15848
|
}
|
|
15849
|
+
if (forwardRef.value) {
|
|
15850
|
+
forwardRef.value.removeEventListener("keydown", onKeydown);
|
|
15851
|
+
forwardRef.value.removeEventListener("focusin", onFocusIn);
|
|
15852
|
+
forwardRef.value.removeEventListener("focusout", onFocusOut);
|
|
15853
|
+
forwardRef.value = void 0;
|
|
15854
|
+
}
|
|
15806
15855
|
});
|
|
15807
15856
|
return {
|
|
15808
15857
|
onKeydown
|
|
@@ -15812,7 +15861,7 @@ const _sfc_main$k = defineComponent({
|
|
|
15812
15861
|
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15813
15862
|
return renderSlot(_ctx.$slots, "default", { handleKeydown: _ctx.onKeydown });
|
|
15814
15863
|
}
|
|
15815
|
-
var ElFocusTrap = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15864
|
+
var ElFocusTrap = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$4], ["__file", "focus-trap.vue"]]);
|
|
15816
15865
|
|
|
15817
15866
|
const POSITIONING_STRATEGIES = ["fixed", "absolute"];
|
|
15818
15867
|
const popperCoreConfigProps = buildProps({
|
|
@@ -16103,7 +16152,7 @@ const usePopperContentFocusTrap = (props, emit) => {
|
|
|
16103
16152
|
const __default__$e = defineComponent({
|
|
16104
16153
|
name: "ElPopperContent"
|
|
16105
16154
|
});
|
|
16106
|
-
const _sfc_main$
|
|
16155
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
16107
16156
|
...__default__$e,
|
|
16108
16157
|
props: popperContentProps,
|
|
16109
16158
|
emits: popperContentEmits,
|
|
@@ -16197,8 +16246,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
16197
16246
|
style: unref(contentStyle),
|
|
16198
16247
|
class: unref(contentClass),
|
|
16199
16248
|
tabindex: "-1",
|
|
16200
|
-
onMouseenter:
|
|
16201
|
-
onMouseleave:
|
|
16249
|
+
onMouseenter: (e) => _ctx.$emit("mouseenter", e),
|
|
16250
|
+
onMouseleave: (e) => _ctx.$emit("mouseleave", e)
|
|
16202
16251
|
}), [
|
|
16203
16252
|
createVNode(unref(ElFocusTrap), {
|
|
16204
16253
|
trapped: unref(trapped),
|
|
@@ -16216,11 +16265,11 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
16216
16265
|
]),
|
|
16217
16266
|
_: 3
|
|
16218
16267
|
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
|
|
16219
|
-
], 16);
|
|
16268
|
+
], 16, ["onMouseenter", "onMouseleave"]);
|
|
16220
16269
|
};
|
|
16221
16270
|
}
|
|
16222
16271
|
});
|
|
16223
|
-
var ElPopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
16272
|
+
var ElPopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__file", "content.vue"]]);
|
|
16224
16273
|
|
|
16225
16274
|
const ElPopper = withInstall(Popper);
|
|
16226
16275
|
|
|
@@ -16305,7 +16354,7 @@ const whenTrigger = (trigger, type, handler) => {
|
|
|
16305
16354
|
const __default__$d = defineComponent({
|
|
16306
16355
|
name: "ElTooltipTrigger"
|
|
16307
16356
|
});
|
|
16308
|
-
const _sfc_main$
|
|
16357
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
16309
16358
|
...__default__$d,
|
|
16310
16359
|
props: useTooltipTriggerProps,
|
|
16311
16360
|
setup(__props, { expose }) {
|
|
@@ -16365,7 +16414,33 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
16365
16414
|
};
|
|
16366
16415
|
}
|
|
16367
16416
|
});
|
|
16368
|
-
var ElTooltipTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
16417
|
+
var ElTooltipTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__file", "trigger.vue"]]);
|
|
16418
|
+
|
|
16419
|
+
const teleportProps = buildProps({
|
|
16420
|
+
to: {
|
|
16421
|
+
type: definePropType([String, Object]),
|
|
16422
|
+
required: true
|
|
16423
|
+
},
|
|
16424
|
+
disabled: Boolean
|
|
16425
|
+
});
|
|
16426
|
+
|
|
16427
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
16428
|
+
__name: "teleport",
|
|
16429
|
+
props: teleportProps,
|
|
16430
|
+
setup(__props) {
|
|
16431
|
+
return (_ctx, _cache) => {
|
|
16432
|
+
return _ctx.disabled ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createBlock(Teleport$1, {
|
|
16433
|
+
key: 1,
|
|
16434
|
+
to: _ctx.to
|
|
16435
|
+
}, [
|
|
16436
|
+
renderSlot(_ctx.$slots, "default")
|
|
16437
|
+
], 8, ["to"]));
|
|
16438
|
+
};
|
|
16439
|
+
}
|
|
16440
|
+
});
|
|
16441
|
+
var Teleport = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__file", "teleport.vue"]]);
|
|
16442
|
+
|
|
16443
|
+
const ElTeleport = withInstall(Teleport);
|
|
16369
16444
|
|
|
16370
16445
|
const __default__$c = defineComponent({
|
|
16371
16446
|
name: "ElTooltipContent",
|
|
@@ -16379,7 +16454,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
16379
16454
|
const { selector } = usePopperContainerId();
|
|
16380
16455
|
const ns = useNamespace("tooltip");
|
|
16381
16456
|
const contentRef = ref(null);
|
|
16382
|
-
|
|
16457
|
+
let stopHandle;
|
|
16383
16458
|
const {
|
|
16384
16459
|
controlled,
|
|
16385
16460
|
id,
|
|
@@ -16399,7 +16474,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
16399
16474
|
return props.persistent;
|
|
16400
16475
|
});
|
|
16401
16476
|
onBeforeUnmount(() => {
|
|
16402
|
-
|
|
16477
|
+
stopHandle == null ? void 0 : stopHandle();
|
|
16403
16478
|
});
|
|
16404
16479
|
const shouldRender = computed(() => {
|
|
16405
16480
|
return unref(persistentRef) ? true : unref(open);
|
|
@@ -16459,7 +16534,6 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
16459
16534
|
onClose();
|
|
16460
16535
|
}
|
|
16461
16536
|
};
|
|
16462
|
-
let stopHandle;
|
|
16463
16537
|
watch(() => unref(open), (val) => {
|
|
16464
16538
|
if (!val) {
|
|
16465
16539
|
stopHandle == null ? void 0 : stopHandle();
|
|
@@ -16475,65 +16549,66 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
16475
16549
|
contentRef
|
|
16476
16550
|
});
|
|
16477
16551
|
return (_ctx, _cache) => {
|
|
16478
|
-
return openBlock(), createBlock(
|
|
16552
|
+
return openBlock(), createBlock(unref(ElTeleport), {
|
|
16479
16553
|
disabled: !_ctx.teleported,
|
|
16480
16554
|
to: unref(appendTo)
|
|
16481
|
-
},
|
|
16482
|
-
|
|
16483
|
-
|
|
16484
|
-
|
|
16485
|
-
|
|
16486
|
-
|
|
16487
|
-
|
|
16488
|
-
|
|
16489
|
-
|
|
16490
|
-
|
|
16491
|
-
|
|
16492
|
-
|
|
16493
|
-
|
|
16494
|
-
|
|
16495
|
-
|
|
16496
|
-
|
|
16497
|
-
|
|
16498
|
-
|
|
16499
|
-
|
|
16500
|
-
|
|
16501
|
-
|
|
16502
|
-
|
|
16503
|
-
|
|
16504
|
-
|
|
16505
|
-
|
|
16506
|
-
|
|
16507
|
-
|
|
16508
|
-
|
|
16509
|
-
|
|
16510
|
-
|
|
16511
|
-
|
|
16512
|
-
|
|
16513
|
-
|
|
16514
|
-
|
|
16515
|
-
|
|
16516
|
-
|
|
16517
|
-
|
|
16518
|
-
|
|
16519
|
-
|
|
16520
|
-
|
|
16521
|
-
|
|
16522
|
-
|
|
16523
|
-
|
|
16524
|
-
[
|
|
16525
|
-
|
|
16526
|
-
|
|
16527
|
-
|
|
16528
|
-
|
|
16529
|
-
|
|
16555
|
+
}, {
|
|
16556
|
+
default: withCtx(() => [
|
|
16557
|
+
createVNode(Transition, {
|
|
16558
|
+
name: unref(transitionClass),
|
|
16559
|
+
onAfterLeave: onTransitionLeave,
|
|
16560
|
+
onBeforeEnter,
|
|
16561
|
+
onAfterEnter: onAfterShow,
|
|
16562
|
+
onBeforeLeave
|
|
16563
|
+
}, {
|
|
16564
|
+
default: withCtx(() => [
|
|
16565
|
+
unref(shouldRender) ? withDirectives((openBlock(), createBlock(unref(ElPopperContent), mergeProps({
|
|
16566
|
+
key: 0,
|
|
16567
|
+
id: unref(id),
|
|
16568
|
+
ref_key: "contentRef",
|
|
16569
|
+
ref: contentRef
|
|
16570
|
+
}, _ctx.$attrs, {
|
|
16571
|
+
"aria-label": _ctx.ariaLabel,
|
|
16572
|
+
"aria-hidden": unref(ariaHidden),
|
|
16573
|
+
"boundaries-padding": _ctx.boundariesPadding,
|
|
16574
|
+
"fallback-placements": _ctx.fallbackPlacements,
|
|
16575
|
+
"gpu-acceleration": _ctx.gpuAcceleration,
|
|
16576
|
+
offset: _ctx.offset,
|
|
16577
|
+
placement: _ctx.placement,
|
|
16578
|
+
"popper-options": _ctx.popperOptions,
|
|
16579
|
+
strategy: _ctx.strategy,
|
|
16580
|
+
effect: _ctx.effect,
|
|
16581
|
+
enterable: _ctx.enterable,
|
|
16582
|
+
pure: _ctx.pure,
|
|
16583
|
+
"popper-class": _ctx.popperClass,
|
|
16584
|
+
"popper-style": [_ctx.popperStyle, unref(contentStyle)],
|
|
16585
|
+
"reference-el": _ctx.referenceEl,
|
|
16586
|
+
"trigger-target-el": _ctx.triggerTargetEl,
|
|
16587
|
+
visible: unref(shouldShow),
|
|
16588
|
+
"z-index": _ctx.zIndex,
|
|
16589
|
+
onMouseenter: unref(onContentEnter),
|
|
16590
|
+
onMouseleave: unref(onContentLeave),
|
|
16591
|
+
onBlur,
|
|
16592
|
+
onClose: unref(onClose)
|
|
16593
|
+
}), {
|
|
16594
|
+
default: withCtx(() => [
|
|
16595
|
+
renderSlot(_ctx.$slots, "default")
|
|
16596
|
+
]),
|
|
16597
|
+
_: 3
|
|
16598
|
+
}, 16, ["id", "aria-label", "aria-hidden", "boundaries-padding", "fallback-placements", "gpu-acceleration", "offset", "placement", "popper-options", "strategy", "effect", "enterable", "pure", "popper-class", "popper-style", "reference-el", "trigger-target-el", "visible", "z-index", "onMouseenter", "onMouseleave", "onClose"])), [
|
|
16599
|
+
[vShow, unref(shouldShow)]
|
|
16600
|
+
]) : createCommentVNode("v-if", true)
|
|
16601
|
+
]),
|
|
16602
|
+
_: 3
|
|
16603
|
+
}, 8, ["name"])
|
|
16604
|
+
]),
|
|
16605
|
+
_: 3
|
|
16606
|
+
}, 8, ["disabled", "to"]);
|
|
16530
16607
|
};
|
|
16531
16608
|
}
|
|
16532
16609
|
});
|
|
16533
16610
|
var ElTooltipContent = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__file", "content.vue"]]);
|
|
16534
16611
|
|
|
16535
|
-
const _hoisted_1$9 = ["innerHTML"];
|
|
16536
|
-
const _hoisted_2$8 = { key: 1 };
|
|
16537
16612
|
const __default__$b = defineComponent({
|
|
16538
16613
|
name: "ElTooltip"
|
|
16539
16614
|
});
|
|
@@ -16675,7 +16750,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
16675
16750
|
_ctx.rawContent ? (openBlock(), createElementBlock("span", {
|
|
16676
16751
|
key: 0,
|
|
16677
16752
|
innerHTML: _ctx.content
|
|
16678
|
-
}, null, 8,
|
|
16753
|
+
}, null, 8, ["innerHTML"])) : (openBlock(), createElementBlock("span", { key: 1 }, toDisplayString(_ctx.content), 1))
|
|
16679
16754
|
]),
|
|
16680
16755
|
_ctx.showArrow ? (openBlock(), createBlock(unref(ElPopperArrow), {
|
|
16681
16756
|
key: 0,
|
|
@@ -16740,6 +16815,10 @@ const useButton = (props, emit) => {
|
|
|
16740
16815
|
return false;
|
|
16741
16816
|
});
|
|
16742
16817
|
const handleClick = (evt) => {
|
|
16818
|
+
if (_disabled.value || props.loading) {
|
|
16819
|
+
evt.stopPropagation();
|
|
16820
|
+
return;
|
|
16821
|
+
}
|
|
16743
16822
|
if (props.nativeType === "reset") {
|
|
16744
16823
|
form == null ? void 0 : form.resetFields();
|
|
16745
16824
|
}
|
|
@@ -17860,14 +17939,17 @@ const ElButton = withInstall(Button, {
|
|
|
17860
17939
|
withNoopInstall(ButtonGroup);
|
|
17861
17940
|
|
|
17862
17941
|
const nodeList$1 = /* @__PURE__ */ new Map();
|
|
17863
|
-
let startClick;
|
|
17864
17942
|
if (isClient) {
|
|
17943
|
+
let startClick;
|
|
17865
17944
|
document.addEventListener("mousedown", (e) => startClick = e);
|
|
17866
17945
|
document.addEventListener("mouseup", (e) => {
|
|
17867
|
-
|
|
17868
|
-
for (const
|
|
17869
|
-
|
|
17946
|
+
if (startClick) {
|
|
17947
|
+
for (const handlers of nodeList$1.values()) {
|
|
17948
|
+
for (const { documentHandler } of handlers) {
|
|
17949
|
+
documentHandler(e, startClick);
|
|
17950
|
+
}
|
|
17870
17951
|
}
|
|
17952
|
+
startClick = void 0;
|
|
17871
17953
|
}
|
|
17872
17954
|
});
|
|
17873
17955
|
}
|
|
@@ -18016,6 +18098,9 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
18016
18098
|
const handleClick = (event) => {
|
|
18017
18099
|
emit("click", event);
|
|
18018
18100
|
};
|
|
18101
|
+
const handleVNodeMounted = (vnode) => {
|
|
18102
|
+
vnode.component.subTree.component.bum = null;
|
|
18103
|
+
};
|
|
18019
18104
|
return (_ctx, _cache) => {
|
|
18020
18105
|
return _ctx.disableTransitions ? (openBlock(), createElementBlock("span", {
|
|
18021
18106
|
key: 0,
|
|
@@ -18041,7 +18126,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
18041
18126
|
], 6)) : (openBlock(), createBlock(Transition, {
|
|
18042
18127
|
key: 1,
|
|
18043
18128
|
name: `${unref(ns).namespace.value}-zoom-in-center`,
|
|
18044
|
-
appear: ""
|
|
18129
|
+
appear: "",
|
|
18130
|
+
onVnodeMounted: handleVNodeMounted
|
|
18045
18131
|
}, {
|
|
18046
18132
|
default: withCtx(() => [
|
|
18047
18133
|
createElementVNode("span", {
|
|
@@ -18112,7 +18198,6 @@ const inputNumberProps = buildProps({
|
|
|
18112
18198
|
default: null
|
|
18113
18199
|
},
|
|
18114
18200
|
name: String,
|
|
18115
|
-
label: String,
|
|
18116
18201
|
placeholder: String,
|
|
18117
18202
|
precision: {
|
|
18118
18203
|
type: Number,
|
|
@@ -18132,8 +18217,6 @@ const inputNumberEmits = {
|
|
|
18132
18217
|
[UPDATE_MODEL_EVENT]: (val) => isNumber(val) || isNil(val)
|
|
18133
18218
|
};
|
|
18134
18219
|
|
|
18135
|
-
const _hoisted_1$8 = ["aria-label", "onKeydown"];
|
|
18136
|
-
const _hoisted_2$7 = ["aria-label", "onKeydown"];
|
|
18137
18220
|
const __default__$7 = defineComponent({
|
|
18138
18221
|
name: "ElInputNumber"
|
|
18139
18222
|
});
|
|
@@ -18362,13 +18445,6 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
18362
18445
|
const innerInput = (_a = input.value) == null ? void 0 : _a.input;
|
|
18363
18446
|
innerInput == null ? void 0 : innerInput.setAttribute("aria-valuenow", `${(_b = data.currentValue) != null ? _b : ""}`);
|
|
18364
18447
|
});
|
|
18365
|
-
useDeprecated({
|
|
18366
|
-
from: "label",
|
|
18367
|
-
replacement: "aria-label",
|
|
18368
|
-
version: "2.8.0",
|
|
18369
|
-
scope: "el-input-number",
|
|
18370
|
-
ref: "https://element-plus.org/en-US/component/input-number.html"
|
|
18371
|
-
}, computed(() => !!props.label));
|
|
18372
18448
|
expose({
|
|
18373
18449
|
focus,
|
|
18374
18450
|
blur
|
|
@@ -18382,8 +18458,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
18382
18458
|
unref(ns).is("without-controls", !_ctx.controls),
|
|
18383
18459
|
unref(ns).is("controls-right", unref(controlsAtRight))
|
|
18384
18460
|
]),
|
|
18385
|
-
onDragstart:
|
|
18386
|
-
}, ["prevent"])
|
|
18461
|
+
onDragstart: withModifiers(() => {
|
|
18462
|
+
}, ["prevent"])
|
|
18387
18463
|
}, [
|
|
18388
18464
|
_ctx.controls ? withDirectives((openBlock(), createElementBlock("span", {
|
|
18389
18465
|
key: 0,
|
|
@@ -18400,7 +18476,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
18400
18476
|
_: 1
|
|
18401
18477
|
})
|
|
18402
18478
|
])
|
|
18403
|
-
], 42,
|
|
18479
|
+
], 42, ["aria-label", "onKeydown"])), [
|
|
18404
18480
|
[unref(vRepeatClick), decrease]
|
|
18405
18481
|
]) : createCommentVNode("v-if", true),
|
|
18406
18482
|
_ctx.controls ? withDirectives((openBlock(), createElementBlock("span", {
|
|
@@ -18418,7 +18494,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
18418
18494
|
_: 1
|
|
18419
18495
|
})
|
|
18420
18496
|
])
|
|
18421
|
-
], 42,
|
|
18497
|
+
], 42, ["aria-label", "onKeydown"])), [
|
|
18422
18498
|
[unref(vRepeatClick), increase]
|
|
18423
18499
|
]) : createCommentVNode("v-if", true),
|
|
18424
18500
|
createVNode(unref(ElInput), {
|
|
@@ -18435,7 +18511,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
18435
18511
|
max: _ctx.max,
|
|
18436
18512
|
min: _ctx.min,
|
|
18437
18513
|
name: _ctx.name,
|
|
18438
|
-
"aria-label": _ctx.
|
|
18514
|
+
"aria-label": _ctx.ariaLabel,
|
|
18439
18515
|
"validate-event": false,
|
|
18440
18516
|
onKeydown: [
|
|
18441
18517
|
withKeys(withModifiers(increase, ["prevent"]), ["up"]),
|
|
@@ -18446,7 +18522,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
18446
18522
|
onInput: handleInput,
|
|
18447
18523
|
onChange: handleInputChange
|
|
18448
18524
|
}, null, 8, ["id", "step", "model-value", "placeholder", "readonly", "disabled", "size", "max", "min", "name", "aria-label", "onKeydown"])
|
|
18449
|
-
],
|
|
18525
|
+
], 42, ["onDragstart"]);
|
|
18450
18526
|
};
|
|
18451
18527
|
}
|
|
18452
18528
|
});
|
|
@@ -18461,15 +18537,12 @@ function useOption(props, states) {
|
|
|
18461
18537
|
const select = inject(selectKey);
|
|
18462
18538
|
const selectGroup = inject(selectGroupKey, { disabled: false });
|
|
18463
18539
|
const itemSelected = computed(() => {
|
|
18464
|
-
|
|
18465
|
-
return contains(select.props.modelValue, props.value);
|
|
18466
|
-
} else {
|
|
18467
|
-
return contains([select.props.modelValue], props.value);
|
|
18468
|
-
}
|
|
18540
|
+
return contains(castArray(select.props.modelValue), props.value);
|
|
18469
18541
|
});
|
|
18470
18542
|
const limitReached = computed(() => {
|
|
18543
|
+
var _a;
|
|
18471
18544
|
if (select.props.multiple) {
|
|
18472
|
-
const modelValue = select.props.modelValue
|
|
18545
|
+
const modelValue = castArray((_a = select.props.modelValue) != null ? _a : []);
|
|
18473
18546
|
return !itemSelected.value && modelValue.length >= select.props.multipleLimit && select.props.multipleLimit > 0;
|
|
18474
18547
|
} else {
|
|
18475
18548
|
return false;
|
|
@@ -18510,7 +18583,7 @@ function useOption(props, states) {
|
|
|
18510
18583
|
});
|
|
18511
18584
|
watch(() => props.value, (val, oldVal) => {
|
|
18512
18585
|
const { remote, valueKey } = select.props;
|
|
18513
|
-
if (
|
|
18586
|
+
if (val !== oldVal) {
|
|
18514
18587
|
select.onOptionDestroy(oldVal, instance.proxy);
|
|
18515
18588
|
select.onOptionCreate(instance.proxy);
|
|
18516
18589
|
}
|
|
@@ -18588,7 +18661,7 @@ const _sfc_main$b = defineComponent({
|
|
|
18588
18661
|
select.onOptionDestroy(key, vm);
|
|
18589
18662
|
});
|
|
18590
18663
|
function selectOptionClick() {
|
|
18591
|
-
if (
|
|
18664
|
+
if (!isDisabled.value) {
|
|
18592
18665
|
select.handleOptionSelect(vm);
|
|
18593
18666
|
}
|
|
18594
18667
|
}
|
|
@@ -18609,7 +18682,6 @@ const _sfc_main$b = defineComponent({
|
|
|
18609
18682
|
};
|
|
18610
18683
|
}
|
|
18611
18684
|
});
|
|
18612
|
-
const _hoisted_1$7 = ["id", "aria-disabled", "aria-selected"];
|
|
18613
18685
|
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
18614
18686
|
return withDirectives((openBlock(), createElementBlock("li", {
|
|
18615
18687
|
id: _ctx.id,
|
|
@@ -18617,13 +18689,13 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18617
18689
|
role: "option",
|
|
18618
18690
|
"aria-disabled": _ctx.isDisabled || void 0,
|
|
18619
18691
|
"aria-selected": _ctx.itemSelected,
|
|
18620
|
-
onMouseenter:
|
|
18621
|
-
onClick:
|
|
18692
|
+
onMouseenter: _ctx.hoverItem,
|
|
18693
|
+
onClick: withModifiers(_ctx.selectOptionClick, ["stop"])
|
|
18622
18694
|
}, [
|
|
18623
18695
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
18624
18696
|
createElementVNode("span", null, toDisplayString(_ctx.currentLabel), 1)
|
|
18625
18697
|
])
|
|
18626
|
-
], 42,
|
|
18698
|
+
], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [
|
|
18627
18699
|
[vShow, _ctx.visible]
|
|
18628
18700
|
]);
|
|
18629
18701
|
}
|
|
@@ -18678,31 +18750,6 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18678
18750
|
}
|
|
18679
18751
|
var ElSelectMenu = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$2], ["__file", "select-dropdown.vue"]]);
|
|
18680
18752
|
|
|
18681
|
-
function useInput(handleInput) {
|
|
18682
|
-
const isComposing = ref(false);
|
|
18683
|
-
const handleCompositionStart = () => {
|
|
18684
|
-
isComposing.value = true;
|
|
18685
|
-
};
|
|
18686
|
-
const handleCompositionUpdate = (event) => {
|
|
18687
|
-
const text = event.target.value;
|
|
18688
|
-
const lastCharacter = text[text.length - 1] || "";
|
|
18689
|
-
isComposing.value = !isKorean(lastCharacter);
|
|
18690
|
-
};
|
|
18691
|
-
const handleCompositionEnd = (event) => {
|
|
18692
|
-
if (isComposing.value) {
|
|
18693
|
-
isComposing.value = false;
|
|
18694
|
-
if (isFunction$1(handleInput)) {
|
|
18695
|
-
handleInput(event);
|
|
18696
|
-
}
|
|
18697
|
-
}
|
|
18698
|
-
};
|
|
18699
|
-
return {
|
|
18700
|
-
handleCompositionStart,
|
|
18701
|
-
handleCompositionUpdate,
|
|
18702
|
-
handleCompositionEnd
|
|
18703
|
-
};
|
|
18704
|
-
}
|
|
18705
|
-
|
|
18706
18753
|
const MINIMUM_INPUT_WIDTH = 11;
|
|
18707
18754
|
const useSelect = (props, emit) => {
|
|
18708
18755
|
const { t } = useLocale();
|
|
@@ -18715,7 +18762,7 @@ const useSelect = (props, emit) => {
|
|
|
18715
18762
|
cachedOptions: /* @__PURE__ */ new Map(),
|
|
18716
18763
|
disabledOptions: /* @__PURE__ */ new Map(),
|
|
18717
18764
|
optionValues: [],
|
|
18718
|
-
selected:
|
|
18765
|
+
selected: [],
|
|
18719
18766
|
selectionWidth: 0,
|
|
18720
18767
|
calculatorWidth: 0,
|
|
18721
18768
|
collapseItemWidth: 0,
|
|
@@ -18738,7 +18785,18 @@ const useSelect = (props, emit) => {
|
|
|
18738
18785
|
const tagMenuRef = ref(null);
|
|
18739
18786
|
const collapseItemRef = ref(null);
|
|
18740
18787
|
const scrollbarRef = ref(null);
|
|
18741
|
-
const {
|
|
18788
|
+
const {
|
|
18789
|
+
isComposing,
|
|
18790
|
+
handleCompositionStart,
|
|
18791
|
+
handleCompositionUpdate,
|
|
18792
|
+
handleCompositionEnd
|
|
18793
|
+
} = useComposition({
|
|
18794
|
+
afterComposition: (e) => onInput(e)
|
|
18795
|
+
});
|
|
18796
|
+
const { wrapperRef, isFocused } = useFocusController(inputRef, {
|
|
18797
|
+
beforeFocus() {
|
|
18798
|
+
return selectDisabled.value;
|
|
18799
|
+
},
|
|
18742
18800
|
afterFocus() {
|
|
18743
18801
|
if (props.automaticDropdown && !expanded.value) {
|
|
18744
18802
|
expanded.value = true;
|
|
@@ -18763,7 +18821,7 @@ const useSelect = (props, emit) => {
|
|
|
18763
18821
|
const { valueOnClear, isEmptyValue } = useEmptyValues(props);
|
|
18764
18822
|
const selectDisabled = computed(() => props.disabled || (form == null ? void 0 : form.disabled));
|
|
18765
18823
|
const hasModelValue = computed(() => {
|
|
18766
|
-
return
|
|
18824
|
+
return isArray$1(props.modelValue) ? props.modelValue.length > 0 : !isEmptyValue(props.modelValue);
|
|
18767
18825
|
});
|
|
18768
18826
|
const showClose = computed(() => {
|
|
18769
18827
|
return props.clearable && !selectDisabled.value && states.inputHovering && hasModelValue.value;
|
|
@@ -18830,10 +18888,11 @@ const useSelect = (props, emit) => {
|
|
|
18830
18888
|
}
|
|
18831
18889
|
});
|
|
18832
18890
|
const shouldShowPlaceholder = computed(() => {
|
|
18833
|
-
if (
|
|
18834
|
-
return props.modelValue.length === 0 && !states.inputValue;
|
|
18891
|
+
if (props.multiple && !isUndefined(props.modelValue)) {
|
|
18892
|
+
return castArray(props.modelValue).length === 0 && !states.inputValue;
|
|
18835
18893
|
}
|
|
18836
|
-
|
|
18894
|
+
const value = isArray$1(props.modelValue) ? props.modelValue[0] : props.modelValue;
|
|
18895
|
+
return props.filterable || isUndefined(value) ? !states.inputValue : true;
|
|
18837
18896
|
});
|
|
18838
18897
|
const currentPlaceholder = computed(() => {
|
|
18839
18898
|
var _a;
|
|
@@ -18896,7 +18955,7 @@ const useSelect = (props, emit) => {
|
|
|
18896
18955
|
updateOptions();
|
|
18897
18956
|
});
|
|
18898
18957
|
const handleQueryChange = (val) => {
|
|
18899
|
-
if (states.previousQuery === val) {
|
|
18958
|
+
if (states.previousQuery === val || isComposing.value) {
|
|
18900
18959
|
return;
|
|
18901
18960
|
}
|
|
18902
18961
|
states.previousQuery = val;
|
|
@@ -18919,16 +18978,17 @@ const useSelect = (props, emit) => {
|
|
|
18919
18978
|
};
|
|
18920
18979
|
const setSelected = () => {
|
|
18921
18980
|
if (!props.multiple) {
|
|
18922
|
-
const
|
|
18981
|
+
const value = isArray$1(props.modelValue) ? props.modelValue[0] : props.modelValue;
|
|
18982
|
+
const option = getOption(value);
|
|
18923
18983
|
states.selectedLabel = option.currentLabel;
|
|
18924
|
-
states.selected = option;
|
|
18984
|
+
states.selected = [option];
|
|
18925
18985
|
return;
|
|
18926
18986
|
} else {
|
|
18927
18987
|
states.selectedLabel = "";
|
|
18928
18988
|
}
|
|
18929
18989
|
const result = [];
|
|
18930
|
-
if (
|
|
18931
|
-
props.modelValue.forEach((value) => {
|
|
18990
|
+
if (!isUndefined(props.modelValue)) {
|
|
18991
|
+
castArray(props.modelValue).forEach((value) => {
|
|
18932
18992
|
result.push(getOption(value));
|
|
18933
18993
|
});
|
|
18934
18994
|
}
|
|
@@ -18963,13 +19023,7 @@ const useSelect = (props, emit) => {
|
|
|
18963
19023
|
return newOption;
|
|
18964
19024
|
};
|
|
18965
19025
|
const updateHoveringIndex = () => {
|
|
18966
|
-
|
|
18967
|
-
states.hoveringIndex = optionsArray.value.findIndex((item) => {
|
|
18968
|
-
return getValueKey(item) === getValueKey(states.selected);
|
|
18969
|
-
});
|
|
18970
|
-
} else {
|
|
18971
|
-
states.hoveringIndex = optionsArray.value.findIndex((item) => states.selected.some((selected) => getValueKey(selected) === getValueKey(item)));
|
|
18972
|
-
}
|
|
19026
|
+
states.hoveringIndex = optionsArray.value.findIndex((item) => states.selected.some((selected) => getValueKey(selected) === getValueKey(item)));
|
|
18973
19027
|
};
|
|
18974
19028
|
const resetSelectionWidth = () => {
|
|
18975
19029
|
states.selectionWidth = selectionRef.value.getBoundingClientRect().width;
|
|
@@ -19017,7 +19071,7 @@ const useSelect = (props, emit) => {
|
|
|
19017
19071
|
if (e.code === EVENT_CODE.delete)
|
|
19018
19072
|
return;
|
|
19019
19073
|
if (e.target.value.length <= 0) {
|
|
19020
|
-
const value = props.modelValue.slice();
|
|
19074
|
+
const value = castArray(props.modelValue).slice();
|
|
19021
19075
|
const lastNotDisabledIndex = getLastNotDisabledIndex(value);
|
|
19022
19076
|
if (lastNotDisabledIndex < 0)
|
|
19023
19077
|
return;
|
|
@@ -19031,7 +19085,7 @@ const useSelect = (props, emit) => {
|
|
|
19031
19085
|
const deleteTag = (event, tag) => {
|
|
19032
19086
|
const index = states.selected.indexOf(tag);
|
|
19033
19087
|
if (index > -1 && !selectDisabled.value) {
|
|
19034
|
-
const value = props.modelValue.slice();
|
|
19088
|
+
const value = castArray(props.modelValue).slice();
|
|
19035
19089
|
value.splice(index, 1);
|
|
19036
19090
|
emit(UPDATE_MODEL_EVENT, value);
|
|
19037
19091
|
emitChange(value);
|
|
@@ -19057,8 +19111,9 @@ const useSelect = (props, emit) => {
|
|
|
19057
19111
|
focus();
|
|
19058
19112
|
};
|
|
19059
19113
|
const handleOptionSelect = (option) => {
|
|
19114
|
+
var _a;
|
|
19060
19115
|
if (props.multiple) {
|
|
19061
|
-
const value = (props.modelValue
|
|
19116
|
+
const value = castArray((_a = props.modelValue) != null ? _a : []).slice();
|
|
19062
19117
|
const optionIndex = getValueIndex(value, option.value);
|
|
19063
19118
|
if (optionIndex > -1) {
|
|
19064
19119
|
value.splice(optionIndex, 1);
|
|
@@ -19127,11 +19182,6 @@ const useSelect = (props, emit) => {
|
|
|
19127
19182
|
states.options.delete(key);
|
|
19128
19183
|
}
|
|
19129
19184
|
};
|
|
19130
|
-
const {
|
|
19131
|
-
handleCompositionStart,
|
|
19132
|
-
handleCompositionUpdate,
|
|
19133
|
-
handleCompositionEnd
|
|
19134
|
-
} = useInput((e) => onInput(e));
|
|
19135
19185
|
const popperRef = computed(() => {
|
|
19136
19186
|
var _a, _b;
|
|
19137
19187
|
return (_b = (_a = tooltipRef.value) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.contentRef;
|
|
@@ -19145,17 +19195,15 @@ const useSelect = (props, emit) => {
|
|
|
19145
19195
|
(_a = inputRef.value) == null ? void 0 : _a.focus();
|
|
19146
19196
|
};
|
|
19147
19197
|
const blur = () => {
|
|
19148
|
-
|
|
19198
|
+
var _a;
|
|
19199
|
+
(_a = inputRef.value) == null ? void 0 : _a.blur();
|
|
19149
19200
|
};
|
|
19150
19201
|
const handleClearClick = (event) => {
|
|
19151
19202
|
deleteSelected(event);
|
|
19152
19203
|
};
|
|
19153
|
-
const handleClickOutside = (
|
|
19204
|
+
const handleClickOutside = () => {
|
|
19154
19205
|
expanded.value = false;
|
|
19155
|
-
|
|
19156
|
-
const _event = new FocusEvent("focus", event);
|
|
19157
|
-
nextTick(() => handleBlur(_event));
|
|
19158
|
-
}
|
|
19206
|
+
isFocused.value && blur();
|
|
19159
19207
|
};
|
|
19160
19208
|
const handleEsc = () => {
|
|
19161
19209
|
if (states.inputValue.length > 0) {
|
|
@@ -19205,7 +19253,7 @@ const useSelect = (props, emit) => {
|
|
|
19205
19253
|
expanded.value = true;
|
|
19206
19254
|
return;
|
|
19207
19255
|
}
|
|
19208
|
-
if (states.options.size === 0 || filteredOptionsCount
|
|
19256
|
+
if (states.options.size === 0 || states.filteredOptionsCount === 0 || isComposing.value)
|
|
19209
19257
|
return;
|
|
19210
19258
|
if (!optionsAllDisabled.value) {
|
|
19211
19259
|
if (direction === "next") {
|
|
@@ -19243,12 +19291,6 @@ const useSelect = (props, emit) => {
|
|
|
19243
19291
|
const inputStyle = computed(() => ({
|
|
19244
19292
|
width: `${Math.max(states.calculatorWidth, MINIMUM_INPUT_WIDTH)}px`
|
|
19245
19293
|
}));
|
|
19246
|
-
if (props.multiple && !isArray$1(props.modelValue)) {
|
|
19247
|
-
emit(UPDATE_MODEL_EVENT, []);
|
|
19248
|
-
}
|
|
19249
|
-
if (!props.multiple && isArray$1(props.modelValue)) {
|
|
19250
|
-
emit(UPDATE_MODEL_EVENT, "");
|
|
19251
|
-
}
|
|
19252
19294
|
useResizeObserver(selectionRef, resetSelectionWidth);
|
|
19253
19295
|
useResizeObserver(calculatorRef, resetCalculatorWidth);
|
|
19254
19296
|
useResizeObserver(menuRef, updateTooltip);
|
|
@@ -19301,10 +19343,8 @@ const useSelect = (props, emit) => {
|
|
|
19301
19343
|
onOptionCreate,
|
|
19302
19344
|
onOptionDestroy,
|
|
19303
19345
|
handleMenuEnter,
|
|
19304
|
-
handleFocus,
|
|
19305
19346
|
focus,
|
|
19306
19347
|
blur,
|
|
19307
|
-
handleBlur,
|
|
19308
19348
|
handleClearClick,
|
|
19309
19349
|
handleClickOutside,
|
|
19310
19350
|
handleEsc,
|
|
@@ -19471,7 +19511,6 @@ const _sfc_main$9 = defineComponent({
|
|
|
19471
19511
|
name: COMPONENT_NAME,
|
|
19472
19512
|
componentName: COMPONENT_NAME,
|
|
19473
19513
|
components: {
|
|
19474
|
-
ElInput,
|
|
19475
19514
|
ElSelectMenu,
|
|
19476
19515
|
ElOption: Option,
|
|
19477
19516
|
ElOptions,
|
|
@@ -19492,9 +19531,21 @@ const _sfc_main$9 = defineComponent({
|
|
|
19492
19531
|
"blur"
|
|
19493
19532
|
],
|
|
19494
19533
|
setup(props, { emit }) {
|
|
19495
|
-
const
|
|
19534
|
+
const modelValue = computed(() => {
|
|
19535
|
+
const { modelValue: rawModelValue, multiple } = props;
|
|
19536
|
+
const fallback = multiple ? [] : void 0;
|
|
19537
|
+
if (isArray$1(rawModelValue)) {
|
|
19538
|
+
return multiple ? rawModelValue : fallback;
|
|
19539
|
+
}
|
|
19540
|
+
return multiple ? fallback : rawModelValue;
|
|
19541
|
+
});
|
|
19542
|
+
const _props = reactive({
|
|
19543
|
+
...toRefs(props),
|
|
19544
|
+
modelValue
|
|
19545
|
+
});
|
|
19546
|
+
const API = useSelect(_props, emit);
|
|
19496
19547
|
provide(selectKey, reactive({
|
|
19497
|
-
props,
|
|
19548
|
+
props: _props,
|
|
19498
19549
|
states: API.states,
|
|
19499
19550
|
optionsArray: API.optionsArray,
|
|
19500
19551
|
handleOptionSelect: API.handleOptionSelect,
|
|
@@ -19504,13 +19555,11 @@ const _sfc_main$9 = defineComponent({
|
|
|
19504
19555
|
setSelected: API.setSelected
|
|
19505
19556
|
}));
|
|
19506
19557
|
return {
|
|
19507
|
-
...API
|
|
19558
|
+
...API,
|
|
19559
|
+
modelValue
|
|
19508
19560
|
};
|
|
19509
19561
|
}
|
|
19510
19562
|
});
|
|
19511
|
-
const _hoisted_1$6 = ["id", "name", "disabled", "autocomplete", "readonly", "aria-activedescendant", "aria-controls", "aria-expanded", "aria-label"];
|
|
19512
|
-
const _hoisted_2$6 = ["textContent"];
|
|
19513
|
-
const _hoisted_3$6 = { key: 1 };
|
|
19514
19563
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
19515
19564
|
const _component_el_tag = resolveComponent("el-tag");
|
|
19516
19565
|
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
@@ -19523,9 +19572,8 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19523
19572
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
19524
19573
|
ref: "selectRef",
|
|
19525
19574
|
class: normalizeClass([_ctx.nsSelect.b(), _ctx.nsSelect.m(_ctx.selectSize)]),
|
|
19526
|
-
[toHandlerKey(_ctx.mouseEnterEventName)]:
|
|
19527
|
-
onMouseleave:
|
|
19528
|
-
onClick: _cache[18] || (_cache[18] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["prevent", "stop"]))
|
|
19575
|
+
[toHandlerKey(_ctx.mouseEnterEventName)]: ($event) => _ctx.states.inputHovering = true,
|
|
19576
|
+
onMouseleave: ($event) => _ctx.states.inputHovering = false
|
|
19529
19577
|
}, [
|
|
19530
19578
|
createVNode(_component_el_tooltip, {
|
|
19531
19579
|
ref: "tooltipRef",
|
|
@@ -19543,7 +19591,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19543
19591
|
"gpu-acceleration": false,
|
|
19544
19592
|
persistent: _ctx.persistent,
|
|
19545
19593
|
onBeforeShow: _ctx.handleMenuEnter,
|
|
19546
|
-
onHide:
|
|
19594
|
+
onHide: ($event) => _ctx.states.isBeforeHide = false
|
|
19547
19595
|
}, {
|
|
19548
19596
|
default: withCtx(() => {
|
|
19549
19597
|
var _a;
|
|
@@ -19556,7 +19604,8 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19556
19604
|
_ctx.nsSelect.is("hovering", _ctx.states.inputHovering),
|
|
19557
19605
|
_ctx.nsSelect.is("filterable", _ctx.filterable),
|
|
19558
19606
|
_ctx.nsSelect.is("disabled", _ctx.selectDisabled)
|
|
19559
|
-
])
|
|
19607
|
+
]),
|
|
19608
|
+
onClick: withModifiers(_ctx.toggleMenu, ["prevent"])
|
|
19560
19609
|
}, [
|
|
19561
19610
|
_ctx.$slots.prefix ? (openBlock(), createElementBlock("div", {
|
|
19562
19611
|
key: 0,
|
|
@@ -19685,7 +19734,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19685
19734
|
withDirectives(createElementVNode("input", {
|
|
19686
19735
|
id: _ctx.inputId,
|
|
19687
19736
|
ref: "inputRef",
|
|
19688
|
-
"onUpdate:modelValue":
|
|
19737
|
+
"onUpdate:modelValue": ($event) => _ctx.states.inputValue = $event,
|
|
19689
19738
|
type: "text",
|
|
19690
19739
|
name: _ctx.name,
|
|
19691
19740
|
class: normalizeClass([_ctx.nsSelect.e("input"), _ctx.nsSelect.is(_ctx.selectSize)]),
|
|
@@ -19701,21 +19750,19 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19701
19750
|
"aria-label": _ctx.ariaLabel,
|
|
19702
19751
|
"aria-autocomplete": "none",
|
|
19703
19752
|
"aria-haspopup": "listbox",
|
|
19704
|
-
onFocus: _cache[1] || (_cache[1] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
|
|
19705
|
-
onBlur: _cache[2] || (_cache[2] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)),
|
|
19706
19753
|
onKeydown: [
|
|
19707
|
-
|
|
19708
|
-
|
|
19709
|
-
|
|
19710
|
-
|
|
19711
|
-
|
|
19754
|
+
withKeys(withModifiers(($event) => _ctx.navigateOptions("next"), ["stop", "prevent"]), ["down"]),
|
|
19755
|
+
withKeys(withModifiers(($event) => _ctx.navigateOptions("prev"), ["stop", "prevent"]), ["up"]),
|
|
19756
|
+
withKeys(withModifiers(_ctx.handleEsc, ["stop", "prevent"]), ["esc"]),
|
|
19757
|
+
withKeys(withModifiers(_ctx.selectOption, ["stop", "prevent"]), ["enter"]),
|
|
19758
|
+
withKeys(withModifiers(_ctx.deletePrevTag, ["stop"]), ["delete"])
|
|
19712
19759
|
],
|
|
19713
|
-
onCompositionstart:
|
|
19714
|
-
onCompositionupdate:
|
|
19715
|
-
onCompositionend:
|
|
19716
|
-
onInput:
|
|
19717
|
-
onClick:
|
|
19718
|
-
}, null, 46,
|
|
19760
|
+
onCompositionstart: _ctx.handleCompositionStart,
|
|
19761
|
+
onCompositionupdate: _ctx.handleCompositionUpdate,
|
|
19762
|
+
onCompositionend: _ctx.handleCompositionEnd,
|
|
19763
|
+
onInput: _ctx.onInput,
|
|
19764
|
+
onClick: withModifiers(_ctx.toggleMenu, ["stop"])
|
|
19765
|
+
}, null, 46, ["id", "onUpdate:modelValue", "name", "disabled", "autocomplete", "readonly", "aria-activedescendant", "aria-controls", "aria-expanded", "aria-label", "onKeydown", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onInput", "onClick"]), [
|
|
19719
19766
|
[vModelText, _ctx.states.inputValue]
|
|
19720
19767
|
]),
|
|
19721
19768
|
_ctx.filterable ? (openBlock(), createElementBlock("span", {
|
|
@@ -19724,7 +19771,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19724
19771
|
"aria-hidden": "true",
|
|
19725
19772
|
class: normalizeClass(_ctx.nsSelect.e("input-calculator")),
|
|
19726
19773
|
textContent: toDisplayString(_ctx.states.inputValue)
|
|
19727
|
-
}, null, 10,
|
|
19774
|
+
}, null, 10, ["textContent"])) : createCommentVNode("v-if", true)
|
|
19728
19775
|
], 2)) : createCommentVNode("v-if", true),
|
|
19729
19776
|
_ctx.shouldShowPlaceholder ? (openBlock(), createElementBlock("div", {
|
|
19730
19777
|
key: 2,
|
|
@@ -19740,7 +19787,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19740
19787
|
value: _ctx.modelValue
|
|
19741
19788
|
}, () => [
|
|
19742
19789
|
createElementVNode("span", null, toDisplayString(_ctx.currentPlaceholder), 1)
|
|
19743
|
-
]) : (openBlock(), createElementBlock("span",
|
|
19790
|
+
]) : (openBlock(), createElementBlock("span", { key: 1 }, toDisplayString(_ctx.currentPlaceholder), 1))
|
|
19744
19791
|
], 2)) : createCommentVNode("v-if", true)
|
|
19745
19792
|
], 2),
|
|
19746
19793
|
createElementVNode("div", {
|
|
@@ -19758,7 +19805,11 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19758
19805
|
}, 8, ["class"])) : createCommentVNode("v-if", true),
|
|
19759
19806
|
_ctx.showClose && _ctx.clearIcon ? (openBlock(), createBlock(_component_el_icon, {
|
|
19760
19807
|
key: 1,
|
|
19761
|
-
class: normalizeClass([
|
|
19808
|
+
class: normalizeClass([
|
|
19809
|
+
_ctx.nsSelect.e("caret"),
|
|
19810
|
+
_ctx.nsSelect.e("icon"),
|
|
19811
|
+
_ctx.nsSelect.e("clear")
|
|
19812
|
+
]),
|
|
19762
19813
|
onClick: _ctx.handleClearClick
|
|
19763
19814
|
}, {
|
|
19764
19815
|
default: withCtx(() => [
|
|
@@ -19776,7 +19827,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19776
19827
|
_: 1
|
|
19777
19828
|
}, 8, ["class"])) : createCommentVNode("v-if", true)
|
|
19778
19829
|
], 2)
|
|
19779
|
-
],
|
|
19830
|
+
], 10, ["onClick"])
|
|
19780
19831
|
];
|
|
19781
19832
|
}),
|
|
19782
19833
|
content: withCtx(() => [
|
|
@@ -19785,11 +19836,11 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19785
19836
|
_ctx.$slots.header ? (openBlock(), createElementBlock("div", {
|
|
19786
19837
|
key: 0,
|
|
19787
19838
|
class: normalizeClass(_ctx.nsSelect.be("dropdown", "header")),
|
|
19788
|
-
onClick:
|
|
19789
|
-
}, ["stop"])
|
|
19839
|
+
onClick: withModifiers(() => {
|
|
19840
|
+
}, ["stop"])
|
|
19790
19841
|
}, [
|
|
19791
19842
|
renderSlot(_ctx.$slots, "header")
|
|
19792
|
-
],
|
|
19843
|
+
], 10, ["onClick"])) : createCommentVNode("v-if", true),
|
|
19793
19844
|
withDirectives(createVNode(_component_el_scrollbar, {
|
|
19794
19845
|
id: _ctx.contentId,
|
|
19795
19846
|
ref: "scrollbarRef",
|
|
@@ -19834,18 +19885,18 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19834
19885
|
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
|
|
19835
19886
|
key: 3,
|
|
19836
19887
|
class: normalizeClass(_ctx.nsSelect.be("dropdown", "footer")),
|
|
19837
|
-
onClick:
|
|
19838
|
-
}, ["stop"])
|
|
19888
|
+
onClick: withModifiers(() => {
|
|
19889
|
+
}, ["stop"])
|
|
19839
19890
|
}, [
|
|
19840
19891
|
renderSlot(_ctx.$slots, "footer")
|
|
19841
|
-
],
|
|
19892
|
+
], 10, ["onClick"])) : createCommentVNode("v-if", true)
|
|
19842
19893
|
]),
|
|
19843
19894
|
_: 3
|
|
19844
19895
|
}, 512)
|
|
19845
19896
|
]),
|
|
19846
19897
|
_: 3
|
|
19847
|
-
}, 8, ["visible", "placement", "teleported", "popper-class", "popper-options", "fallback-placements", "effect", "transition", "persistent", "onBeforeShow"])
|
|
19848
|
-
], 16)), [
|
|
19898
|
+
}, 8, ["visible", "placement", "teleported", "popper-class", "popper-options", "fallback-placements", "effect", "transition", "persistent", "onBeforeShow", "onHide"])
|
|
19899
|
+
], 16, ["onMouseleave"])), [
|
|
19849
19900
|
[_directive_click_outside, _ctx.handleClickOutside, _ctx.popperRef]
|
|
19850
19901
|
]);
|
|
19851
19902
|
}
|
|
@@ -20705,7 +20756,79 @@ function setCssText(el, show, prop, value) {
|
|
|
20705
20756
|
}
|
|
20706
20757
|
}
|
|
20707
20758
|
|
|
20759
|
+
const Drag = {
|
|
20760
|
+
mounted(el, binding) {
|
|
20761
|
+
let callback = binding.value;
|
|
20762
|
+
if (!callback) {
|
|
20763
|
+
callback = () => ({});
|
|
20764
|
+
}
|
|
20765
|
+
initMouseEvent(el, callback);
|
|
20766
|
+
},
|
|
20767
|
+
unmounted(el) {
|
|
20768
|
+
el.onmousedown = null;
|
|
20769
|
+
el.onmousemove = null;
|
|
20770
|
+
el.onmouseup = null;
|
|
20771
|
+
}
|
|
20772
|
+
};
|
|
20773
|
+
function initMouseEvent(el, callback) {
|
|
20774
|
+
let startPoint = null;
|
|
20775
|
+
let endPoint = null;
|
|
20776
|
+
let roiDiv = null;
|
|
20777
|
+
const onMousedown = (e) => {
|
|
20778
|
+
if (e.ctrlKey) {
|
|
20779
|
+
startPoint = { x: e.x, y: e.y };
|
|
20780
|
+
document.onselectstart = () => false;
|
|
20781
|
+
document.ondragstart = () => false;
|
|
20782
|
+
} else {
|
|
20783
|
+
removeRoi();
|
|
20784
|
+
startPoint = null;
|
|
20785
|
+
endPoint = null;
|
|
20786
|
+
}
|
|
20787
|
+
};
|
|
20788
|
+
const onMousemove = (e) => {
|
|
20789
|
+
if (e.ctrlKey && startPoint) {
|
|
20790
|
+
endPoint = { x: e.x, y: e.y };
|
|
20791
|
+
removeRoi();
|
|
20792
|
+
createRoi();
|
|
20793
|
+
} else {
|
|
20794
|
+
removeRoi();
|
|
20795
|
+
startPoint = null;
|
|
20796
|
+
endPoint = null;
|
|
20797
|
+
document.onselectstart = null;
|
|
20798
|
+
document.ondragstart = null;
|
|
20799
|
+
}
|
|
20800
|
+
};
|
|
20801
|
+
const onMouseup = () => {
|
|
20802
|
+
if (roiDiv) {
|
|
20803
|
+
callback(roiDiv.getBoundingClientRect());
|
|
20804
|
+
}
|
|
20805
|
+
document.onselectstart = null;
|
|
20806
|
+
document.ondragstart = null;
|
|
20807
|
+
removeRoi();
|
|
20808
|
+
startPoint = null;
|
|
20809
|
+
endPoint = null;
|
|
20810
|
+
};
|
|
20811
|
+
function removeRoi() {
|
|
20812
|
+
if (roiDiv && document.body.contains(roiDiv)) {
|
|
20813
|
+
document.body.removeChild(roiDiv);
|
|
20814
|
+
}
|
|
20815
|
+
roiDiv = null;
|
|
20816
|
+
}
|
|
20817
|
+
function createRoi() {
|
|
20818
|
+
roiDiv = document.createElement("div");
|
|
20819
|
+
const distX = endPoint.x - startPoint.x;
|
|
20820
|
+
const distY = endPoint.y - startPoint.y;
|
|
20821
|
+
const left = startPoint.x < endPoint.x ? startPoint.x : endPoint.x;
|
|
20822
|
+
const top = startPoint.y < endPoint.y ? startPoint.y : endPoint.y;
|
|
20823
|
+
roiDiv.style.cssText = `position: fixed;z-index: 9999;width: ${Math.abs(distX)}px;height: ${Math.abs(distY)}px;border: 1px solid #0655c3;left: ${left}px;top: ${top}px;pointer-events: none;`;
|
|
20824
|
+
document.body.appendChild(roiDiv);
|
|
20825
|
+
}
|
|
20826
|
+
el.onmousedown = onMousedown;
|
|
20827
|
+
el.onmousemove = onMousemove;
|
|
20828
|
+
el.onmouseup = onMouseup;
|
|
20829
|
+
}
|
|
20830
|
+
|
|
20708
20831
|
const install = installer.install;
|
|
20709
20832
|
const version = installer.version;
|
|
20710
20833
|
|
|
20711
|
-
export { Blur, Download, Height, Highlight, HzztCollapse, HzztConfigProvider, HzztConfirmPassword, HzztDropdown, HzztIcon, HzztPageSize, HzztPagination, HzztTab, HzztTitle, HzztTooltip, INSTALLED_KEY, SIZE_INJECTION_KEY$1 as SIZE_INJECTION_KEY, 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, provideGlobalConfig, 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 };
|
|
20834
|
+
export { Blur, Download, Drag, Height, Highlight, HzztCollapse, HzztConfigProvider, HzztConfirmPassword, HzztDropdown, HzztIcon, HzztPageSize, HzztPagination, HzztTab, HzztTitle, HzztTooltip, INSTALLED_KEY, SIZE_INJECTION_KEY$1 as SIZE_INJECTION_KEY, 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, provideGlobalConfig, 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 };
|