lew-ui 2.7.59 → 2.7.61

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.js CHANGED
@@ -8648,10 +8648,8 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
8648
8648
  }));
8649
8649
  const totalColumnWidth = computed(() => {
8650
8650
  let width = sumBy(leafColumns.value, "width");
8651
- if (props.checkable)
8652
- width += getCheckableWidth.value;
8653
- if (props.sortable)
8654
- width += getDragColumnWidth.value;
8651
+ if (props.checkable) width += getCheckableWidth.value;
8652
+ if (props.sortable) width += getDragColumnWidth.value;
8655
8653
  return width;
8656
8654
  });
8657
8655
  const fixedWidths = computed(() => {
@@ -8692,8 +8690,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
8692
8690
  });
8693
8691
  const columnLevel = computed(() => {
8694
8692
  const findMaxDepth = (columns, currentDepth = 1) => {
8695
- if (!columns || columns.length === 0)
8696
- return currentDepth;
8693
+ if (!columns || columns.length === 0) return currentDepth;
8697
8694
  let maxDepth = currentDepth;
8698
8695
  for (const col of columns) {
8699
8696
  if (col.children && col.children.length > 0) {
@@ -8786,7 +8783,10 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
8786
8783
  state.isAllChecked = isEmpty(uncheckedKeys) && props.multiple && props.checkable && checkedKeys.length > 0;
8787
8784
  }
8788
8785
  function setAllRowsChecked(checked) {
8789
- state.selectedRowsMap = mapValues(keyBy(state.dataSource, _rowKey), () => checked);
8786
+ state.selectedRowsMap = mapValues(
8787
+ keyBy(state.dataSource, _rowKey),
8788
+ () => checked
8789
+ );
8790
8790
  if (props.multiple) {
8791
8791
  selectedKeys.value = checked ? keys(state.selectedRowsMap) : [];
8792
8792
  }
@@ -8805,7 +8805,10 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
8805
8805
  }
8806
8806
  function updateSelectedKeys(keys2) {
8807
8807
  if (props.multiple) {
8808
- state.selectedRowsMap = mapValues(keyBy(state.dataSource, _rowKey), () => false);
8808
+ state.selectedRowsMap = mapValues(
8809
+ keyBy(state.dataSource, _rowKey),
8810
+ () => false
8811
+ );
8809
8812
  keys2.forEach((key) => {
8810
8813
  state.selectedRowsMap[key] = true;
8811
8814
  });
@@ -8832,10 +8835,15 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
8832
8835
  right: "end",
8833
8836
  end: "end"
8834
8837
  };
8838
+ const width = column.width;
8839
+ let calculatedWidth = width;
8840
+ if (!state.isScrollbarVisible && !column.fixed) {
8841
+ calculatedWidth = width / (totalColumnWidth.value - fixedWidths.value.left - fixedWidths.value.right) * (state.scrollClientWidth - fixedWidths.value.left - fixedWidths.value.right);
8842
+ }
8835
8843
  const tdStyle = {
8836
8844
  display: "flex",
8837
8845
  flexDirection: "column",
8838
- width: any2px(column.width),
8846
+ width: any2px(calculatedWidth),
8839
8847
  justifyContent: "center",
8840
8848
  alignItems: xMap[column.x] || "start"
8841
8849
  };
@@ -8844,7 +8852,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
8844
8852
  display: "flex",
8845
8853
  alignItems: "center",
8846
8854
  justifyContent: xMap[column.x],
8847
- width: any2px(column.width),
8855
+ width: any2px(calculatedWidth),
8848
8856
  height: "100%",
8849
8857
  boxSizing: "border-box"
8850
8858
  };
@@ -8881,8 +8889,8 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
8881
8889
  column?.title,
8882
8890
  column.sortable && h(SortIcon, {
8883
8891
  "sort-value": sortValue.value[column.field],
8884
- "size": props.size,
8885
- "class": "lew-table-sorter"
8892
+ size: props.size,
8893
+ class: "lew-table-sorter"
8886
8894
  })
8887
8895
  ]
8888
8896
  }
@@ -8897,7 +8905,9 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
8897
8905
  style: tdGroupStyle
8898
8906
  },
8899
8907
  {
8900
- default: () => column.children.map((child) => readerHeaderTd({ column: child }))
8908
+ default: () => column.children.map(
8909
+ (child) => readerHeaderTd({ column: child })
8910
+ )
8901
8911
  }
8902
8912
  ) : null
