holyes-table 1.0.20 → 1.0.21

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.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import { Fragment as e, Teleport as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, normalizeClass as l, normalizeStyle as u, onActivated as d, onDeactivated as f, onMounted as p, onUnmounted as m, openBlock as h, ref as g, renderList as _, renderSlot as v, shallowRef as y, toDisplayString as b, toRaw as x, unref as S, vShow as C, watch as w, withCtx as T, withDirectives as E, withKeys as ee, withModifiers as D } from "vue";
2
- import { VxeButton as O, VxeCheckbox as k, VxeCheckboxGroup as te, VxeIcon as A, VxeInput as ne, VxeLoading as re, VxeNumberInput as ie, VxeRadioGroup as ae, VxeSwitch as oe, VxeTag as se } from "vxe-pc-ui";
3
- import j, { debounce as ce, isNaN as M, orderBy as le, toArrayTree as ue } from "xe-utils";
2
+ import { VxeButton as O, VxeCheckbox as k, VxeCheckboxGroup as te, VxeIcon as A, VxeInput as ne, VxeLoading as re, VxeNumberInput as j, VxeRadioGroup as ie, VxeSwitch as ae, VxeTag as oe } from "vxe-pc-ui";
3
+ import M, { debounce as se, isNaN as N, orderBy as ce, toArrayTree as le } from "xe-utils";
4
4
  //#region lib/pretextTable/worker/pretextTableGetItemHeight.ts?worker&inline
5
- var N = "(function(){let e=e=>{let t=0;switch(!0){case!e:case typeof e!=`string`:return t;default:break}for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r==64||r>=19968&&r<=40959||r>=12352&&r<=12543||r>=44032&&r<=55215?t+=2:t+=1}return t};self.onmessage=t=>{let{tempData:n,commonStyles:r,itemStyles:i,divLineHeight:a,cellMinHeight:o,keyNames:s,isNoAutoWrap:c,columns:l,treeConfig:u,defaultTreeConfig:d}=t.data,f=0;performance.mark(`start`);let p=new OffscreenCanvas(1,1).getContext(`2d`);p.font=`${i.fontWeight} ${i.fontSize}/${a} ${r?.fontFamily}`;function m(e){return p.measureText(e).width}function h(e,t,n){let r=m(e);return Math.ceil(r/t)*a+n}let g=[],_=new Map,v=e=>{e.slots?.default&&!e.slots?.defaultHeight&&(_.has(e.field)||(console.error(`表格设置了插槽,插槽高度defaultHeight不能为空,否则会导致高度计算错误`,e.field),_.set(e.field,1))),(e.slots.defaultType==`tag`||e.slots.defaultType==`buttons`)&&(e.slots.defaultHeight||(e.slots.defaultHeight=30))},y=u?.childrenField||d.childrenField,b=(t,n)=>{t[y]?.length&&t[y].forEach(e=>{b(e,n+1)});let r=o,i=[],p=0;if(c)for(let e of l)v(e),p=Math.max(p,e.slots?.defaultHeight||0),r=Math.max(r,a);else{for(let r of l){(r.slots?.default||r.slots?.defaultType)&&(v(r),p=Math.max(p,r.slots?.defaultHeight||0));let a=Math.max(r.minWidth||30,r.width||0),o=t[r.field]||``;r.treeNode&&u?.isOpenTree&&(u?.showIcon&&(o+=`图`),u?.indent&&(a-=(u?.indent||d.indent||20)*n));let s=e(o)/a;testLength:for(let e=0;e<3;e++)if((i[e]?.density||0)<s){i[e]={field:r.field,tempWidth:a,density:s,tempText:o};break testLength}}for(let e of i){let t=e.tempWidth,n=h(e.tempText,t,0);r=Math.max(r,n)}}g.push({pretextHeight:Math.max(r,p)+1,id:t[s.id]}),n==0&&(f+=Math.max(r,p)+1)};for(let e of n)b(e,0);performance.mark(`end`),self.postMessage({tempItemHeights:f,heightDatas:g}),self.close()}})();", P = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", N], { type: "text/javascript;charset=utf-8" });
5
+ var ue = "(function(){let e=e=>{let t=0;switch(!0){case!e:case typeof e!=`string`:return t;default:break}for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r==64||r>=19968&&r<=40959||r>=12352&&r<=12543||r>=44032&&r<=55215?t+=2:t+=1}return t};self.onmessage=t=>{let{tempData:n,commonStyles:r,itemStyles:i,divLineHeight:a,cellMinHeight:o,keyNames:s,isNoAutoWrap:c,columns:l,treeConfig:u,defaultTreeConfig:d}=t.data,f=0;performance.mark(`start`);let p=new OffscreenCanvas(1,1).getContext(`2d`);p.font=`${i.fontWeight} ${i.fontSize}/${a} ${r?.fontFamily}`;function m(e){return p.measureText(e).width}function h(e,t,n){let r=m(e),o=i.paddingLeft.replace(`px`,``);return o=Number(o||0),Math.ceil((r+o)/t)*a+n}let g=[],_=new Map,v=e=>{e.slots?.default&&!e.slots?.defaultHeight&&(_.has(e.field)||(console.error(`表格设置了插槽,插槽高度defaultHeight不能为空,否则会导致高度计算错误`,e.field),_.set(e.field,1))),(e.slots.defaultType==`tag`||e.slots.defaultType==`buttons`)&&(e.slots.defaultHeight||(e.slots.defaultHeight=30))},y=u?.childrenField||d.childrenField,b=(t,n)=>{t[y]?.length&&t[y].forEach(e=>{b(e,n+1)});let r=o,i=[],p=0;if(c)for(let e of l)v(e),p=Math.max(p,e.slots?.defaultHeight||0),r=Math.max(r,a);else{for(let r of l){(r.slots?.default||r.slots?.defaultType)&&(v(r),p=Math.max(p,r.slots?.defaultHeight||0));let a=Math.max(r.minWidth||30,r.width||0),o=t[r.field]||``;r.treeNode&&u?.isOpenTree&&(u?.showIcon&&(o+=`图`),u?.indent&&(a-=(u?.indent||d.indent||20)*n));let s=e(o)/a;testLength:for(let e=0;e<3;e++)if((i[e]?.density||0)<s){i[e]={field:r.field,tempWidth:a,density:s,tempText:o};break testLength}}for(let e of i){let t=e.tempWidth,n=h(e.tempText,t,0);r=Math.max(r,n)}}g.push({pretextHeight:Math.max(r,p)+1,id:t[s.id]}),n==0&&(f+=Math.max(r,p)+1)};for(let e of n)b(e,0);performance.mark(`end`),self.postMessage({tempItemHeights:f,heightDatas:g}),self.close()}})();", P = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", ue], { type: "text/javascript;charset=utf-8" });
6
6
  function de(e) {
7
7
  let t;
8
8
  try {
@@ -12,7 +12,7 @@ function de(e) {
12
12
  (self.URL || self.webkitURL).revokeObjectURL(t);
13
13
  }), n;
14
14
  } catch {
15
- return new Worker("data:text/javascript;charset=utf-8," + encodeURIComponent(N), { name: e?.name });
15
+ return new Worker("data:text/javascript;charset=utf-8," + encodeURIComponent(ue), { name: e?.name });
16
16
  }
17
17
  }
18
18
  //#endregion
