lew-ui 1.0.25 → 1.0.26

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/lew.es.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, onUnmounted, onMounted, getCurrentInstance, unref, ref, watch, createElementVNode, Fragment, renderList, toDisplayString, createCommentVNode, pushScopeId, popScopeId, computed, resolveComponent, createBlock, withCtx, createStaticVNode, provide, inject, onBeforeMount, h as h$1, withDirectives, vModelText, vModelDynamic, createVNode, withModifiers, vShow, isRef, createTextVNode, vModelCheckbox, nextTick, Teleport, Transition, resolveDirective, shallowRef, createApp } from "vue";
1
+ import { defineComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, onUnmounted, onMounted, getCurrentInstance, unref, ref, watch, createElementVNode, Fragment, renderList, toDisplayString, createCommentVNode, pushScopeId, popScopeId, computed, resolveComponent, createBlock, withCtx, createStaticVNode, provide, inject, onBeforeMount, h as h$1, withDirectives, vModelText, vModelDynamic, createVNode, withModifiers, vShow, isRef, createTextVNode, vModelCheckbox, Teleport, Transition, resolveDirective, shallowRef, createApp } from "vue";
2
2
  var LewFlex_vue_vue_type_style_index_0_scoped_true_lang = "";
3
3
  var _export_sfc = (sfc, props) => {
4
4
  const target = sfc.__vccOpts || sfc;
@@ -2838,7 +2838,7 @@ const tableProps = {
2838
2838
  return "";
2839
2839
  }
2840
2840
  },
2841
- height: {
2841
+ maxHeight: {
2842
2842
  type: String,
2843
2843
  default: () => {
2844
2844
  return "";
@@ -2874,14 +2874,6 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
2874
2874
  }
2875
2875
  });
2876
2876
  };
2877
- const setBodyHeight = () => {
2878
- let children = Array.from(lewTableBodyRef.value.children);
2879
- let h2 = 0;
2880
- children.map((e2) => {
2881
- h2 += e2.offsetHeight - 0.3;
2882
- });
2883
- lewTableBodyRef.value.style.height = h2 + 2 + "px";
2884
- };
2885
2877
  let isShowLeftLine = ref(false);
2886
2878
  let isShowRightLine = ref(false);
2887
2879
  const setShowLine = (e2) => {
@@ -2925,10 +2917,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
2925
2917
  };
2926
2918
  onMounted(() => {
2927
2919
  setWidth();
2928
- nextTick(() => {
2929
- setSubLine();
2930
- setBodyHeight();
2931
- });
2920
+ setSubLine();
2932
2921
  });
2933
2922
  return (_ctx, _cache) => {
2934
2923
  var _a, _b, _c;
@@ -2937,7 +2926,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
2937
2926
  ref_key: "lewTableRef",
2938
2927
  ref: lewTableRef,
2939
2928
  class: "lew-table",
2940
- style: normalizeStyle(`height:${_ctx.height};width:${_ctx.width};`),
2929
+ style: normalizeStyle(`max-height:${_ctx.maxHeight};width:${_ctx.width};overflow-x: auto;
2930
+ overflow-y:${_ctx.maxHeight ? "auto" : "hidden"};`),
2941
2931
  onScroll: _cache[0] || (_cache[0] = ($event) => throttle2($event, 200))
2942
2932
  }, [
2943
2933
  createElementVNode("div", _hoisted_1$c, [