8903
8913
  ]
@@ -8926,8 +8936,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
8926
8936
  }
8927
8937
  }
8928
8938
  function updateScrollState() {
8929
- if (!tableRef.value)
8930
- return;
8939
+ if (!tableRef.value) return;
8931
8940
  const element = tableRef.value;
8932
8941
  const { clientWidth, scrollWidth, scrollLeft } = element;
8933
8942
  if (scrollWidth === clientWidth) {
@@ -8999,8 +9008,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
8999
9008
  }
9000
9009
  const handleTableResize = throttle(() => {
9001
9010
  const table = tableRef.value;
9002
- if (!table)
9003
- return;
9011
+ if (!table) return;
9004
9012
  const newScrollClientWidth = table.clientWidth;
9005
9013
  const newIsScroll = table.scrollWidth > table.clientWidth + 5;
9006
9014
  if (state.scrollClientWidth !== newScrollClientWidth) {
@@ -9056,10 +9064,12 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
9056
9064
  state.showTooltip = false;
9057
9065
  state.isDragging = false;
9058
9066
  }
9059
- const throttledTooltipUpdate = throttle(updateTooltipPosition, TOOLTIP_THROTTLE_DELAY);
9067
+ const throttledTooltipUpdate = throttle(
9068
+ updateTooltipPosition,
9069
+ TOOLTIP_THROTTLE_DELAY
9070
+ );
9060
9071
  function dragStart(event, row, index2) {
9061
- if (!props.sortable)
9062
- return;
9072
+ if (!props.sortable) return;
9063
9073
  initDragState();
9064
9074
  computeTableRowHeight();
9065
9075
  state.dragIndex = index2;
@@ -9153,14 +9163,15 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
9153
9163
  }
9154
9164
  let targetRowId = "";
9155
9165
  let isAbove = false;
9156
- const positionEntries = Object.entries(state.trPositionsMap).map(([id, pos]) => ({
9157
- id,
9158
- ...pos
9159
- }));
9166
+ const positionEntries = Object.entries(state.trPositionsMap).map(
9167
+ ([id, pos]) => ({
9168
+ id,
9169
+ ...pos
9170
+ })
9171
+ );
9160
9172
  positionEntries.sort((a, b) => a.top - b.top);
9161
9173
  for (const entry of positionEntries) {
9162
- if (entry.id === state.dragRowId)
9163
- continue;
9174
+ if (entry.id === state.dragRowId) continue;
9164
9175
  const position = entry;
9165
9176
  if (mouseY >= position.top && mouseY <= position.bottom) {
9166
9177
  targetRowId = position.id;
@@ -9170,10 +9181,8 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
9170
9181
  }
9171
9182
  if (!targetRowId) {
9172
9183
  for (let i = 0; i < positionEntries.length - 1; i++) {
9173
- if (positionEntries[i].id === state.dragRowId)
9174
- continue;
9175
- if (positionEntries[i + 1].id === state.dragRowId)
9176
- continue;
9184
+ if (positionEntries[i].id === state.dragRowId) continue;
9185
+ if (positionEntries[i + 1].id === state.dragRowId) continue;
9177
9186
  if (mouseY > positionEntries[i].bottom && mouseY < positionEntries[i + 1].top) {
9178
9187
  if (mouseY - positionEntries[i].bottom < positionEntries[i + 1].top - mouseY) {
9179
9188
  targetRowId = positionEntries[i].id;
@@ -9208,8 +9217,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
9208
9217
  `;
9209
9218
  }
9210
9219
  const targetPosition = state.trPositionsMap[state.targetRowId];
9211
- if (!targetPosition)
9212
- return "display: none;";
9220
+ if (!targetPosition) return "display: none;";
9213
9221
  const top2 = state.isAboveTarget ? targetPosition.top : targetPosition.bottom;
9214
9222
  const tableRect = tableRef.value?.getBoundingClientRect();
9215
9223
  const offsetTop = tableRect ? top2 - tableRect.top : 0;
@@ -9228,8 +9236,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
9228
9236
  });
9229
9237
  }
9230
9238
  function getRowHeight(row) {
9231
- if (!row || !row._lew_table_tr_id)
9232
- return "auto";
9239
+ if (!row || !row._lew_table_tr_id) return "auto";
9233
9240
  const height = state.trHeightMap[row._lew_table_tr_id];
9234
9241
  if (!height) {
9235
9242
  const minHeightMap = {
@@ -14851,7 +14858,8 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
14851
14858
  }
14852
14859
  });
14853
14860
  const selectedItemsText = computed(() => {
14854
- if (!hasSelectedItems.value) return "";
14861
+ if (!hasSelectedItems.value)
14862
+ return "";
14855
14863
  if (props.multiple) {
14856
14864
  return "";
14857
14865
  } else {
@@ -14996,7 +15004,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
14996
15004
  };
14997
15005
  }
14998
15006
  });
14999
- const CommonInput = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-f8a0c098"]]);
15007
+ const CommonInput = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-51b98d83"]]);
15000
15008
  function vue3h(ele, props, children) {
15001
15009
  const { attrs, on, ...rest } = props;
15002
15010
  let event = {};
@@ -15553,9 +15561,6 @@ function useVirtList(userProps, emitFunction) {
15553
15561
  slotSize.footerSize = 0;
15554
15562
  }
15555
15563
  });
15556
- onActivated(() => {
15557
- scrollToOffset(reactiveData.offset);
15558
- });
15559
15564
  function getVirtualSize2beginInView() {
15560
15565
  return reactiveData.virtualSize + getRangeSize(reactiveData.renderBegin, reactiveData.inViewBegin);
15561
15566
  }
@@ -16367,7 +16372,8 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
16367
16372
  }
16368
16373
  }
16369
16374
  async function selectItem(item, level) {
16370
- if (item.disabled) return;
16375
+ if (item.disabled)
16376
+ return;
16371
16377
  if (!item.isLeaf && !isEqual(item.valuePaths, state.activeValues)) {
16372
16378
  state.optionsGroup = state.optionsGroup.slice(0, level + 1);
16373
16379
  if (_loadMethod.value && !item.isLeaf) {
@@ -16427,7 +16433,8 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
16427
16433
  }, 100);
16428
16434
  }
16429
16435
  }
16430
- if (item.isLeaf) return;
16436
+ if (item.isLeaf)
16437
+ return;
16431
16438
  if (isEqual(item.valuePaths, state.activeValues)) {
16432
16439
  state.activeValues = item.parentValuePaths || [];
16433
16440
  if (level < state.optionsGroup.length - 1) {
@@ -16656,7 +16663,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
16656
16663
  };
16657
16664
  }
16658
16665
  });
16659
- const LewCascader = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-7f2ab0af"]]);
16666
+ const LewCascader = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-7cea69f7"]]);
16660
16667
  const cascaderModel = {
16661
16668
  modelValue: {
16662
16669
  type: String
@@ -22874,6 +22881,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
22874
22881
  }
22875
22882
  function inputFn(e) {
22876
22883
  const target = e.target;
22884
+ checkValidationMessage();
22877
22885
  emit("input", target.value);
22878
22886
  validationMessage.value = lewInputRef.value.validationMessage;
22879
22887
  }
@@ -22933,6 +22941,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
22933
22941
  lewInputRef.value.stepUp();
22934
22942
  modelValue.value = Number(lewInputRef.value.value);
22935
22943
  emit("change", cloneDeep(modelValue.value));
22944
+ checkValidationMessage();
22936
22945
  if (props.max !== void 0 && lewInputRef.value.value >= Number(props.max || 0)) {
22937
22946
  clearTimer();
22938
22947
  }
@@ -22947,6 +22956,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
22947
22956
  lewInputRef.value.stepDown();
22948
22957
  modelValue.value = Number(lewInputRef.value.value);
22949
22958
  emit("change", cloneDeep(modelValue.value));
22959
+ checkValidationMessage();
22950
22960
  if (props.min !== void 0 && lewInputRef.value.value <= Number(props.min || 0)) {
22951
22961
  clearTimer();
22952
22962
  }
@@ -22963,12 +22973,11 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
22963
22973
  __expose({ focus, validCheck });
22964
22974
  return (_ctx, _cache) => {
22965
22975
  const _directive_tooltip = resolveDirective("tooltip");
22966
- return openBlock(), createElementBlock("div", {
22976
+ return withDirectives((openBlock(), createElementBlock("div", {
22967
22977
  class: normalizeClass(["lew-input-number-view", unref(getInputClassNames)]),
22968
22978
  style: normalizeStyle(unref(getInputNumberViewStyle)),
22969
22979
  onWheel: _cache[3] || (_cache[3] = (e) => e.preventDefault()),
22970
- onMouseenter: checkValidationMessage,
22971
- onMouseleave: _cache[4] || (_cache[4] = ($event) => validationMessage.value = "")
22980
+ onMouseenter: checkValidationMessage
22972
22981
  }, [
22973
22982
  withDirectives(createElementVNode("input", {
22974
22983
  ref_key: "lewInputRef",
@@ -22986,11 +22995,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
22986
22995
  onChange: changeFn,
22987
22996
  onFocus: focusFn
22988
22997
  }, null, 44, _hoisted_1$q), [
22989
- [vModelText, modelValue.value],
22990
- [_directive_tooltip, {
22991
- content: unref(validationMessage),
22992
- triggerFrom: "input-number"
22993
- }]
22998
+ [vModelText, modelValue.value]
22994
22999
  ]),
22995
23000
  createVNode(unref(LewFlex), {
22996
23001
  style: normalizeStyle(unref(getControlStyle)),
@@ -23021,11 +23026,16 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
23021
23026
  ]),
23022
23027
  _: 1
23023
23028
  }, 8, ["style"])
23024
- ], 38);
23029
+ ], 38)), [
23030
+ [_directive_tooltip, {
23031
+ content: unref(validationMessage),
23032
+ triggerFrom: "input-number"
23033
+ }]
23034
+ ]);
23025
23035
  };
23026
23036
  }
23027
23037
  });
23028
- const LewInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-4c6a9fe2"]]);
23038
+ const LewInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-67533033"]]);
23029
23039
  const inputTableEmits = {
23030
23040
  change: (value) => value
23031
23041
  };
@@ -23672,22 +23682,11 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
23672
23682
  const isTagMarkedForDeletion = ref(false);
23673
23683
  const autoWidthDelay = ref(false);
23674
23684
  let originalKeydownHandler = null;
23675
- function openInput() {
23676
- if (isInputActive.value || props.disabled || props.readonly)
23677
- return;
23678
- if (props.maxLength > 0 && Array.isArray(modelValue.value) && modelValue.value.length >= props.maxLength) {
23679
- LewMessage.warning(locale.t("inputTag.maxLength", { maxLength: props.maxLength }));
23680
- return;
23681
- }
23682
- isInputActive.value = true;
23683
- nextTick(() => {
23684
- if (lewInputRef.value && typeof lewInputRef.value?.focus === "function") {
23685
- lewInputRef.value?.focus();
23686
- }
23687
- });
23685
+ function attachKeydownListener() {
23688
23686
  originalKeydownHandler = document.onkeydown;
23689
23687
  document.onkeydown = function(event) {
23690
23688
  const keyCode = event.key || event.code;
23689
+ if (!isInputActive.value) return;
23691
23690
  if (inputValue.value) {
23692
23691
  if (keyCode === "Enter" || keyCode === "NumpadEnter") {
23693
23692
  isTagMarkedForDeletion.value = false;
@@ -23718,24 +23717,31 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
23718
23717
  isTagMarkedForDeletion.value = true;
23719
23718
  }
23720
23719
  }
23721
- if (keyCode === "Enter" || keyCode === "NumpadEnter") {
23722
- if (lewInputRef.value && typeof lewInputRef.value.blur === "function") {
23723
- lewInputRef.value.blur();
23724
- }
23725
- }
23726
23720
  }
23727
23721
  };
23728
23722
  }
23729
- onUnmounted(() => {
23723
+ function detachKeydownListener() {
23730
23724
  if (document.onkeydown && document.onkeydown !== originalKeydownHandler) {
23731
23725
  document.onkeydown = originalKeydownHandler;
23732
23726
  }
23733
- });
23734
- function addTag() {
23735
- const _value = Array.isArray(modelValue.value) ? [...modelValue.value] : [];
23736
- if (!inputValue.value || inputValue.value.trim() === "") {
23727
+ }
23728
+ function openInput() {
23729
+ if (isInputActive.value || props.disabled || props.readonly) return;
23730
+ if (props.maxLength > 0 && Array.isArray(modelValue.value) && modelValue.value.length >= props.maxLength) {
23731
+ LewMessage.warning(locale.t("inputTag.maxLength", { maxLength: props.maxLength }));
23737
23732
  return;
23738
23733
  }
23734
+ isInputActive.value = true;
23735
+ nextTick(() => {
23736
+ if (lewInputRef.value && typeof lewInputRef.value?.focus === "function") {
23737
+ lewInputRef.value?.focus();
23738
+ }
23739
+ });
23740
+ attachKeydownListener();
23741
+ }
23742
+ function addTag() {
23743
+ const _value = Array.isArray(modelValue.value) ? [...modelValue.value] : [];
23744
+ if (!inputValue.value || inputValue.value.trim() === "") return;
23739
23745
  if (props.maxLength > 0 && _value.length >= props.maxLength) {
23740
23746
  inputValue.value = "";
23741
23747
  isInputActive.value = false;
@@ -23750,9 +23756,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
23750
23756
  emit("add", addedValue);
23751
23757
  }
23752
23758
  function delTag(index2) {
23753
- if (!Array.isArray(modelValue.value) || index2 < 0 || index2 >= modelValue.value.length) {
23759
+ if (!Array.isArray(modelValue.value) || index2 < 0 || index2 >= modelValue.value.length)
23754
23760
  return;
23755
- }
23756
23761
  const removedTag = modelValue.value[index2];
23757
23762
  const newValue = [...modelValue.value];
23758
23763
  newValue.splice(index2, 1);
@@ -23766,6 +23771,25 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
23766
23771
  emit("change", cloneDeep(newValue));
23767
23772
  emit("remove", removedTag, index2);
23768
23773
  }
23774
+ function clear() {
23775
+ modelValue.value = [];
23776
+ inputValue.value = "";
23777
+ emit("clear");
23778
+ emit("change", void 0);
23779
+ }
23780
+ function onBlur() {
23781
+ isInputActive.value = false;
23782
+ isTagMarkedForDeletion.value = false;
23783
+ detachKeydownListener();
23784
+ if (inputValue.value) {
23785
+ addTag();
23786
+ }
23787
+ }
23788
+ function onFocus() {
23789
+ if (props.disabled || props.readonly) return;
23790
+ isInputActive.value = true;
23791
+ attachKeydownListener();
23792
+ }
23769
23793
  const getInputClassNames = computed(() => {
23770
23794
  const { size, readonly: readonly2, disabled, clearable } = props;
23771
23795
  return object2class("lew-input-tag-view", {
@@ -23783,19 +23807,6 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
23783
23807
  };
23784
23808
  return size[props.size] || 14;
23785
23809
  });
23786
- function clear() {
23787
- modelValue.value = [];
23788
- inputValue.value = "";
23789
- emit("clear");
23790
- emit("change", void 0);
23791
- }
23792
- function onBlur() {
23793
- isInputActive.value = false;
23794
- isTagMarkedForDeletion.value = false;
23795
- if (inputValue.value) {
23796
- addTag();
23797
- }
23798
- }
23799
23810
  const shouldShowIcon = computed(
23800
23811
  () => !((modelValue.value || []).length > 0 && props.clearable)
23801
23812
  );
@@ -23809,6 +23820,9 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
23809
23820
  color: isTagMarkedForDeletion.value && index2 === (modelValue.value || []).length - 1 ? "var(--lew-color-red-dark)" : "var(--lew-color-primary-dark)"
23810
23821
  };
23811
23822
  });
23823
+ onUnmounted(() => {
23824
+ detachKeydownListener();
23825
+ });
23812
23826
  return (_ctx, _cache) => {
23813
23827
  return openBlock(), createElementBlock("div", {
23814
23828
  class: normalizeClass(["lew-input-tag-view", unref(getInputClassNames)]),
@@ -23849,6 +23863,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
23849
23863
  readonly: !unref(isInputActive),
23850
23864
  placeholder: (modelValue.value || []).length === 0 ? unref(locale).t("inputTag.placeholder") : " ",
23851
23865
  onInput: _cache[1] || (_cache[1] = ($event) => isTagMarkedForDeletion.value = false),
23866
+ onFocus,
23852
23867
  onBlur
23853
23868
  }, null, 8, ["modelValue", "auto-width", "size", "readonly", "placeholder"])) : createCommentVNode("", true)
23854
23869
  ]),
@@ -23882,7 +23897,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
23882
23897
  };
23883
23898
  }
23884
23899
  });
23885
- const LewInputTag = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-2353f614"]]);
23900
+ const LewInputTag = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-60df733b"]]);
23886
23901
  const radioEmits = {
23887
23902
  change: () => true
23888
23903
  };
@@ -27321,7 +27336,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
27321
27336
  };
27322
27337
  }
27323
27338
  });
27324
- const LewTreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-e3739c6b"]]);
27339
+ const LewTreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-dadd6f86"]]);
27325
27340
  const uploadEmits = {
27326
27341
  change: (files) => files,
27327
27342
  delete: (file) => file
@@ -27988,13 +28003,15 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
27988
28003
  medium: 12,
27989
28004
  large: 14
27990
28005
  };
27991
- const uploadIconFontSizeMap = computed(() => {
27992
- return {
27993
- small: props.viewMode === "list" ? 28 : 22,
27994
- medium: props.viewMode === "list" ? 30 : 24,
27995
- large: props.viewMode === "list" ? 32 : 26
27996
- };
27997
- });
28006
+ const uploadIconFontSizeMap = computed(
28007
+ () => {
28008
+ return {
28009
+ small: props.viewMode === "list" ? 28 : 22,
28010
+ medium: props.viewMode === "list" ? 30 : 24,
28011
+ large: props.viewMode === "list" ? 32 : 26
28012
+ };
28013
+ }
28014
+ );
27998
28015
  const uploadPaddingMap = computed(() => {
27999
28016
  return {
28000
28017
  small: props.viewMode === "list" ? "10px 8px" : "14px",
@@ -28042,9 +28059,13 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
28042
28059
  lastModified,
28043
28060
  file: item
28044
28061
  };
28045
- modelValue.value = [fileItem, ...cloneDeep(modelValue.value || [])];
28046
- emit("change", modelValue.value);
28062
+ const _value = [
28063
+ fileItem,
28064
+ ...cloneDeep(modelValue.value || [])
28065
+ ];
28066
+ modelValue.value = _value;
28047
28067
  nextTick(() => {
28068
+ emit("change", _value);
28048
28069
  if (status === "pending" && isFunction$1(_uploadHelper.value)) {
28049
28070
  setFileItem({
28050
28071
  key: fileItem.key,
@@ -28066,7 +28087,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
28066
28087
  }
28067
28088
  async function deleteFile(key) {
28068
28089
  const fileList = cloneDeep(modelValue.value) || [];
28069
- const index2 = (fileList || []).findIndex((e) => e.key === key);
28090
+ const index2 = (fileList || []).findIndex(
28091
+ (e) => e.key === key
28092
+ );
28070
28093
  if (index2 >= 0) {
28071
28094
  const { status } = fileList[index2];
28072
28095
  const fileItem = fileList[index2];
@@ -28074,6 +28097,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
28074
28097
  fileList.splice(index2, 1);
28075
28098
  modelValue.value = fileList;
28076
28099
  emit("delete", key);
28100
+ nextTick(() => {
28101
+ emit("change", fileList);
28102
+ });
28077
28103
  return;
28078
28104
  }
28079
28105
  if (props.beforeDelete && isFunction$1(props.beforeDelete)) {
@@ -28085,6 +28111,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
28085
28111
  fileList.splice(index2, 1);
28086
28112
  modelValue.value = fileList;
28087
28113
  emit("delete", key);
28114
+ nextTick(() => {
28115
+ emit("change", fileList);
28116
+ });
28088
28117
  }
28089
28118
  }
28090
28119
  function reUpload(key) {
@@ -28168,7 +28197,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
28168
28197
  function setFileItem(item) {
28169
28198
  const { key, percent } = item;
28170
28199
  const fileList = cloneDeep(modelValue.value) || [];
28171
- const index2 = (fileList || []).findIndex((e) => e.key === key);
28200
+ const index2 = (fileList || []).findIndex(
28201
+ (e) => e.key === key
28202
+ );
28172
28203
  let _percent = percent || 0;
28173
28204
  if (index2 >= 0) {
28174
28205
  if (percent) {
@@ -28183,6 +28214,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
28183
28214
  fileList[index2] = { ...fileList[index2], ...item, percent: _percent };
28184
28215
  }
28185
28216
  modelValue.value = fileList;
28217
+ nextTick(() => {
28218
+ emit("change", fileList);
28219
+ });
28186
28220
  }
28187
28221
  const getUploadLabelClass = computed(() => {
28188
28222
  const { disabled, readonly: readonly2, viewMode } = props;
@@ -28308,7 +28342,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
28308
28342
  };
28309
28343
  }
28310
28344
  });
28311
- const LewUpload = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-42853cc3"]]);
28345
+ const LewUpload = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-fe1dc1c2"]]);
28312
28346
  const statusValues = ["online", "processing", "away", "offline", "busy"];
28313
28347
  const placementValues = ["top-left", "top-right", "bottom-left", "bottom-right"];
28314
28348
  const shapeValues = ["circle", "square", "sharp"];
@@ -29341,7 +29375,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
29341
29375
  }
29342
29376
  );
29343
29377
  async function handleClose() {
29344
- if (props.disabled || isClosing.value) return;
29378
+ if (props.disabled || isClosing.value)
29379
+ return;
29345
29380
  if (props.close) {
29346
29381
  isClosing.value = true;
29347
29382
  let result = false;
@@ -30183,7 +30218,7 @@ const contextMenuProps = {
30183
30218
  }
30184
30219
  };
30185
30220
  const MENU_SHOW_DELAY = 120;
30186
- const MENU_DESTROY_DELAY = 250;
30221
+ const MENU_DESTROY_DELAY = 300;
30187
30222
  const ATTR_MENU_ID = "lew-context-menu-id";
30188
30223
  const ATTR_DATA_LEW = "data-lew";
30189
30224
  function initLewContextMenu() {
@@ -30196,7 +30231,7 @@ function initLewContextMenu() {
30196
30231
  interactive: true,
30197
30232
  placement: "right-start",
30198
30233
  duration: [250, 250],
30199
- delay: [250, 0],
30234
+ delay: [120, 120],
30200
30235
  arrow: false,
30201
30236
  appendTo: () => document.body,
30202
30237
  allowHTML: true,
@@ -30464,7 +30499,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
30464
30499
  }
30465
30500
  });
30466
30501
  item.onClick?.(proxyItem, proxyOptions, instance);
30467
- } else {
30502
+ }
30503
+ if (item.hideMenuOnClick || item.hideMenuOnClick === void 0) {
30468
30504
  instance?.hide();
30469
30505
  }
30470
30506
  emit("change", item);
@@ -30612,7 +30648,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
30612
30648
  };
30613
30649
  }
30614
30650
  });
30615
- const LewContextMenu = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-10d9d549"]]);
30651
+ const LewContextMenu = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-a2ddcebf"]]);
30616
30652
  const dropdownModel = {
30617
30653
  selectedKeys: {
30618
30654
  type: Array,
@@ -30986,7 +31022,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
30986
31022
  };
30987
31023
  }
30988
31024
  });
30989
- const LewMenuTreeItem = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-98e31987"]]);
31025
+ const LewMenuTreeItem = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-4a79a5c9"]]);
30990
31026
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
30991
31027
  __name: "LewMenuTree",
30992
31028
  props: /* @__PURE__ */ mergeModels(menuTreeProps, {
@@ -31195,8 +31231,10 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
31195
31231
  };
31196
31232
  });
31197
31233
  function handleClick(index2) {
31198
- if (!props.canClickItem) return;
31199
- if (!props.canCrossSteps && Math.abs((stepsValue.value || 1) - 1 - index2) > 1) return;
31234
+ if (!props.canClickItem)
31235
+ return;
31236
+ if (!props.canCrossSteps && Math.abs((stepsValue.value || 1) - 1 - index2) > 1)
31237
+ return;
31200
31238
  if (stepsValue.value !== index2 + 1) {
31201
31239
  stepsValue.value = index2 + 1;
31202
31240
  emit("change", stepsValue.value);