@@ -283,7 +283,7 @@ function L(e) {
283
283
  else t === l.value && e === s.value ? (l.value = null, s.value = "", c = "") : (l.value = t, s.value = e);
284
284
  f();
285
285
  }, d = (e, t, n) => {
286
- let r = le(e, [[(e) => M(Number(e[t])) ? e[t] || "" : Number(e[t]), n]]);
286
+ let r = ce(e, [[(e) => N(Number(e[t])) ? e[t] || "" : Number(e[t]), n]]);
287
287
  if (i?.isOpenTree) {
288
288
  let e = i?.childrenField || a?.childrenField;
289
289
  for (let i of r) {
@@ -580,15 +580,15 @@ var ge = (e) => {
580
580
  case i?.type === "合计":
581
581
  let n = t[e], r = 0;
582
582
  if (o.get(e) || []) {
583
- switch (r = Number(i.data) + j.toNumber(n), i?.dataType) {
583
+ switch (r = Number(i.data) + M.toNumber(n), i?.dataType) {
584
584
  case "number0":
585
- r = j.toFixed(r, 0);
585
+ r = M.toFixed(r, 0);
586
586
  break;
587
587
  case "number1":
588
- r = j.toFixed(r, 1);
588
+ r = M.toFixed(r, 1);
589
589
  break;
590
590
  case "number2":
591
- r = j.toFixed(r, 2);
591
+ r = M.toFixed(r, 2);
592
592
  break;
593
593
  default: break;
594
594
  }
@@ -635,7 +635,7 @@ var ge = (e) => {
635
635
  let n = e;
636
636
  if (t?.transform) t?.reserve && c(n, !1);
637
637
  else return t?.reserve && c(n, !0), n;
638
- n = ue(n, {
638
+ n = le(n, {
639
639
  key: i,
640
640
  parentKey: a,
641
641
  children: o
@@ -695,7 +695,7 @@ var ge = (e) => {
695
695
  n(e, t);
696
696
  }
697
697
  };
698
- }, z = (e) => {
698
+ }, be = (e) => {
699
699
  let t = y([]), n = y([]), r = g(), i = g(), a = g(0), o = g(0), s = g(!1);
700
700
  w(() => e.props.loading, (e) => {
701
701
  s.value = e;
@@ -708,7 +708,7 @@ var ge = (e) => {
708
708
  i.value?.scrollTo(e);
709
709
  }, m = y([]), h = y([]), _ = [], v = /* @__PURE__ */ new Map(), b = (t) => {
710
710
  v.clear(), h.value = t, _ = [], ne();
711
- let n = 1, r = !1, i = 0, a = e.props.treeConfig?.childrenField || q.childrenField, o = (t, n, r) => {
711
+ let n = 1, r = !1, i = 0, a = e.props.treeConfig?.childrenField || J.childrenField, o = (t, n, r) => {
712
712
  if (_.push(t), t[F.level] = r, e.props.treeConfig?.isOpenTree) {
713
713
  let e = t?.[a] || [];
714
714
  if (t?.[F.filterChildren]?.length > 0 && (e = t[F.filterChildren]), e.length > 0 && t[F.isCollapsed]) {
@@ -726,7 +726,7 @@ var ge = (e) => {
726
726
  }), s++;
727
727
  }, S = async (n, r) => {
728
728
  let i = null;
729
- i = typeof r == "string" ? Y.get(r) : r, X(n);
729
+ i = typeof r == "string" ? X.get(r) : r, Z(n);
730
730
  let a = [];
731
731
  for (let e of t.value) {
732
732
  let t = x(e);
@@ -744,46 +744,47 @@ var ge = (e) => {
744
744
  treeNode: t.treeNode || !1
745
745
  });
746
746
  }
747
- let o = await N({
747
+ let o = await P({
748
748
  tempData: n,
749
749
  index: 0,
750
750
  columns: a
751
751
  });
752
752
  if (o) {
753
- P(o.heightDatas);
754
- let t = e.props.treeConfig?.childrenField || q.childrenField;
753
+ I(o.heightDatas);
754
+ let t = e.props.treeConfig?.childrenField || J.childrenField;
755
755
  i[t] = n;
756
756
  }
757
757
  }, C = (t) => {
758
758
  let n = null;
759
- if (n = typeof t == "string" ? Y.get(t) : t, n[F.expandChildren]?.length) return;
759
+ if (n = typeof t == "string" ? X.get(t) : t, n[F.expandChildren]?.length) return;
760
760
  let r = {
761
761
  [F.isExpandRow]: !0,
762
762
  [F.height]: e.props.expandConfig?.height || 0
763
763
  };
764
- X([r]), n[F.expandChildren] = [r];
764
+ Z([r]), n[F.expandChildren] = [r];
765
765
  }, { headerHeight: T, headerStyles: E, createHeader: ee, headerRef: D, getHeaderRefHeight: O } = fe({ pretextTableRef: r }), { footerHeight: k, footerColumns: te, getFooterHeight: A, updateFooter: ne, updateFooterCellLabel: re } = _e({
766
766
  showFooter: e.props.showFooter,
767
767
  nowDataSource: h,
768
768
  columns: t
769
- }), ie = g(0), ae = g(0), oe = (e) => {
770
- e == -1 && (e = ae.value), ie.value = e;
771
- }, se = (e) => {
772
- ae.value = e;
773
- }, j = () => {
769
+ }), j = g(0), ie = g(0), ae = (e) => {
770
+ e == -1 && (e = ie.value), j.value = e;
771
+ }, oe = (e) => {
772
+ ie.value = e;
773
+ }, M = () => {
774
774
  let e = 0;
775
775
  for (let t of _) e += t[F.height] || 0;
776
- ie.value = e;
777
- }, M = {
776
+ j.value = e;
777
+ }, N = (e, t) => e ? isNaN(Number(e)) ? /^\d+px$/.test(e) ? e : t : e + "px" : t, ce = {
778
778
  fontWeight: "400",
779
- fontSize: e.props.cellStyle?.fontSize ? isNaN(Number(e.props.cellStyle?.fontSize)) ? /^\d+px$/.test(e.props.cellStyle?.fontSize) ? e.props.cellStyle?.fontSize : "14px" : e.props.cellStyle?.fontSize + "px" : "14px"
780
- }, le = !!e.props.showOverflow, ue = e.props.cellMinHeight || 22, N = (t) => new Promise((n, r) => {
779
+ fontSize: N(e.props.cellStyle?.fontSize, "14px"),
780
+ paddingLeft: N(e.props.cellStyle?.paddingLeft, "0px")
781
+ }, le = !!e.props.showOverflow, ue = e.props.cellMinHeight || 22, P = (t) => new Promise((n, r) => {
781
782
  let i = new de(), a = {
782
783
  tempData: t.tempData,
783
784
  index: t.index,
784
785
  columns: t.columns,
785
786
  commonStyles: " \"Microsoft YaHei\", \"微软雅黑\", sans-serif",
786
- itemStyles: M,
787
+ itemStyles: ce,
787
788
  divLineHeight: 22,
788
789
  keyNames: F,
789
790
  isNoAutoWrap: le,
@@ -792,32 +793,32 @@ var ge = (e) => {
792
793
  ...e.props.treeConfig,
793
794
  loadMethod: void 0
794
795
  },
795
- defaultTreeConfig: { ...q }
796
+ defaultTreeConfig: { ...J }
796
797
  };
797
798
  i.postMessage(a), i.onmessage = (e) => {
798
799
  n(e.data), i.terminate();
799
800
  }, i.onerror = (e) => {
800
801
  r(e), i.terminate();
801
802
  };
802
- }), P = (e) => {
803
+ }), I = (e) => {
803
804
  for (let t of e) {
804
- let e = Y.get(t.id);
805
+ let e = X.get(t.id);
805
806
  e && (e[F.height] = t.pretextHeight);
806
807
  }
807
- }, I = 0, z = !1, be = async (e) => {
808
+ }, be = 0, z = !1, xe = async (e) => {
808
809
  if (t.value?.length === 0) {
809
- if (I++, I > 50) {
810
+ if (be++, be > 50) {
810
811
  console.error("表格没有设置 columns.value");
811
812
  return;
812
813
  }
813
814
  setTimeout(() => {
814
- be(e);
815
+ xe(e);
815
816
  }, 100);
816
817
  return;
817
818
  }
818
819
  let n = 0;
819
820
  if (e.length === 0) {
820
- b(e), j(), De.value = [];
821
+ b(e), M(), Oe.value = [];
821
822
  return;
822
823
  }
823
824
  let r = [];
@@ -837,15 +838,15 @@ var ge = (e) => {
837
838
  treeNode: t.treeNode || !1
838
839
  });
839
840
  }
840
- if (e.length * xe >= Se) {
841
+ if (e.length * Se >= Ce) {
841
842
  let t = 5e3;
842
843
  z = !0;
843
- let i = await N({
844
+ let i = await P({
844
845
  tempData: e.slice(0, 100),
845
846
  index: 0,
846
847
  columns: r
847
848
  });
848
- i && (n += i.tempItemHeights, P(i.heightDatas), b(e), j(), H());
849
+ i && (n += i.tempItemHeights, I(i.heightDatas), b(e), M(), H());
849
850
  let a = [], o = Math.ceil((e.length - 100) / t / 2), s = o * 2, c = 0, l = 100;
850
851
  for (let n = 1; n <= o; n++) for (let n = 0; n < 2; n++) a[n] || (a[n] = []), a[n].push({
851
852
  tempI: l,
@@ -858,44 +859,44 @@ var ge = (e) => {
858
859
  c++;
859
860
  continue;
860
861
  }
861
- let t = await N({
862
+ let t = await P({
862
863
  tempData: i.tempData,
863
864
  index: i.tempI,
864
865
  columns: r
865
866
  });
866
- t && (n += t.tempItemHeights, se(n), oe(n), c++, P(t.heightDatas), c == s && (b(e), j(), z = !1));
867
+ t && (n += t.tempItemHeights, oe(n), ae(n), c++, I(t.heightDatas), c == s && (b(e), M(), z = !1));
867
868
  }
868
869
  };
869
870
  for (let e of a) t(e);
870
871
  }
871
872
  } else {
872
873
  z = !0;
873
- let t = await N({
874
+ let t = await P({
874
875
  tempData: e,
875
876
  index: 0,
876
877
  columns: r
877
878
  });
878
- z = !1, t && (P(t.heightDatas), b(e), j(), H());
879
+ z = !1, t && (I(t.heightDatas), b(e), M(), H());
879
880
  }
880
- }, xe = 0, Se = 1e4, B = 0, Ce = 0, we = g(0), V = !1, Te = (e) => {
881
- if (Ce = i.value?.scrollLeft || 0, B == i.value?.scrollTop) {
881
+ }, Se = 0, Ce = 1e4, B = 0, we = 0, Te = g(0), V = !1, Ee = (e) => {
882
+ if (we = i.value?.scrollLeft || 0, B == i.value?.scrollTop) {
882
883
  V ||= (window.requestAnimationFrame(() => {
883
- Me(), V = !1;
884
+ Ne(), V = !1;
884
885
  }), !0);
885
886
  return;
886
887
  }
887
888
  B = i.value?.scrollTop || 0, e.preventDefault(), V ||= (window.requestAnimationFrame(() => {
888
889
  H(), V = !1;
889
890
  }), !0);
890
- }, Ee = (e) => {
891
+ }, De = (e) => {
891
892
  if (e.shiftKey) {
892
893
  e.preventDefault(), e.stopPropagation(), e.deltaY > 0 || e.deltaX > 0 ? i.value?.scrollBy({ left: 100 }) : i.value?.scrollBy({ left: -100 });
893
894
  return;
894
895
  }
895
896
  e.preventDefault(), e.stopPropagation(), e.deltaY > 0 ? i.value?.scrollBy({ top: 150 }) : i.value?.scrollBy({ top: -150 });
896
- }, De = g([]), Oe = g(0), ke = ce((e, t) => {
897
+ }, Oe = g([]), ke = g(0), Ae = se((e, t) => {
897
898
  setTimeout(() => {
898
- Oe.value = t, e.forEach((e) => {
899
+ ke.value = t, e.forEach((e) => {
899
900
  e.slotShowTimestamp = t;
900
901
  }), l();
901
902
  }, 0);
@@ -925,7 +926,7 @@ var ge = (e) => {
925
926
  s = v.get(i) || {
926
927
  totalHeight: 0,
927
928
  row: {}
928
- }, r = s.totalHeight, we.value = r - s.row[F.height], o.push(s.row), n = e + t;
929
+ }, r = s.totalHeight, Te.value = r - s.row[F.height], o.push(s.row), n = e + t;
929
930
  getHeightFor: for (let e = i; e < _.length; e++) {
930
931
  let t = _[e];
931
932
  if (r += t[F.height], n) if (r <= n) o.push(t);
@@ -936,15 +937,15 @@ var ge = (e) => {
936
937
  let a = _[i];
937
938
  if (a) {
938
939
  if (r += a[F.height], e <= r && n == 0) {
939
- we.value = r - a[F.height], o.push(a), n = e + t;
940
+ Te.value = r - a[F.height], o.push(a), n = e + t;
940
941
  continue;
941
942
  }
942
943
  if (n) if (r <= n) o.push(a);
943
944
  else break getHeightFor;
944
945
  }
945
946
  }
946
- De.value = o, Me(), ke(o, Math.floor(performance.now()));
947
- }, Ae = g(0), je = g(0), Me = () => {
947
+ Oe.value = o, Ne(), Ae(o, Math.floor(performance.now()));
948
+ }, je = g(0), Me = g(0), Ne = () => {
948
949
  if (!i.value) return;
949
950
  let e = i.value.scrollLeft, n = i.value.clientWidth;
950
951
  for (let e of t.value) (e.fixed == "left" || e.fixed == "right") && (n -= e.width || e.minWidth || 0);
@@ -962,12 +963,12 @@ var ge = (e) => {
962
963
  }
963
964
  }
964
965
  }
965
- r <= a && (Ae.value = r, je.value = a);
966
- }, Ne = ce(H, 200), { fixedColumnsLeft: Pe, fixedColumnsRight: Fe, fixedLeftIndex: Ie, fixedRightIndex: Le, reflashGridTemplateColumns: Re, gridTemplateColumns: ze, getGridStyles: U } = pe({ columns: t }), W = y({}), G = (t, n = !0) => {
967
- e.props.rowConfig?.isCurrent && W.value != t && (W.value = t, n && e.emits("currentChange", { newValue: t }));
966
+ r <= a && (je.value = r, Me.value = a);
967
+ }, Pe = se(H, 200), { fixedColumnsLeft: Fe, fixedColumnsRight: Ie, fixedLeftIndex: Le, fixedRightIndex: U, reflashGridTemplateColumns: W, gridTemplateColumns: Re, getGridStyles: G } = pe({ columns: t }), K = y({}), ze = (t, n = !0) => {
968
+ e.props.rowConfig?.isCurrent && K.value != t && (K.value = t, n && e.emits("currentChange", { newValue: t }));
968
969
  }, Be = (t, n) => {
969
- if (G(t), e.props.treeConfig?.isOpenTree) {
970
- let r = e.props.treeConfig.childrenField || q.childrenField;
970
+ if (ze(t), e.props.treeConfig?.isOpenTree) {
971
+ let r = e.props.treeConfig.childrenField || J.childrenField;
971
972
  switch (!0) {
972
973
  case t?.[r]?.length == 0: break;
973
974
  case e.props.treeConfig?.trigger == "cell" && n.treeNode:
@@ -988,11 +989,11 @@ var ge = (e) => {
988
989
  row: t,
989
990
  column: n
990
991
  });
991
- }, K = (t) => {
992
+ }, Ve = (t) => {
992
993
  e.emits && e.emits("headerCellClick", { column: t }), e.props.sortConfig?.trigger == "cell" && t.sortable && ht(t.field, "auto"), e.emits && e.emits("cellClick", { column: t });
993
- }, Ve = y({}), He = (t) => {
994
- e.props.rowConfig?.isHover && (Ve.value = t);
995
- }, { getCheckField: Ue, headerChecked: We, headerCheckedIndeterminate: Ge, onHeaderChecked: Ke, upDataHeaderChecked: qe, upDataAllRowCheckedDeep: Je, onCellChecked: Ye, getCheckboxRecords: Xe, clearCheckboxRowInit: Ze } = me({
994
+ }, He = y({}), Ue = (t) => {
995
+ e.props.rowConfig?.isHover && (He.value = t);
996
+ }, { getCheckField: We, headerChecked: Ge, headerCheckedIndeterminate: Ke, onHeaderChecked: qe, upDataHeaderChecked: Je, upDataAllRowCheckedDeep: Ye, onCellChecked: Xe, getCheckboxRecords: Ze, clearCheckboxRowInit: Qe } = me({
996
997
  pretextId: F.id,
997
998
  columns: t,
998
999
  blurAnyElement: R,
@@ -1000,23 +1001,23 @@ var ge = (e) => {
1000
1001
  baseDataSource: m,
1001
1002
  emits: e.emits,
1002
1003
  treeConfig: e.props.treeConfig
1003
- }), Qe = (e) => {
1004
- Ze();
1004
+ }), $e = (e) => {
1005
+ Qe();
1005
1006
  let t = [];
1006
- if (t = e ? [e] : Ue(), t) for (let e of h.value) for (let n of t) e[n] = !1;
1007
- }, { isDragging: $e, dragLineLeft: et, startResize: tt } = ge({
1007
+ if (t = e ? [e] : We(), t) for (let e of h.value) for (let n of t) e[n] = !1;
1008
+ }, { isDragging: et, dragLineLeft: tt, startResize: nt } = ge({
1008
1009
  pretextTableRef: r,
1009
1010
  afterResize: (t) => {
1010
- Re(), e.emits("resizableChange", {
1011
+ W(), e.emits("resizableChange", {
1011
1012
  column: { ...t.column },
1012
1013
  resizeWidth: t.column.width
1013
1014
  });
1014
1015
  }
1015
- }), nt = () => {
1016
- b(h.value), j(), H();
1017
- }, rt = (t) => {
1016
+ }), rt = () => {
1017
+ b(h.value), M(), H();
1018
+ }, q = (t) => {
1018
1019
  if (t) {
1019
- let t = e.props.treeConfig?.childrenField || q.childrenField, n = [], r = (e) => {
1020
+ let t = e.props.treeConfig?.childrenField || J.childrenField, n = [], r = (e) => {
1020
1021
  if (e[t]?.length) {
1021
1022
  n.push(e);
1022
1023
  for (let n of e[t]) r(n);
@@ -1026,46 +1027,46 @@ var ge = (e) => {
1026
1027
  ot(n, !0);
1027
1028
  } else it();
1028
1029
  }, it = () => {
1029
- J.forEach((e) => {
1030
+ Y.forEach((e) => {
1030
1031
  e[F.isCollapsed] = !1;
1031
- }), J.clear(), b(h.value), j(), H();
1032
- }, { defaultTreeConfig: q, treeExpandMap: J, handleTree: at, setTreeExpand: ot } = ve({
1032
+ }), Y.clear(), b(h.value), M(), H();
1033
+ }, { defaultTreeConfig: J, treeExpandMap: Y, handleTree: at, setTreeExpand: ot } = ve({
1033
1034
  treeConfig: e.props.treeConfig,
1034
- afterTreeExpand: nt,
1035
+ afterTreeExpand: rt,
1035
1036
  insertChild: S
1036
1037
  }), { handleExpand: st, setRowExpand: ct } = ye({
1037
1038
  expandConfig: e.props.expandConfig,
1038
1039
  afterRowExpand: (t, n) => {
1039
- b(h.value), j(), H(), e.emits("toggleRowExpand", {
1040
+ b(h.value), M(), H(), e.emits("toggleRowExpand", {
1040
1041
  expanded: n,
1041
1042
  rows: t
1042
1043
  });
1043
1044
  },
1044
1045
  insertExpandRow: C
1045
1046
  }), lt = 0, ut = () => {
1046
- m.value = [], b([]), Y.clear(), W.value = {}, Ve.value = {}, Ze(), Q.value = "", mt.value = null, wt(), lt = 0, I = 0;
1047
- }, Y = /* @__PURE__ */ new Map(), X = (t) => {
1047
+ m.value = [], b([]), X.clear(), K.value = {}, He.value = {}, Qe(), $.value = "", mt.value = null, Tt(), lt = 0, be = 0;
1048
+ }, X = /* @__PURE__ */ new Map(), Z = (t) => {
1048
1049
  let n = lt;
1049
1050
  for (let r of t) {
1050
- r[F.id] = Math.random().toString(36).substring(2), r[F.index] = n, n++, lt++, Y.set(r[F.id], r);
1051
- let t = e.props.treeConfig?.childrenField || q.childrenField;
1052
- e.props.treeConfig?.isOpenTree && r?.[t]?.length > 0 && X(r[t]);
1051
+ r[F.id] = Math.random().toString(36).substring(2), r[F.index] = n, n++, lt++, X.set(r[F.id], r);
1052
+ let t = e.props.treeConfig?.childrenField || J.childrenField;
1053
+ e.props.treeConfig?.isOpenTree && r?.[t]?.length > 0 && Z(r[t]);
1053
1054
  }
1054
- }, Z = (e, t, n = 0) => {
1055
+ }, Q = (e, t, n = 0) => {
1055
1056
  z ? setTimeout(() => {
1056
- n >= 50 || Z(e, t, n + 1);
1057
+ n >= 50 || Q(e, t, n + 1);
1057
1058
  }, 100) : u({
1058
1059
  top: e,
1059
1060
  left: t
1060
1061
  });
1061
1062
  }, dt = async (e) => {
1062
- let t = B, n = Ce;
1063
- await ft(e), Z(t, n);
1063
+ let t = B, n = we;
1064
+ await ft(e), Q(t, n);
1064
1065
  }, ft = async (e) => {
1065
1066
  try {
1066
1067
  u({ top: 0 }), ut();
1067
1068
  let t = at(e || []);
1068
- X(t || []), m.value = t || [], be(m.value);
1069
+ Z(t || []), m.value = t || [], xe(m.value);
1069
1070
  } catch (e) {
1070
1071
  console.error(e);
1071
1072
  }
@@ -1075,62 +1076,62 @@ var ge = (e) => {
1075
1076
  fullData: m.value,
1076
1077
  visibleData: e
1077
1078
  };
1078
- }, { sortField: Q, sortOrder: mt, sort: ht, handleSort: $ } = L({
1079
+ }, { sortField: $, sortOrder: mt, sort: ht, handleSort: gt } = L({
1079
1080
  nowDataSource: h,
1080
1081
  getVisibleData: H,
1081
1082
  setNowDataSource: b,
1082
1083
  treeConfig: e.props.treeConfig,
1083
- defaultTreeConfig: q,
1084
+ defaultTreeConfig: J,
1084
1085
  columns: t
1085
- }), { filterPopupWidth: gt, filterPopupId: _t, inputFilterOptions: vt, numberFilterOptions: yt, filterFields: bt, getFilterFields: xt, filterClick: St, setFilter: Ct, clearFilter: wt } = he({
1086
+ }), { filterPopupWidth: _t, filterPopupId: vt, inputFilterOptions: yt, numberFilterOptions: bt, filterFields: xt, getFilterFields: St, filterClick: Ct, setFilter: wt, clearFilter: Tt } = he({
1086
1087
  columns: t,
1087
1088
  baseDataSource: m,
1088
1089
  setNowDataSource: b,
1089
1090
  scrollTo: u,
1090
1091
  refresh: l,
1091
1092
  afterFilter: () => {
1092
- j(), $(), Je();
1093
+ M(), gt(), Ye();
1093
1094
  },
1094
1095
  treeConfig: e.props.treeConfig,
1095
- defaultTreeConfig: q
1096
- }), Tt = (e) => {
1096
+ defaultTreeConfig: J
1097
+ }), Et = (e) => {
1097
1098
  R(), e.listFilter.selectedValue.length == e.listFilter.listOptions.length ? e.listFilter.selectedValue = [] : e.listFilter.selectedValue = e.listFilter.listOptions.map((e) => e.value);
1098
- }, Et = (i) => {
1099
+ }, Dt = (i) => {
1099
1100
  if (!r.value) {
1100
1101
  setTimeout(() => {
1101
- Et(i);
1102
+ Dt(i);
1102
1103
  }, 100);
1103
1104
  return;
1104
1105
  }
1105
1106
  let a = ee(i) || [];
1106
- a.finalColumns.length == 0 || a.realColumns.length == 0 || (st(), xe = a.finalColumns.length, j(), t.value = a.finalColumns, n.value = a.realColumns, setTimeout(() => {
1107
+ a.finalColumns.length == 0 || a.realColumns.length == 0 || (st(), Se = a.finalColumns.length, M(), t.value = a.finalColumns, n.value = a.realColumns, setTimeout(() => {
1107
1108
  O();
1108
- }, 0), A(e.props.footerProps), Ue(), U(), xt(), l());
1109
+ }, 0), A(e.props.footerProps), We(), G(), St(), l());
1109
1110
  };
1110
1111
  w(() => e.props.columns, (e) => {
1111
- Et(e);
1112
+ Dt(e);
1112
1113
  }, { immediate: !0 }), w(() => e.props.footerProps, (e) => {
1113
1114
  A(e);
1114
1115
  }), w(() => e.props.height, (e) => {
1115
- a.value = e, Ne();
1116
+ a.value = e, Pe();
1116
1117
  }, { immediate: !0 });
1117
- let Dt = () => {
1118
+ let Ot = () => {
1118
1119
  r.value && (o.value = r.value.clientWidth);
1119
- }, Ot = ce(Dt, 100), kt = () => {
1120
+ }, kt = se(Ot, 100), At = () => {
1120
1121
  if (!r.value) {
1121
1122
  setTimeout(() => {
1122
- kt();
1123
+ At();
1123
1124
  }, 100);
1124
1125
  return;
1125
1126
  }
1126
- window.addEventListener("resize", Ot), Dt();
1127
+ window.addEventListener("resize", kt), Ot();
1127
1128
  };
1128
1129
  return p(() => {
1129
- kt();
1130
+ At();
1130
1131
  }), d(() => {
1131
1132
  u({
1132
1133
  top: B,
1133
- left: Ce
1134
+ left: we
1134
1135
  }), H();
1135
1136
  }), f(() => {}), {
1136
1137
  keyNames: F,
@@ -1138,16 +1139,16 @@ var ge = (e) => {
1138
1139
  pretextTableRef: r,
1139
1140
  tableRef: i,
1140
1141
  isLoading: s,
1141
- visibleData: De,
1142
- visibleWidthStartColumnIndex: Ae,
1143
- visibleWidthEndColumnIndex: je,
1144
- gridTemplateColumns: ze,
1142
+ visibleData: Oe,
1143
+ visibleWidthStartColumnIndex: je,
1144
+ visibleWidthEndColumnIndex: Me,
1145
+ gridTemplateColumns: Re,
1145
1146
  blurAnyElement: R,
1146
1147
  columns: t,
1147
- onScroll: Te,
1148
- onWheel: Ee,
1149
- topEmptyHeight: we,
1150
- scrollbarHeight: ie,
1148
+ onScroll: Ee,
1149
+ onWheel: De,
1150
+ topEmptyHeight: Te,
1151
+ scrollbarHeight: j,
1151
1152
  headerHeight: T,
1152
1153
  headerStyles: E,
1153
1154
  realColumns: n,
@@ -1157,47 +1158,47 @@ var ge = (e) => {
1157
1158
  footerHeight: k,
1158
1159
  footerColumns: te,
1159
1160
  getFooterHeight: A,
1160
- itemStyles: M,
1161
- fixedLeftIndex: Ie,
1162
- fixedRightIndex: Le,
1163
- fixedColumnsLeft: Pe,
1164
- fixedColumnsRight: Fe,
1165
- getGridStyles: U,
1161
+ itemStyles: ce,
1162
+ fixedLeftIndex: Le,
1163
+ fixedRightIndex: U,
1164
+ fixedColumnsLeft: Fe,
1165
+ fixedColumnsRight: Ie,
1166
+ getGridStyles: G,
1166
1167
  divLineHeightOffset: 20,
1167
- currentRow: W,
1168
- setCurrentRow: G,
1168
+ currentRow: K,
1169
+ setCurrentRow: ze,
1169
1170
  cellClick: Be,
1170
- headerClick: K,
1171
- hoverRow: Ve,
1172
- cellMousemove: He,
1173
- headerChecked: We,
1174
- headerCheckedIndeterminate: Ge,
1175
- onHeaderChecked: Ke,
1176
- onCellChecked: Ye,
1177
- getCheckboxRecords: Xe,
1178
- clearCheckboxRow: Qe,
1179
- sortField: Q,
1171
+ headerClick: Ve,
1172
+ hoverRow: He,
1173
+ cellMousemove: Ue,
1174
+ headerChecked: Ge,
1175
+ headerCheckedIndeterminate: Ke,
1176
+ onHeaderChecked: qe,
1177
+ onCellChecked: Xe,
1178
+ getCheckboxRecords: Ze,
1179
+ clearCheckboxRow: $e,
1180
+ sortField: $,
1180
1181
  sortOrder: mt,
1181
1182
  sort: ht,
1182
- filterPopupWidth: gt,
1183
- filterPopupId: _t,
1184
- inputFilterOptions: vt,
1185
- numberFilterOptions: yt,
1186
- filterFields: bt,
1187
- getFilterFields: xt,
1188
- filterClick: St,
1189
- setFilter: Ct,
1190
- clearFilter: wt,
1191
- setListFilterAll: Tt,
1192
- isDragging: $e,
1193
- dragLineLeft: et,
1194
- startResize: tt,
1183
+ filterPopupWidth: _t,
1184
+ filterPopupId: vt,
1185
+ inputFilterOptions: yt,
1186
+ numberFilterOptions: bt,
1187
+ filterFields: xt,
1188
+ getFilterFields: St,
1189
+ filterClick: Ct,
1190
+ setFilter: wt,
1191
+ clearFilter: Tt,
1192
+ setListFilterAll: Et,
1193
+ isDragging: et,
1194
+ dragLineLeft: tt,
1195
+ startResize: nt,
1195
1196
  setTreeExpand: ot,
1196
- setAllTreeExpand: rt,
1197
+ setAllTreeExpand: q,
1197
1198
  clearTreeExpand: it,
1198
- defaultTreeConfig: q,
1199
+ defaultTreeConfig: J,
1199
1200
  setRowExpand: ct,
1200
- slotShowTimestamp: Oe,
1201
+ slotShowTimestamp: ke,
1201
1202
  isRefresh: c,
1202
1203
  realTableHeight: a,
1203
1204
  realTableWidth: o,
@@ -1205,7 +1206,7 @@ var ge = (e) => {
1205
1206
  reloadData: ft,
1206
1207
  getTableData: pt
1207
1208
  };
1208
- }, be = ["onClick"], xe = { key: 0 }, Se = { key: 1 }, B = { key: 2 }, Ce = {
1209
+ }, z = ["onClick"], xe = { key: 0 }, Se = { key: 1 }, Ce = { key: 2 }, B = {
1209
1210
  key: 3,
1210
1211
  style: { "text-align": "center" }
1211
1212
  }, we = {
@@ -1219,7 +1220,7 @@ var ge = (e) => {
1219
1220
  padding: "0px",
1220
1221
  width: "14px"
1221
1222
  }
1222
- }, V = { key: 1 }, Te = ["id"], Ee = { style: {
1223
+ }, Te = { key: 1 }, V = ["id"], Ee = { style: {
1223
1224
  "text-align": "center",
1224
1225
  "font-weight": "bold"
1225
1226
  } }, De = { style: {
@@ -1230,25 +1231,25 @@ var ge = (e) => {
1230
1231
  display: "flex",
1231
1232
  "justify-content": "center",
1232
1233
  "margin-top": "5px"
1233
- } }, ke = { style: { margin: "0 0 4px" } }, H = { style: {
1234
+ } }, ke = { style: { margin: "0 0 4px" } }, Ae = { style: {
1234
1235
  display: "flex",
1235
1236
  "justify-content": "center",
1236
1237
  "margin-top": "5px",
1237
1238
  padding: "5px 0",
1238
1239
  "border-top": "1px solid #e0e0e0"
1239
- } }, Ae = ["onMousedown"], je = ["onClick", "onMouseenter"], Me = {
1240
+ } }, H = ["onMousedown"], je = ["onClick", "onMouseenter"], Me = {
1240
1241
  key: 3,
1241
1242
  style: { "margin-left": "6px" }
1242
- }, Ne = { key: 4 }, Pe = { key: 5 }, Fe = { style: {
1243
+ }, Ne = { style: {
1243
1244
  display: "flex",
1244
1245
  gap: "4px"
1245
- } }, Ie = ["title"], Le = {
1246
+ } }, Pe = ["title"], Fe = {
1246
1247
  key: 9,
1247
1248
  style: {
1248
1249
  width: "100%",
1249
1250
  "text-align": "center"
1250
1251
  }
1251
- }, Re = ["title"], ze = { key: 1 }, U = /* @__PURE__ */ c({
1252
+ }, Ie = ["title"], Le = { key: 1 }, U = /* @__PURE__ */ c({
1252
1253
  inheritAttrs: !1,
1253
1254
  name: "pretextTable",
1254
1255
  props: {
@@ -1265,6 +1266,10 @@ var ge = (e) => {
1265
1266
  type: Object,
1266
1267
  default: () => ({})
1267
1268
  },
1269
+ heightOffset: {
1270
+ type: Number,
1271
+ default: 0
1272
+ },
1268
1273
  loading: {
1269
1274
  type: Boolean,
1270
1275
  default: !1
@@ -1320,24 +1325,24 @@ var ge = (e) => {
1320
1325
  "toggleRowExpand"
1321
1326
  ],
1322
1327
  setup(c, { expose: d, emit: f }) {
1323
- let p = c, { keyNames: m, pretextTableRef: g, nowDataSource: y, tableRef: x, isLoading: w, headerHeight: j, topEmptyHeight: ce, visibleData: M, visibleWidthStartColumnIndex: le, visibleWidthEndColumnIndex: ue, columns: N, realColumns: P, headerRef: de, onScroll: fe, onWheel: pe, gridTemplateColumns: F, blurAnyElement: I, scrollbarHeight: me, headerStyles: L, divLineHeightOffset: he, updateFooter: ge, updateFooterCellLabel: _e, footerHeight: ve, footerColumns: R, getFooterHeight: ye, itemStyles: U, fixedLeftIndex: W, fixedRightIndex: G, fixedColumnsLeft: Be, fixedColumnsRight: K, currentRow: Ve, setCurrentRow: He, cellClick: Ue, headerClick: We, hoverRow: Ge, cellMousemove: Ke, headerChecked: qe, headerCheckedIndeterminate: Je, onHeaderChecked: Ye, onCellChecked: Xe, getCheckboxRecords: Ze, clearCheckboxRow: Qe, sortField: $e, sortOrder: et, sort: tt, filterPopupWidth: nt, filterPopupId: rt, inputFilterOptions: it, numberFilterOptions: q, filterFields: J, getFilterFields: at, filterClick: ot, setFilter: st, clearFilter: ct, setListFilterAll: lt, isDragging: ut, dragLineLeft: Y, startResize: X, setTreeExpand: Z, setAllTreeExpand: dt, clearTreeExpand: ft, defaultTreeConfig: pt, setRowExpand: Q, slotShowTimestamp: mt, isRefresh: ht, realTableHeight: $, realTableWidth: gt, loadData: _t, reloadData: vt, getTableData: yt } = z({
1328
+ let p = c, { keyNames: m, pretextTableRef: g, nowDataSource: y, tableRef: x, isLoading: w, headerHeight: M, topEmptyHeight: se, visibleData: N, visibleWidthStartColumnIndex: ce, visibleWidthEndColumnIndex: le, columns: ue, realColumns: P, headerRef: de, onScroll: fe, onWheel: pe, gridTemplateColumns: F, blurAnyElement: I, scrollbarHeight: me, headerStyles: L, divLineHeightOffset: he, updateFooter: ge, updateFooterCellLabel: _e, footerHeight: ve, footerColumns: R, getFooterHeight: ye, itemStyles: U, fixedLeftIndex: W, fixedRightIndex: Re, fixedColumnsLeft: G, fixedColumnsRight: K, currentRow: ze, setCurrentRow: Be, cellClick: Ve, headerClick: He, hoverRow: Ue, cellMousemove: We, headerChecked: Ge, headerCheckedIndeterminate: Ke, onHeaderChecked: qe, onCellChecked: Je, getCheckboxRecords: Ye, clearCheckboxRow: Xe, sortField: Ze, sortOrder: Qe, sort: $e, filterPopupWidth: et, filterPopupId: tt, inputFilterOptions: nt, numberFilterOptions: rt, filterFields: q, getFilterFields: it, filterClick: J, setFilter: Y, clearFilter: at, setListFilterAll: ot, isDragging: st, dragLineLeft: ct, startResize: lt, setTreeExpand: ut, setAllTreeExpand: X, clearTreeExpand: Z, defaultTreeConfig: Q, setRowExpand: dt, slotShowTimestamp: ft, isRefresh: pt, realTableHeight: $, realTableWidth: mt, loadData: ht, reloadData: gt, getTableData: _t } = be({
1324
1329
  props: p,
1325
1330
  emits: f
1326
1331
  });
1327
1332
  return d({
1328
- loadData: _t,
1329
- reloadData: vt,
1330
- setCurrentRow: He,
1331
- getCheckboxRecords: Ze,
1332
- clearCheckboxRow: Qe,
1333
+ loadData: ht,
1334
+ reloadData: gt,
1335
+ setCurrentRow: Be,
1336
+ getCheckboxRecords: Ye,
1337
+ clearCheckboxRow: Xe,
1333
1338
  updateFooter: ge,
1334
1339
  updateFooterCellLabel: _e,
1335
1340
  getFooterHeight: ye,
1336
- getTableData: yt,
1337
- setTreeExpand: Z,
1338
- setAllTreeExpand: dt,
1339
- clearTreeExpand: ft,
1340
- setRowExpand: Q
1341
+ getTableData: _t,
1342
+ setTreeExpand: ut,
1343
+ setAllTreeExpand: X,
1344
+ clearTreeExpand: Z,
1345
+ setRowExpand: dt
1341
1346
  }), (c, d) => (h(), i("div", {
1342
1347
  class: "cName-pretextTable",
1343
1348
  style: { position: "relative" },
@@ -1384,24 +1389,24 @@ var ge = (e) => {
1384
1389
  gridRow: f?.style?.gridRow || "",
1385
1390
  gridColumn: f?.style?.gridColumn || "",
1386
1391
  zIndex: m == 0 ? 3 : f.fixed == "left" || f.fixed == "right" ? 2 : 1,
1387
- left: f.fixed == "left" ? S(Be)[m] : "",
1392
+ left: f.fixed == "left" ? S(G)[m] : "",
1388
1393
  right: f.fixed == "right" ? S(K)[m] : "",
1389
1394
  borderLeft: f.fixed == "right" ? "1px solid var(--pretextTable-border-color)" : "",
1390
- boxShadow: f.fixed == "left" && m == S(W) ? "var(--pretextTable-shadow-color) 2px 0px 5px -1px" : f.fixed == "right" && m == S(G) ? "var(--pretextTable-shadow-color) -2px 0px 5px -1px" : "",
1395
+ boxShadow: f.fixed == "left" && m == S(W) ? "var(--pretextTable-shadow-color) 2px 0px 5px -1px" : f.fixed == "right" && m == S(Re) ? "var(--pretextTable-shadow-color) -2px 0px 5px -1px" : "",
1391
1396
  borderBottom: f ? "1px solid var(--pretextTable-border-color)" : "",
1392
1397
  minHeight: "30px"
1393
1398
  } : {}),
1394
- onClick: (e) => S(We)(f)
1399
+ onClick: (e) => S(He)(f)
1395
1400
  }, [f ? f.type == "checkbox" && p == 0 ? (h(), i("span", Se, [s(S(k), {
1396
- modelValue: S(qe)[f.field],
1397
- indeterminate: S(Je)[f.field],
1401
+ modelValue: S(Ge)[f.field],
1402
+ indeterminate: S(Ke)[f.field],
1398
1403
  content: "",
1399
- onChange: (e) => S(Ye)(f.field)
1404
+ onChange: (e) => S(qe)(f.field)
1400
1405
  }, null, 8, [
1401
1406
  "modelValue",
1402
1407
  "indeterminate",
1403
1408
  "onChange"
1404
- ])])) : f?.type == "seq" && p == 0 ? (h(), i("div", B, b(f.title || "序号"), 1)) : (h(), i("span", Ce, [
1409
+ ])])) : f?.type == "seq" && p == 0 ? (h(), i("div", Ce, b(f.title || "序号"), 1)) : (h(), i("span", B, [
1405
1410
  a("span", null, [f.slots?.header ? v(c.$slots, f.slots?.header, {
1406
1411
  key: 0,
1407
1412
  column: f,
@@ -1413,26 +1418,26 @@ var ge = (e) => {
1413
1418
  position: "absolute",
1414
1419
  top: "-0.8em"
1415
1420
  },
1416
- class: l(["pretextTable-sort-icon", { "pretextTable-sort-icon-active": S($e) == f.field && S(et) == "asc" }]),
1417
- onClick: D((e) => S(tt)(f.field, "asc"), ["stop"])
1421
+ class: l(["pretextTable-sort-icon", { "pretextTable-sort-icon-active": S(Ze) == f.field && S(Qe) == "asc" }]),
1422
+ onClick: D((e) => S($e)(f.field, "asc"), ["stop"])
1418
1423
  }, null, 8, ["class", "onClick"]), s(S(A), {
1419
1424
  name: "caret-down",
1420
1425
  style: {
1421
1426
  position: "absolute",
1422
1427
  top: "-0.2em"
1423
1428
  },
1424
- class: l(["pretextTable-sort-icon", { "pretextTable-sort-icon-active": S($e) == f.field && S(et) == "desc" }]),
1425
- onClick: D((e) => S(tt)(f.field, "desc"), ["stop"])
1429
+ class: l(["pretextTable-sort-icon", { "pretextTable-sort-icon-active": S(Ze) == f.field && S(Qe) == "desc" }]),
1430
+ onClick: D((e) => S($e)(f.field, "desc"), ["stop"])
1426
1431
  }, null, 8, ["class", "onClick"])])) : r("", !0),
1427
- S(J)[m]?.type && !f.children?.length ? (h(), i("span", V, [s(S(A), {
1432
+ S(q)[m]?.type && !f.children?.length ? (h(), i("span", Te, [s(S(A), {
1428
1433
  name: "funnel",
1429
- class: l(["pretextTable-filter-icon", { "pretextTable-filter-icon-active": S(J)[m].isActive }]),
1430
- onClick: D((e) => S(ot)(m, e), ["stop"])
1431
- }, null, 8, ["class", "onClick"]), S(J)[m].isShow ? (h(), n(t, {
1434
+ class: l(["pretextTable-filter-icon", { "pretextTable-filter-icon-active": S(q)[m].isActive }]),
1435
+ onClick: D((e) => S(J)(m, e), ["stop"])
1436
+ }, null, 8, ["class", "onClick"]), S(q)[m].isShow ? (h(), n(t, {
1432
1437
  key: 0,
1433
1438
  to: "body"
1434
1439
  }, [a("div", {
1435
- id: S(rt) + f.field,
1440
+ id: S(tt) + f.field,
1436
1441
  class: "pretextTable-filter-popup",
1437
1442
  style: u([{
1438
1443
  "background-color": "#fff",
@@ -1442,52 +1447,52 @@ var ge = (e) => {
1442
1447
  "z-index": "99999"
1443
1448
  }, {
1444
1449
  position: "absolute",
1445
- top: S(J)[m].clientY + "px",
1446
- left: S(J)[m].clientX + "px"
1450
+ top: S(q)[m].clientY + "px",
1451
+ left: S(q)[m].clientX + "px"
1447
1452
  }])
1448
1453
  }, [
1449
1454
  a("div", Ee, b(f.title), 1),
1450
- S(J)[m].type == "inputFilter" ? (h(), i("div", {
1455
+ S(q)[m].type == "inputFilter" ? (h(), i("div", {
1451
1456
  key: 0,
1452
- style: u({ width: S(nt) + "px" })
1457
+ style: u({ width: S(et) + "px" })
1453
1458
  }, [a("div", null, [s(S(ne), {
1454
- modelValue: S(J)[m].value,
1455
- "onUpdate:modelValue": (e) => S(J)[m].value = e,
1459
+ modelValue: S(q)[m].value,
1460
+ "onUpdate:modelValue": (e) => S(q)[m].value = e,
1456
1461
  placeholder: "按回车筛选",
1457
1462
  trim: !0,
1458
1463
  style: { width: "100%" },
1459
- onKeyup: ee((e) => S(st)(f.field), ["enter"])
1464
+ onKeyup: ee((e) => S(Y)(f.field), ["enter"])
1460
1465
  }, null, 8, [
1461
1466
  "modelValue",
1462
1467
  "onUpdate:modelValue",
1463
1468
  "onKeyup"
1464
- ])]), a("div", De, [s(S(ae), {
1465
- modelValue: S(J)[m].inputFilter.type,
1466
- "onUpdate:modelValue": (e) => S(J)[m].inputFilter.type = e,
1467
- options: S(it)
1469
+ ])]), a("div", De, [s(S(ie), {
1470
+ modelValue: S(q)[m].inputFilter.type,
1471
+ "onUpdate:modelValue": (e) => S(q)[m].inputFilter.type = e,
1472
+ options: S(nt)
1468
1473
  }, null, 8, [
1469
1474
  "modelValue",
1470
1475
  "onUpdate:modelValue",
1471
1476
  "options"
1472
1477
  ])])], 4)) : r("", !0),
1473
- S(J)[m].type == "numberFilter" || S(J)[m].type == "numberFilter%" ? (h(), i("div", {
1478
+ S(q)[m].type == "numberFilter" || S(q)[m].type == "numberFilter%" ? (h(), i("div", {
1474
1479
  key: 1,
1475
- style: u({ width: S(nt) + "px" })
1476
- }, [a("div", Oe, [s(S(ae), {
1477
- modelValue: S(J)[m].numberFilter.type,
1478
- "onUpdate:modelValue": (e) => S(J)[m].numberFilter.type = e,
1479
- options: S(q)
1480
+ style: u({ width: S(et) + "px" })
1481
+ }, [a("div", Oe, [s(S(ie), {
1482
+ modelValue: S(q)[m].numberFilter.type,
1483
+ "onUpdate:modelValue": (e) => S(q)[m].numberFilter.type = e,
1484
+ options: S(rt)
1480
1485
  }, null, 8, [
1481
1486
  "modelValue",
1482
1487
  "onUpdate:modelValue",
1483
1488
  "options"
1484
- ])]), a("div", null, [s(S(ie), {
1485
- modelValue: S(J)[m].value,
1486
- "onUpdate:modelValue": (e) => S(J)[m].value = e,
1489
+ ])]), a("div", null, [s(S(j), {
1490
+ modelValue: S(q)[m].value,
1491
+ "onUpdate:modelValue": (e) => S(q)[m].value = e,
1487
1492
  placeholder: "按回车筛选",
1488
1493
  controlConfig: { showButton: !1 },
1489
1494
  style: { width: "100%" },
1490
- onKeyup: ee((e) => S(st)(f.field), ["enter"])
1495
+ onKeyup: ee((e) => S(Y)(f.field), ["enter"])
1491
1496
  }, {
1492
1497
  suffix: T(() => [...d[3] ||= [o("%", -1)]]),
1493
1498
  _: 1
@@ -1496,22 +1501,22 @@ var ge = (e) => {
1496
1501
  "onUpdate:modelValue",
1497
1502
  "onKeyup"
1498
1503
  ])])], 4)) : r("", !0),
1499
- S(J)[m].type == "listFilter" ? (h(), i("div", {
1504
+ S(q)[m].type == "listFilter" ? (h(), i("div", {
1500
1505
  key: 2,
1501
- style: u({ maxWidth: S(nt) + "px" })
1506
+ style: u({ maxWidth: S(et) + "px" })
1502
1507
  }, [a("div", ke, [s(S(k), {
1503
- modelValue: S(J)[m].listFilter.selectedValue.length == S(J)[m].listFilter.listOptions.length,
1504
- indeterminate: S(J)[m].listFilter.selectedValue.length > 0 && S(J)[m].listFilter.selectedValue.length < S(J)[m].listFilter.listOptions.length,
1508
+ modelValue: S(q)[m].listFilter.selectedValue.length == S(q)[m].listFilter.listOptions.length,
1509
+ indeterminate: S(q)[m].listFilter.selectedValue.length > 0 && S(q)[m].listFilter.selectedValue.length < S(q)[m].listFilter.listOptions.length,
1505
1510
  content: "全部",
1506
- onChange: (e) => S(lt)(S(J)[m])
1511
+ onChange: (e) => S(ot)(S(q)[m])
1507
1512
  }, null, 8, [
1508
1513
  "modelValue",
1509
1514
  "indeterminate",
1510
1515
  "onChange"
1511
1516
  ])]), s(S(te), {
1512
- modelValue: S(J)[m].listFilter.selectedValue,
1513
- "onUpdate:modelValue": (e) => S(J)[m].listFilter.selectedValue = e,
1514
- options: S(J)[m].listFilter.listOptions,
1517
+ modelValue: S(q)[m].listFilter.selectedValue,
1518
+ "onUpdate:modelValue": (e) => S(q)[m].listFilter.selectedValue = e,
1519
+ options: S(q)[m].listFilter.listOptions,
1515
1520
  onChange: S(I)
1516
1521
  }, null, 8, [
1517
1522
  "modelValue",
@@ -1519,12 +1524,12 @@ var ge = (e) => {
1519
1524
  "options",
1520
1525
  "onChange"
1521
1526
  ])], 4)) : r("", !0),
1522
- a("div", H, [
1527
+ a("div", Ae, [
1523
1528
  s(S(O), {
1524
1529
  type: "primary",
1525
1530
  size: "small",
1526
1531
  mode: "text",
1527
- onClick: (e) => S(st)(f.field)
1532
+ onClick: (e) => S(Y)(f.field)
1528
1533
  }, {
1529
1534
  default: T(() => [...d[4] ||= [o(" 筛选 ", -1)]]),
1530
1535
  _: 1
@@ -1533,7 +1538,7 @@ var ge = (e) => {
1533
1538
  type: "primary",
1534
1539
  size: "small",
1535
1540
  mode: "text",
1536
- onClick: (e) => S(ct)(f.field)
1541
+ onClick: (e) => S(at)(f.field)
1537
1542
  }, {
1538
1543
  default: T(() => [...d[5] ||= [o(" 重置 ", -1)]]),
1539
1544
  _: 1
@@ -1542,13 +1547,13 @@ var ge = (e) => {
1542
1547
  type: "primary",
1543
1548
  size: "small",
1544
1549
  mode: "text",
1545
- onClick: d[0] ||= (e) => S(ct)()
1550
+ onClick: d[0] ||= (e) => S(at)()
1546
1551
  }, {
1547
1552
  default: T(() => [...d[6] ||= [o(" 重置所有 ", -1)]]),
1548
1553
  _: 1
1549
1554
  })
1550
1555
  ])
1551
- ], 12, Te)])) : r("", !0)])) : r("", !0)
1556
+ ], 12, V)])) : r("", !0)])) : r("", !0)
1552
1557
  ])) : (h(), i("span", xe)), f?.resizable && !f.children?.length ? (h(), i("div", {
1553
1558
  key: 4,
1554
1559
  style: {
@@ -1559,16 +1564,16 @@ var ge = (e) => {
1559
1564
  height: "100%",
1560
1565
  cursor: "col-resize"
1561
1566
  },
1562
- onMousedown: D((e) => S(X)(e, f), ["prevent", "stop"])
1563
- }, null, 40, Ae)) : r("", !0)], 12, be))), 128))], 64))), 128))], 4),
1564
- S(M).length == 0 ? (h(), i("div", {
1567
+ onMousedown: D((e) => S(lt)(e, f), ["prevent", "stop"])
1568
+ }, null, 40, H)) : r("", !0)], 12, z))), 128))], 64))), 128))], 4),
1569
+ S(N).length == 0 ? (h(), i("div", {
1565
1570
  key: 0,
1566
1571
  style: u([{
1567
1572
  display: "flex",
1568
1573
  "align-items": "center",
1569
1574
  position: "absolute",
1570
1575
  left: "calc(50% - 35px)"
1571
- }, { minHeight: `${S($) - S(j) - S(ve) - 30}px` }])
1576
+ }, { minHeight: `${S($) - S(M) - S(ve) - 30}px` }])
1572
1577
  }, " 暂无数据 ", 4)) : r("", !0),
1573
1578
  a("div", {
1574
1579
  class: "pretextTable-grid",
@@ -1579,13 +1584,13 @@ var ge = (e) => {
1579
1584
  contain: "layout paint style",
1580
1585
  position: "relative"
1581
1586
  }, {
1582
- minHeight: `${S($) - S(j) - S(ve) - S(he)}px`,
1587
+ minHeight: S($) - S(M) - S(ve) - S(he) - p.heightOffset + "px",
1583
1588
  height: `${S(me)}px`
1584
1589
  }])
1585
1590
  }, [a("div", {
1586
1591
  class: "pretextTable-grid-empty",
1587
- style: u({ height: `${S(ce)}px` })
1588
- }, null, 4), (h(!0), i(e, null, _(S(M), (t, d) => (h(), i(e, { key: t[S(m).id] }, [p.expandConfig?.isExpand && t[S(m).isExpandRow] ? (h(), i("div", {
1592
+ style: u({ height: `${S(se)}px` })
1593
+ }, null, 4), (h(!0), i(e, null, _(S(N), (t, d) => (h(), i(e, { key: t[S(m).id] }, [p.expandConfig?.isExpand && t[S(m).isExpandRow] ? (h(), i("div", {
1589
1594
  key: 0,
1590
1595
  class: "pretextTable-grid-item",
1591
1596
  style: u([{
@@ -1595,7 +1600,7 @@ var ge = (e) => {
1595
1600
  }, [a("div", { style: u({
1596
1601
  position: "sticky",
1597
1602
  left: p.expandConfig?.mode == "inside" ? "0px" : void 0,
1598
- width: p.expandConfig?.mode == "inside" ? `${S(gt) - 15}px` : "100%"
1603
+ width: p.expandConfig?.mode == "inside" ? `${S(mt) - 15}px` : "100%"
1599
1604
  }) }, [v(c.$slots, p.expandConfig?.slotName, {
1600
1605
  row: t,
1601
1606
  rowIndex: d
@@ -1608,11 +1613,11 @@ var ge = (e) => {
1608
1613
  "align-content": "start",
1609
1614
  contain: "layout style paint"
1610
1615
  }, { gridTemplateColumns: S(F) }])
1611
- }, [(h(!0), i(e, null, _(S(N), (f, g) => (h(), i("div", {
1616
+ }, [(h(!0), i(e, null, _(S(ue), (f, g) => (h(), i("div", {
1612
1617
  key: "item_" + f.field,
1613
1618
  class: l(["pretextTable-grid-item pretextTable-flex-align-items-center", {
1614
- "pretextTable-grid-item-hover": p.rowConfig?.isHover && S(Ge)[S(m).id] == t[S(m).id],
1615
- "pretextTable-grid-item-current": p.rowConfig?.isCurrent && S(Ve)[S(m).id] == t[S(m).id],
1619
+ "pretextTable-grid-item-hover": p.rowConfig?.isHover && S(Ue)[S(m).id] == t[S(m).id],
1620
+ "pretextTable-grid-item-current": p.rowConfig?.isCurrent && S(ze)[S(m).id] == t[S(m).id],
1616
1621
  "pretextTable-grid-item-stripe": p.stripe && t[S(m).stripe]
1617
1622
  }]),
1618
1623
  style: u({
@@ -1620,16 +1625,19 @@ var ge = (e) => {
1620
1625
  fontSize: S(U).fontSize,
1621
1626
  zIndex: +(f.fixed == "left" || f.fixed == "right"),
1622
1627
  position: f.fixed == "left" || f.fixed == "right" ? "sticky" : "static",
1623
- left: f.fixed == "left" ? S(Be)[g] : "",
1628
+ left: f.fixed == "left" ? S(G)[g] : "",
1624
1629
  right: f.fixed == "right" ? S(K)[g] : "",
1625
1630
  borderLeft: f.fixed == "right" ? "1px solid var(--pretextTable-border-color)" : "",
1626
- boxShadow: f.fixed == "left" && g == S(W) ? "var(--pretextTable-shadow-color) 2px 0px 5px -1px" : f.fixed == "right" && g == S(G) ? "var(--pretextTable-shadow-color) -2px 0px 5px -1px" : "",
1631
+ boxShadow: f.fixed == "left" && g == S(W) ? "var(--pretextTable-shadow-color) 2px 0px 5px -1px" : f.fixed == "right" && g == S(Re) ? "var(--pretextTable-shadow-color) -2px 0px 5px -1px" : "",
1627
1632
  height: `${t[S(m).height]}px`,
1628
1633
  justifyContent: f.type == "checkbox" ? "center" : ""
1629
1634
  }),
1630
- onClick: (e) => S(Ue)(t, f),
1631
- onMouseenter: (e) => S(Ke)(t)
1632
- }, [f.fixed == "left" || f.fixed == "right" || g >= S(le) && g <= S(ue) ? (h(), i(e, { key: 0 }, [p.treeConfig?.isOpenTree && f.treeNode ? (h(), i(e, { key: 0 }, [a("span", { style: u({ marginLeft: (Number(t[S(m).level]) - 1) * (p.treeConfig?.indent || S(pt).indent) + "px" }) }, null, 4), p.treeConfig?.showIcon === !1 ? r("", !0) : (h(), i(e, { key: 0 }, [t[p.treeConfig?.childrenField || S(pt).childrenField]?.length > 0 || p.treeConfig?.lazy && t[p.treeConfig?.hasChildField || S(pt).hasChildField] ? (h(), i(e, { key: 0 }, [
1635
+ onClick: (e) => S(Ve)(t, f),
1636
+ onMouseenter: (e) => S(We)(t)
1637
+ }, [f.fixed == "left" || f.fixed == "right" || g >= S(ce) && g <= S(le) ? (h(), i(e, { key: 0 }, [p.treeConfig?.isOpenTree && f.treeNode ? (h(), i(e, { key: 0 }, [a("span", { style: u({
1638
+ marginLeft: (Number(t[S(m).level]) - 1) * (p.treeConfig?.indent || S(Q).indent) + "px",
1639
+ paddingLeft: S(U).paddingLeft
1640
+ }) }, null, 4), p.treeConfig?.showIcon === !1 ? r("", !0) : (h(), i(e, { key: 0 }, [t[p.treeConfig?.childrenField || S(Q).childrenField]?.length > 0 || p.treeConfig?.lazy && t[p.treeConfig?.hasChildField || S(Q).hasChildField] ? (h(), i(e, { key: 0 }, [
1633
1641
  E(s(S(A), {
1634
1642
  name: "spinner",
1635
1643
  roll: ""
@@ -1638,37 +1646,46 @@ var ge = (e) => {
1638
1646
  name: "caret-right",
1639
1647
  style: {},
1640
1648
  class: "pretextTable-icon",
1641
- onClick: D((e) => S(Z)([t], !0), ["stop"])
1649
+ onClick: D((e) => S(ut)([t], !0), ["stop"])
1642
1650
  }, null, 8, ["onClick"]), [[C, !t[S(m).isCollapsed] && !t[S(m).lazyLoading]]]),
1643
1651
  E(s(S(A), {
1644
1652
  name: "caret-down",
1645
1653
  style: {},
1646
1654
  class: "pretextTable-icon",
1647
- onClick: D((e) => S(Z)([t], !1), ["stop"])
1655
+ onClick: D((e) => S(ut)([t], !1), ["stop"])
1648
1656
  }, null, 8, ["onClick"]), [[C, t[S(m).isCollapsed] && !t[S(m).lazyLoading]]])
1649
1657
  ], 64)) : r("", !0)], 64))], 64)) : r("", !0), f.type == "checkbox" ? (h(), n(S(k), {
1650
1658
  key: 1,
1651
1659
  modelValue: t[f.field],
1652
1660
  indeterminate: t[S(m).checkedIndeterminate + f.field],
1653
- onChange: (e) => S(Xe)(t, f.field)
1661
+ onChange: (e) => S(Je)(t, f.field)
1654
1662
  }, null, 8, [
1655
1663
  "modelValue",
1656
1664
  "indeterminate",
1657
1665
  "onChange"
1658
1666
  ])) : f.type == "seq" ? (h(), i(e, { key: 2 }, [p.treeConfig?.isOpenTree ? (h(), i("span", {
1659
1667
  key: 0,
1660
- style: u({ marginLeft: `${(Number(t[S(m).level]) - 1) * (p.treeConfig?.indent || 20)}px` })
1668
+ style: u({
1669
+ marginLeft: `${(Number(t[S(m).level]) - 1) * (p.treeConfig?.indent || 20)}px`,
1670
+ paddingLeft: S(U).paddingLeft
1671
+ })
1661
1672
  }, null, 4)) : r("", !0), o(" " + b(t.pretextSeq), 1)], 64)) : f.type == "expand" ? (h(), i("span", Me, [E(s(S(A), {
1662
1673
  name: "arrow-right",
1663
1674
  style: {},
1664
1675
  class: "pretextTable-icon",
1665
- onClick: D((e) => S(Q)([t], !0), ["stop"])
1676
+ onClick: D((e) => S(dt)([t], !0), ["stop"])
1666
1677
  }, null, 8, ["onClick"]), [[C, !t[S(m).isRowExpanded]]]), E(s(S(A), {
1667
1678
  name: "arrow-down",
1668
1679
  style: {},
1669
1680
  class: "pretextTable-icon",
1670
- onClick: D((e) => S(Q)([t], !1), ["stop"])
1671
- }, null, 8, ["onClick"]), [[C, t[S(m).isRowExpanded]]])])) : f.slots?.defaultType == "a" ? (h(), i("a", Ne, b(t[f.field] || ""), 1)) : f.slots?.defaultType == "tag" ? (h(), i("span", Pe, [(h(!0), i(e, null, _(f.slots?.defaultProps?.tag?.options || [], (a) => (h(), i(e, null, [a.value == t[f.field] ? (h(), n(S(se), {
1681
+ onClick: D((e) => S(dt)([t], !1), ["stop"])
1682
+ }, null, 8, ["onClick"]), [[C, t[S(m).isRowExpanded]]])])) : f.slots?.defaultType == "a" ? (h(), i("span", {
1683
+ key: 4,
1684
+ style: u({ paddingLeft: S(U).paddingLeft })
1685
+ }, [a("a", null, b(t[f.field] || ""), 1)], 4)) : f.slots?.defaultType == "tag" ? (h(), i("span", {
1686
+ key: 5,
1687
+ style: u({ paddingLeft: S(U).paddingLeft })
1688
+ }, [(h(!0), i(e, null, _(f.slots?.defaultProps?.tag?.options || [], (a) => (h(), i(e, null, [a.value == t[f.field] ? (h(), n(S(oe), {
1672
1689
  key: 0,
1673
1690
  size: "mini",
1674
1691
  border: !0,
@@ -1682,11 +1699,16 @@ var ge = (e) => {
1682
1699
  "status",
1683
1700
  "color",
1684
1701
  "style"
1685
- ])) : r("", !0)], 64))), 256))])) : f.slots?.defaultType == "icon" ? E((h(), n(S(A), {
1702
+ ])) : r("", !0)], 64))), 256))], 4)) : f.slots?.defaultType == "icon" ? (h(), i("span", {
1686
1703
  key: 6,
1704
+ style: u({ paddingLeft: S(U).paddingLeft })
1705
+ }, [E(s(S(A), {
1687
1706
  name: f.slots?.defaultProps?.icon?.name,
1688
1707
  style: u(f.slots?.defaultProps?.icon?.style || {})
1689
- }, null, 8, ["name", "style"])), [[C, t[f.field]]]) : f.slots?.defaultType == "buttons" ? (h(), i(e, { key: 7 }, [f.slots?.defaultProps?.buttons?.options?.length ? (h(!0), i(e, { key: 0 }, _(f.slots?.defaultProps?.buttons?.options || [], (n) => (h(), i("div", Fe, [(h(!0), i(e, null, _(n, (n) => (h(), i(e, null, [!n.showField || t[n.showField] ? (h(), i("span", {
1708
+ }, null, 8, ["name", "style"]), [[C, t[f.field]]])], 4)) : f.slots?.defaultType == "buttons" ? (h(), i("span", {
1709
+ key: 7,
1710
+ style: u({ paddingLeft: S(U).paddingLeft })
1711
+ }, [f.slots?.defaultProps?.buttons?.options?.length ? (h(!0), i(e, { key: 0 }, _(f.slots?.defaultProps?.buttons?.options || [], (n) => (h(), i("div", Ne, [(h(!0), i(e, null, _(n, (n) => (h(), i(e, null, [!n.showField || t[n.showField] ? (h(), i("span", {
1690
1712
  key: 0,
1691
1713
  title: n.tip || ""
1692
1714
  }, [s(S(O), {
@@ -1708,14 +1730,17 @@ var ge = (e) => {
1708
1730
  "disabled",
1709
1731
  "loading",
1710
1732
  "onClick"
1711
- ])], 8, Ie)) : r("", !0)], 64))), 256))]))), 256)) : r("", !0)], 64)) : f.slots?.defaultType == "switch" ? (h(), i(e, { key: 8 }, [!f.slots?.defaultProps?.switch?.showField || t[f.slots?.defaultProps?.switch?.showField] ? (h(), n(S(oe), {
1733
+ ])], 8, Pe)) : r("", !0)], 64))), 256))]))), 256)) : r("", !0)], 4)) : f.slots?.defaultType == "switch" ? (h(), i("span", {
1734
+ key: 8,
1735
+ style: u({ paddingLeft: S(U).paddingLeft })
1736
+ }, [!f.slots?.defaultProps?.switch?.showField || t[f.slots?.defaultProps?.switch?.showField] ? (h(), n(S(ae), {
1712
1737
  key: 0,
1713
1738
  size: "mini",
1714
1739
  modelValue: t[f.field],
1715
- openLabel: f.slots?.defaultProps?.switch?.openLabel || f.slots?.defaultProps?.switch?.checkedChildren || "",
1716
- closeLabel: f.slots?.defaultProps?.switch?.closeLabel || f.slots?.defaultProps?.switch?.uncheckedChildren || "",
1717
- openValue: f.slots?.defaultProps?.switch?.openValue || f.slots?.defaultProps?.switch?.checkedValue || !0,
1718
- closeValue: f.slots?.defaultProps?.switch?.closeValue || f.slots?.defaultProps?.switch?.uncheckedValue || !1,
1740
+ openLabel: f.slots?.defaultProps?.switch?.openLabel ?? f.slots?.defaultProps?.switch?.checkedChildren ?? "",
1741
+ closeLabel: f.slots?.defaultProps?.switch?.closeLabel ?? f.slots?.defaultProps?.switch?.uncheckedChildren ?? "",
1742
+ openValue: f.slots?.defaultProps?.switch?.openValue ?? f.slots?.defaultProps?.switch?.checkedValue ?? !0,
1743
+ closeValue: f.slots?.defaultProps?.switch?.closeValue ?? f.slots?.defaultProps?.switch?.uncheckedValue ?? !1,
1719
1744
  disabled: f.slots?.defaultProps?.switch?.disabledField && t[f.slots?.defaultProps?.switch?.disabledField],
1720
1745
  loading: f.slots?.defaultProps?.switch?.loadingField && t[f.slots?.defaultProps?.switch?.loadingField],
1721
1746
  onChange: (e) => f.slots?.defaultProps?.switch?.onChange?.(t, g)
@@ -1728,7 +1753,7 @@ var ge = (e) => {
1728
1753
  "disabled",
1729
1754
  "loading",
1730
1755
  "onChange"
1731
- ])) : r("", !0)], 64)) : f.slots?.defaultType == "checkbox" ? (h(), i("span", Le, [s(S(k), {
1756
+ ])) : r("", !0)], 4)) : f.slots?.defaultType == "checkbox" ? (h(), i("span", Fe, [s(S(k), {
1732
1757
  modelValue: t[f.field],
1733
1758
  indeterminate: f.slots?.defaultProps?.checkbox?.checkedIndeterminateField ? t[f.slots?.defaultProps?.checkbox?.checkedIndeterminateField] : !1,
1734
1759
  disabled: f.slots?.defaultProps?.checkbox?.disabledField && t[f.slots?.defaultProps?.checkbox?.disabledField],
@@ -1741,13 +1766,14 @@ var ge = (e) => {
1741
1766
  ])])) : (h(), i("span", {
1742
1767
  key: 10,
1743
1768
  class: l({ "pretextTable-text-ellipsis": !!p.showOverflow }),
1769
+ style: u({ paddingLeft: S(U).paddingLeft }),
1744
1770
  title: p.showOverflow && t[f.field] || ""
1745
- }, [f.slots?.default ? (h(), i(e, { key: 0 }, [!p.lazyLoadSlot || t.slotShowTimestamp == S(mt) ? v(c.$slots, f.slots?.default, {
1771
+ }, [f.slots?.default ? (h(), i(e, { key: 0 }, [!p.lazyLoadSlot || t.slotShowTimestamp == S(ft) ? v(c.$slots, f.slots?.default, {
1746
1772
  key: 0,
1747
1773
  row: t,
1748
1774
  column: f,
1749
1775
  rowIndex: d
1750
- }, () => [o(b(t[f.field] ?? ""), 1)]) : r("", !0)], 64)) : (h(), i(e, { key: 1 }, [o(b(t[f.field] ?? ""), 1)], 64))], 10, Re))], 64)) : r("", !0)], 46, je))), 128))], 4))], 64))), 128))], 4),
1776
+ }, () => [o(b(t[f.field] ?? ""), 1)]) : r("", !0)], 64)) : (h(), i(e, { key: 1 }, [o(b(t[f.field] ?? ""), 1)], 64))], 14, Ie))], 64)) : r("", !0)], 46, je))), 128))], 4))], 64))), 128))], 4),
1751
1777
  p.showFooter && S(R).length > 0 ? (h(), i("div", {
1752
1778
  key: 1,
1753
1779
  style: u([{
@@ -1766,10 +1792,10 @@ var ge = (e) => {
1766
1792
  style: u({
1767
1793
  fontSize: S(L).fontSize,
1768
1794
  zIndex: t == 0 ? 3 : e.fixed == "left" || e.fixed == "right" ? 2 : 1,
1769
- left: e.fixed == "left" ? S(Be)[t] : "",
1795
+ left: e.fixed == "left" ? S(G)[t] : "",
1770
1796
  right: e.fixed == "right" ? S(K)[t] : "",
1771
1797
  borderLeft: e.fixed == "right" ? "1px solid var(--pretextTable-border-color)" : "",
1772
- boxShadow: e.fixed == "left" && t == S(W) ? "var(--pretextTable-shadow-color) 2px 0px 5px -1px" : e.fixed == "right" && t == S(G) ? "var(--pretextTable-shadow-color) -2px 0px 5px -1px" : "",
1798
+ boxShadow: e.fixed == "left" && t == S(W) ? "var(--pretextTable-shadow-color) 2px 0px 5px -1px" : e.fixed == "right" && t == S(Re) ? "var(--pretextTable-shadow-color) -2px 0px 5px -1px" : "",
1773
1799
  height: `${e.height}px`,
1774
1800
  maxHeight: `${e.height}px`
1775
1801
  })
@@ -1778,7 +1804,7 @@ var ge = (e) => {
1778
1804
  footerColumn: e,
1779
1805
  footerData: e.data,
1780
1806
  footerRowIndex: t
1781
- }, () => [o(b(e.data ?? ""), 1)]) : (h(), i("span", ze, b(e.data ?? ""), 1))], 4))), 128))], 64))), 256))], 4)) : r("", !0)
1807
+ }, () => [o(b(e.data ?? ""), 1)]) : (h(), i("span", Le, b(e.data ?? ""), 1))], 4))), 128))], 64))), 256))], 4)) : r("", !0)
1782
1808
  ], 36),
1783
1809
  E(a("div", { style: u([{
1784
1810
  position: "absolute",
@@ -1789,10 +1815,10 @@ var ge = (e) => {
1789
1815
  "z-index": "99999",
1790
1816
  "box-shadow": "0 0 2px rgba(64, 158, 255, 0.5)"
1791
1817
  }, {
1792
- transform: `translateX(${S(Y)}px)`,
1818
+ transform: `translateX(${S(ct)}px)`,
1793
1819
  height: S($) + "px"
1794
- }]) }, null, 4), [[C, S(ut)]]),
1795
- a("div", { style: u({ backgroundColor: S(ht) ? "red" : "" }) }, null, 4)
1820
+ }]) }, null, 4), [[C, S(st)]]),
1821
+ a("div", { style: u({ backgroundColor: S(pt) ? "red" : "" }) }, null, 4)
1796
1822
  ], 512));
1797
1823
  }
1798
1824
  }), W = U;
@@ -20,9 +20,16 @@ declare const _default: __VLS_WithSlots<import('vue').DefineComponent<import('vu
20
20
  type: PropType<{
21
21
  /** 字体大小,单位 px */
22
22
  fontSize?: string;
23
+ /** 左内边距,单位 px */
24
+ paddingLeft?: string;
23
25
  }>;
24
26
  default: () => {};
25
27
  };
28
+ /** 表格高度偏移量,用于没什么数据时,可能由于滚动条的高度原因,导致出现滚动条,需要偏移量来解决 */
29
+ heightOffset: {
30
+ type: NumberConstructor;
31
+ default: number;
32
+ };
26
33
  /** 加载中 */
27
34
  loading: {
28
35
  type: BooleanConstructor;
@@ -134,9 +141,16 @@ declare const _default: __VLS_WithSlots<import('vue').DefineComponent<import('vu
134
141
  type: PropType<{
135
142
  /** 字体大小,单位 px */
136
143
  fontSize?: string;
144
+ /** 左内边距,单位 px */
145
+ paddingLeft?: string;
137
146
  }>;
138
147
  default: () => {};
139
148
  };
149
+ /** 表格高度偏移量,用于没什么数据时,可能由于滚动条的高度原因,导致出现滚动条,需要偏移量来解决 */
150
+ heightOffset: {
151
+ type: NumberConstructor;
152
+ default: number;
153
+ };
140
154
  /** 加载中 */
141
155
  loading: {
142
156
  type: BooleanConstructor;
@@ -220,7 +234,10 @@ declare const _default: __VLS_WithSlots<import('vue').DefineComponent<import('vu
220
234
  cellStyle: {
221
235
  /** 字体大小,单位 px */
222
236
  fontSize?: string;
237
+ /** 左内边距,单位 px */
238
+ paddingLeft?: string;
223
239
  };
240
+ heightOffset: number;
224
241
  loading: boolean;
225
242
  loadingConfig: {
226
243
  /** 加载中文本 */
@@ -51,6 +51,7 @@ export declare const useHolyesTable: (dataObj: {
51
51
  itemStyles: {
52
52
  fontWeight: string;
53
53
  fontSize: any;
54
+ paddingLeft: any;
54
55
  };
55
56
  fixedLeftIndex: import('vue').Ref<number, number>;
56
57
  fixedRightIndex: import('vue').Ref<number, number>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "holyes-table",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "合力思虚拟滚动表格组件",
5
5
  "main": "./dist/index.mjs",
6
6
  "module": "./dist/index.mjs",
@@ -1,5 +1,10 @@
1
1
  # 更新日志
2
2
 
3
+ ## v1.0.21 (2026-06-25)
4
+
5
+ - 增加表格高度偏移属性heightOffset, 用于没什么数据时,可能由于滚动条的高度原因,导致出现滚动条,需要偏移量来解决
6
+ - cellStyle增加paddingLeft属性, 用于设置单元格的左内边距,默认值为0
7
+
3
8
  ## v1.0.20 (2026-06-24)
4
9
 
5
10
  - 增加setCurrentRow方法,用于设置当前选中的行, 会判断是否更换了选中行, 并触发 currentChange 事件