holyes-table 1.0.19 → 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
|
|
3
|
-
import
|
|
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
|
|
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(
|
|
15
|
+
return new Worker("data:text/javascript;charset=utf-8," + encodeURIComponent(ue), { name: e?.name });
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
@@ -257,7 +257,7 @@ function me(e) {
|
|
|
257
257
|
}
|
|
258
258
|
//#endregion
|
|
259
259
|
//#region lib/pretextTable/hook/useSort.ts
|
|
260
|
-
function
|
|
260
|
+
function L(e) {
|
|
261
261
|
let { nowDataSource: t, getVisibleData: n, setNowDataSource: r, treeConfig: i, defaultTreeConfig: a, columns: o } = e, s = g(""), c = "", l = g(null), u = (e, t) => {
|
|
262
262
|
let n = o?.value || [];
|
|
263
263
|
c = "";
|
|
@@ -283,7 +283,7 @@ function he(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 =
|
|
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) {
|
|
@@ -304,7 +304,7 @@ function he(e) {
|
|
|
304
304
|
}
|
|
305
305
|
//#endregion
|
|
306
306
|
//#region lib/pretextTable/hook/useFilter.ts
|
|
307
|
-
function
|
|
307
|
+
function he(e) {
|
|
308
308
|
let { columns: t, baseDataSource: n, setNowDataSource: r, scrollTo: i, refresh: a, afterFilter: o, treeConfig: s, defaultTreeConfig: c } = e, l = [{
|
|
309
309
|
label: "模糊搜索",
|
|
310
310
|
value: "模糊"
|
|
@@ -501,7 +501,7 @@ function ge(e) {
|
|
|
501
501
|
}
|
|
502
502
|
//#endregion
|
|
503
503
|
//#region lib/pretextTable/hook/useHeaderResize.ts
|
|
504
|
-
var
|
|
504
|
+
var ge = (e) => {
|
|
505
505
|
let { pretextTableRef: t, afterResize: n } = e, r = g(!1), i = 0, a = g(0), o = 0, s = 0, c = null, l = (e, n) => {
|
|
506
506
|
e.preventDefault(), e.stopPropagation(), e.target && (c = n, o = t.value?.getBoundingClientRect().left || 0, r.value = !0, i = e.clientX - o - 0, a.value = i, s = e.clientX - o - 0 - (n.width || n.minWidth || 0) + (n.minWidth || 100), document.body.classList.add("pretextTable-resize-dragging"), document.addEventListener("mousemove", d), document.addEventListener("mouseup", f));
|
|
507
507
|
}, u = null, d = (e) => {
|
|
@@ -523,7 +523,7 @@ var _e = (e) => {
|
|
|
523
523
|
dragLineLeft: a,
|
|
524
524
|
startResize: l
|
|
525
525
|
};
|
|
526
|
-
},
|
|
526
|
+
}, _e = (e) => {
|
|
527
527
|
let { showFooter: t, nowDataSource: n, columns: r } = e, i = g(0), a = g([]), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = (e) => {
|
|
528
528
|
if (s.clear(), !t) {
|
|
529
529
|
i.value = 0;
|
|
@@ -580,15 +580,15 @@ var _e = (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) +
|
|
583
|
+
switch (r = Number(i.data) + M.toNumber(n), i?.dataType) {
|
|
584
584
|
case "number0":
|
|
585
|
-
r =
|
|
585
|
+
r = M.toFixed(r, 0);
|
|
586
586
|
break;
|
|
587
587
|
case "number1":
|
|
588
|
-
r =
|
|
588
|
+
r = M.toFixed(r, 1);
|
|
589
589
|
break;
|
|
590
590
|
case "number2":
|
|
591
|
-
r =
|
|
591
|
+
r = M.toFixed(r, 2);
|
|
592
592
|
break;
|
|
593
593
|
default: break;
|
|
594
594
|
}
|
|
@@ -622,7 +622,7 @@ var _e = (e) => {
|
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
624
|
};
|
|
625
|
-
},
|
|
625
|
+
}, ve = (e) => {
|
|
626
626
|
let { treeConfig: t, afterTreeExpand: n, insertChild: r } = e, i = t?.idField || I.idField, a = t?.parentField || I.parentField, o = t?.childrenField || I.childrenField, s = /* @__PURE__ */ new Map(), c = (e, n = !1) => {
|
|
627
627
|
let r = t?.childrenField || I.childrenField, i = t?.idField || F.id || "";
|
|
628
628
|
for (let t of e) s.get(t[i]) && (t[F.isCollapsed] = !0), n && t[r]?.length && c(t[r], !0);
|
|
@@ -635,7 +635,7 @@ var _e = (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 =
|
|
638
|
+
n = le(n, {
|
|
639
639
|
key: i,
|
|
640
640
|
parentKey: a,
|
|
641
641
|
children: o
|
|
@@ -665,10 +665,10 @@ var _e = (e) => {
|
|
|
665
665
|
n(e, i);
|
|
666
666
|
}
|
|
667
667
|
};
|
|
668
|
-
},
|
|
668
|
+
}, R = () => {
|
|
669
669
|
let e = document.activeElement;
|
|
670
670
|
e?.blur && e.blur();
|
|
671
|
-
},
|
|
671
|
+
}, ye = (e) => {
|
|
672
672
|
let { expandConfig: t, afterRowExpand: n, insertExpandRow: r } = e, i = {
|
|
673
673
|
transform: !0,
|
|
674
674
|
parentField: "parentId",
|
|
@@ -695,7 +695,7 @@ var _e = (e) => {
|
|
|
695
695
|
n(e, t);
|
|
696
696
|
}
|
|
697
697
|
};
|
|
698
|
-
},
|
|
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 _e = (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 ||
|
|
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 _e = (e) => {
|
|
|
726
726
|
}), s++;
|
|
727
727
|
}, S = async (n, r) => {
|
|
728
728
|
let i = null;
|
|
729
|
-
i = typeof r == "string" ?
|
|
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 _e = (e) => {
|
|
|
744
744
|
treeNode: t.treeNode || !1
|
|
745
745
|
});
|
|
746
746
|
}
|
|
747
|
-
let o = await
|
|
747
|
+
let o = await P({
|
|
748
748
|
tempData: n,
|
|
749
749
|
index: 0,
|
|
750
750
|
columns: a
|
|
751
751
|
});
|
|
752
752
|
if (o) {
|
|
753
|
-
|
|
754
|
-
let t = e.props.treeConfig?.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" ?
|
|
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
|
-
|
|
765
|
-
}, { headerHeight: T, headerStyles: E, createHeader: ee, headerRef: D, getHeaderRefHeight: O } = fe({ pretextTableRef: r }), { footerHeight: k, footerColumns: te, getFooterHeight: A, updateFooter: ne, updateFooterCellLabel: re } =
|
|
764
|
+
Z([r]), n[F.expandChildren] = [r];
|
|
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
|
-
}),
|
|
770
|
-
e == -1 && (e =
|
|
771
|
-
},
|
|
772
|
-
|
|
773
|
-
},
|
|
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
|
-
|
|
777
|
-
},
|
|
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: "14px"
|
|
780
|
-
|
|
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:
|
|
787
|
+
itemStyles: ce,
|
|
787
788
|
divLineHeight: 22,
|
|
788
789
|
keyNames: F,
|
|
789
790
|
isNoAutoWrap: le,
|
|
@@ -792,21 +793,21 @@ var _e = (e) => {
|
|
|
792
793
|
...e.props.treeConfig,
|
|
793
794
|
loadMethod: void 0
|
|
794
795
|
},
|
|
795
|
-
defaultTreeConfig: { ...
|
|
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
|
-
}),
|
|
803
|
+
}), I = (e) => {
|
|
803
804
|
for (let t of e) {
|
|
804
|
-
let e =
|
|
805
|
+
let e = X.get(t.id);
|
|
805
806
|
e && (e[F.height] = t.pretextHeight);
|
|
806
807
|
}
|
|
807
|
-
},
|
|
808
|
+
}, be = 0, z = !1, xe = async (e) => {
|
|
808
809
|
if (t.value?.length === 0) {
|
|
809
|
-
if (
|
|
810
|
+
if (be++, be > 50) {
|
|
810
811
|
console.error("表格没有设置 columns.value");
|
|
811
812
|
return;
|
|
812
813
|
}
|
|
@@ -817,7 +818,7 @@ var _e = (e) => {
|
|
|
817
818
|
}
|
|
818
819
|
let n = 0;
|
|
819
820
|
if (e.length === 0) {
|
|
820
|
-
b(e),
|
|
821
|
+
b(e), M(), Oe.value = [];
|
|
821
822
|
return;
|
|
822
823
|
}
|
|
823
824
|
let r = [];
|
|
@@ -839,13 +840,13 @@ var _e = (e) => {
|
|
|
839
840
|
}
|
|
840
841
|
if (e.length * Se >= Ce) {
|
|
841
842
|
let t = 5e3;
|
|
842
|
-
|
|
843
|
-
let i = await
|
|
843
|
+
z = !0;
|
|
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,
|
|
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 _e = (e) => {
|
|
|
858
859
|
c++;
|
|
859
860
|
continue;
|
|
860
861
|
}
|
|
861
|
-
let t = await
|
|
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,
|
|
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
|
-
let t = await
|
|
873
|
+
z = !0;
|
|
874
|
+
let t = await P({
|
|
874
875
|
tempData: e,
|
|
875
876
|
index: 0,
|
|
876
877
|
columns: r
|
|
877
878
|
});
|
|
878
|
-
|
|
879
|
+
z = !1, t && (I(t.heightDatas), b(e), M(), H());
|
|
879
880
|
}
|
|
880
|
-
}, Se = 0, Ce = 1e4,
|
|
881
|
-
if (we = i.value?.scrollLeft || 0,
|
|
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
|
-
|
|
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
|
-
},
|
|
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
|
-
},
|
|
897
|
+
}, Oe = g([]), ke = g(0), Ae = se((e, t) => {
|
|
897
898
|
setTimeout(() => {
|
|
898
|
-
|
|
899
|
+
ke.value = t, e.forEach((e) => {
|
|
899
900
|
e.slotShowTimestamp = t;
|
|
900
901
|
}), l();
|
|
901
902
|
}, 0);
|
|
@@ -925,7 +926,7 @@ var _e = (e) => {
|
|
|
925
926
|
s = v.get(i) || {
|
|
926
927
|
totalHeight: 0,
|
|
927
928
|
row: {}
|
|
928
|
-
}, r = s.totalHeight,
|
|
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 _e = (e) => {
|
|
|
936
937
|
let a = _[i];
|
|
937
938
|
if (a) {
|
|
938
939
|
if (r += a[F.height], e <= r && n == 0) {
|
|
939
|
-
|
|
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
|
-
|
|
947
|
-
},
|
|
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,13 +963,12 @@ var _e = (e) => {
|
|
|
962
963
|
}
|
|
963
964
|
}
|
|
964
965
|
}
|
|
965
|
-
r <= a && (
|
|
966
|
-
},
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
let r = e.props.treeConfig.childrenField || K.childrenField;
|
|
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 }));
|
|
969
|
+
}, Be = (t, n) => {
|
|
970
|
+
if (ze(t), e.props.treeConfig?.isOpenTree) {
|
|
971
|
+
let r = e.props.treeConfig.childrenField || J.childrenField;
|
|
972
972
|
switch (!0) {
|
|
973
973
|
case t?.[r]?.length == 0: break;
|
|
974
974
|
case e.props.treeConfig?.trigger == "cell" && n.treeNode:
|
|
@@ -981,7 +981,7 @@ var _e = (e) => {
|
|
|
981
981
|
if (e.props.expandConfig?.isExpand) switch (!0) {
|
|
982
982
|
case e.props.expandConfig?.trigger == "cell" && n.type == "expand":
|
|
983
983
|
case e.props.expandConfig?.trigger == "row":
|
|
984
|
-
|
|
984
|
+
ct([t], !t[F.isRowExpanded]);
|
|
985
985
|
break;
|
|
986
986
|
default: break;
|
|
987
987
|
}
|
|
@@ -990,34 +990,34 @@ var _e = (e) => {
|
|
|
990
990
|
column: n
|
|
991
991
|
});
|
|
992
992
|
}, Ve = (t) => {
|
|
993
|
-
e.emits && e.emits("headerCellClick", { column: t }), e.props.sortConfig?.trigger == "cell" && t.sortable &&
|
|
994
|
-
},
|
|
995
|
-
e.props.rowConfig?.isHover && (
|
|
996
|
-
}, { getCheckField:
|
|
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 });
|
|
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({
|
|
997
997
|
pretextId: F.id,
|
|
998
998
|
columns: t,
|
|
999
|
-
blurAnyElement:
|
|
999
|
+
blurAnyElement: R,
|
|
1000
1000
|
nowDataSource: h,
|
|
1001
1001
|
baseDataSource: m,
|
|
1002
1002
|
emits: e.emits,
|
|
1003
1003
|
treeConfig: e.props.treeConfig
|
|
1004
|
-
}),
|
|
1005
|
-
|
|
1004
|
+
}), $e = (e) => {
|
|
1005
|
+
Qe();
|
|
1006
1006
|
let t = [];
|
|
1007
|
-
if (t = e ? [e] :
|
|
1008
|
-
}, { isDragging:
|
|
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({
|
|
1009
1009
|
pretextTableRef: r,
|
|
1010
1010
|
afterResize: (t) => {
|
|
1011
|
-
|
|
1011
|
+
W(), e.emits("resizableChange", {
|
|
1012
1012
|
column: { ...t.column },
|
|
1013
1013
|
resizeWidth: t.column.width
|
|
1014
1014
|
});
|
|
1015
1015
|
}
|
|
1016
|
-
}),
|
|
1017
|
-
b(h.value),
|
|
1018
|
-
},
|
|
1016
|
+
}), rt = () => {
|
|
1017
|
+
b(h.value), M(), H();
|
|
1018
|
+
}, q = (t) => {
|
|
1019
1019
|
if (t) {
|
|
1020
|
-
let t = e.props.treeConfig?.childrenField ||
|
|
1020
|
+
let t = e.props.treeConfig?.childrenField || J.childrenField, n = [], r = (e) => {
|
|
1021
1021
|
if (e[t]?.length) {
|
|
1022
1022
|
n.push(e);
|
|
1023
1023
|
for (let n of e[t]) r(n);
|
|
@@ -1027,110 +1027,110 @@ var _e = (e) => {
|
|
|
1027
1027
|
ot(n, !0);
|
|
1028
1028
|
} else it();
|
|
1029
1029
|
}, it = () => {
|
|
1030
|
-
|
|
1030
|
+
Y.forEach((e) => {
|
|
1031
1031
|
e[F.isCollapsed] = !1;
|
|
1032
|
-
}),
|
|
1033
|
-
}, { defaultTreeConfig:
|
|
1032
|
+
}), Y.clear(), b(h.value), M(), H();
|
|
1033
|
+
}, { defaultTreeConfig: J, treeExpandMap: Y, handleTree: at, setTreeExpand: ot } = ve({
|
|
1034
1034
|
treeConfig: e.props.treeConfig,
|
|
1035
|
-
afterTreeExpand:
|
|
1035
|
+
afterTreeExpand: rt,
|
|
1036
1036
|
insertChild: S
|
|
1037
|
-
}), { handleExpand: st, setRowExpand:
|
|
1037
|
+
}), { handleExpand: st, setRowExpand: ct } = ye({
|
|
1038
1038
|
expandConfig: e.props.expandConfig,
|
|
1039
1039
|
afterRowExpand: (t, n) => {
|
|
1040
|
-
b(h.value),
|
|
1040
|
+
b(h.value), M(), H(), e.emits("toggleRowExpand", {
|
|
1041
1041
|
expanded: n,
|
|
1042
1042
|
rows: t
|
|
1043
1043
|
});
|
|
1044
1044
|
},
|
|
1045
1045
|
insertExpandRow: C
|
|
1046
|
-
}),
|
|
1047
|
-
m.value = [], b([]),
|
|
1048
|
-
},
|
|
1049
|
-
let n =
|
|
1046
|
+
}), lt = 0, ut = () => {
|
|
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) => {
|
|
1049
|
+
let n = lt;
|
|
1050
1050
|
for (let r of t) {
|
|
1051
|
-
r[F.id] = Math.random().toString(36).substring(2), r[F.index] = n, n++,
|
|
1052
|
-
let t = e.props.treeConfig?.childrenField ||
|
|
1053
|
-
e.props.treeConfig?.isOpenTree && r?.[t]?.length > 0 &&
|
|
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]);
|
|
1054
1054
|
}
|
|
1055
|
-
},
|
|
1056
|
-
|
|
1057
|
-
n >= 50 ||
|
|
1055
|
+
}, Q = (e, t, n = 0) => {
|
|
1056
|
+
z ? setTimeout(() => {
|
|
1057
|
+
n >= 50 || Q(e, t, n + 1);
|
|
1058
1058
|
}, 100) : u({
|
|
1059
1059
|
top: e,
|
|
1060
1060
|
left: t
|
|
1061
1061
|
});
|
|
1062
|
-
}, ut = async (e) => {
|
|
1063
|
-
let t = z, n = we;
|
|
1064
|
-
await dt(e), Z(t, n);
|
|
1065
1062
|
}, dt = async (e) => {
|
|
1063
|
+
let t = B, n = we;
|
|
1064
|
+
await ft(e), Q(t, n);
|
|
1065
|
+
}, ft = async (e) => {
|
|
1066
1066
|
try {
|
|
1067
|
-
u({ top: 0 }),
|
|
1067
|
+
u({ top: 0 }), ut();
|
|
1068
1068
|
let t = at(e || []);
|
|
1069
|
-
|
|
1069
|
+
Z(t || []), m.value = t || [], xe(m.value);
|
|
1070
1070
|
} catch (e) {
|
|
1071
1071
|
console.error(e);
|
|
1072
1072
|
}
|
|
1073
|
-
},
|
|
1073
|
+
}, pt = () => {
|
|
1074
1074
|
let e = _.filter((e) => !e[F.isExpandRow]);
|
|
1075
1075
|
return {
|
|
1076
1076
|
fullData: m.value,
|
|
1077
1077
|
visibleData: e
|
|
1078
1078
|
};
|
|
1079
|
-
}, { sortField:
|
|
1079
|
+
}, { sortField: $, sortOrder: mt, sort: ht, handleSort: gt } = L({
|
|
1080
1080
|
nowDataSource: h,
|
|
1081
1081
|
getVisibleData: H,
|
|
1082
1082
|
setNowDataSource: b,
|
|
1083
1083
|
treeConfig: e.props.treeConfig,
|
|
1084
|
-
defaultTreeConfig:
|
|
1084
|
+
defaultTreeConfig: J,
|
|
1085
1085
|
columns: t
|
|
1086
|
-
}), { filterPopupWidth:
|
|
1086
|
+
}), { filterPopupWidth: _t, filterPopupId: vt, inputFilterOptions: yt, numberFilterOptions: bt, filterFields: xt, getFilterFields: St, filterClick: Ct, setFilter: wt, clearFilter: Tt } = he({
|
|
1087
1087
|
columns: t,
|
|
1088
1088
|
baseDataSource: m,
|
|
1089
1089
|
setNowDataSource: b,
|
|
1090
1090
|
scrollTo: u,
|
|
1091
1091
|
refresh: l,
|
|
1092
1092
|
afterFilter: () => {
|
|
1093
|
-
|
|
1093
|
+
M(), gt(), Ye();
|
|
1094
1094
|
},
|
|
1095
1095
|
treeConfig: e.props.treeConfig,
|
|
1096
|
-
defaultTreeConfig:
|
|
1097
|
-
}),
|
|
1098
|
-
|
|
1099
|
-
},
|
|
1096
|
+
defaultTreeConfig: J
|
|
1097
|
+
}), Et = (e) => {
|
|
1098
|
+
R(), e.listFilter.selectedValue.length == e.listFilter.listOptions.length ? e.listFilter.selectedValue = [] : e.listFilter.selectedValue = e.listFilter.listOptions.map((e) => e.value);
|
|
1099
|
+
}, Dt = (i) => {
|
|
1100
1100
|
if (!r.value) {
|
|
1101
1101
|
setTimeout(() => {
|
|
1102
|
-
|
|
1102
|
+
Dt(i);
|
|
1103
1103
|
}, 100);
|
|
1104
1104
|
return;
|
|
1105
1105
|
}
|
|
1106
1106
|
let a = ee(i) || [];
|
|
1107
|
-
a.finalColumns.length == 0 || a.realColumns.length == 0 || (st(), Se = a.finalColumns.length,
|
|
1107
|
+
a.finalColumns.length == 0 || a.realColumns.length == 0 || (st(), Se = a.finalColumns.length, M(), t.value = a.finalColumns, n.value = a.realColumns, setTimeout(() => {
|
|
1108
1108
|
O();
|
|
1109
|
-
}, 0), A(e.props.footerProps),
|
|
1109
|
+
}, 0), A(e.props.footerProps), We(), G(), St(), l());
|
|
1110
1110
|
};
|
|
1111
1111
|
w(() => e.props.columns, (e) => {
|
|
1112
|
-
|
|
1112
|
+
Dt(e);
|
|
1113
1113
|
}, { immediate: !0 }), w(() => e.props.footerProps, (e) => {
|
|
1114
1114
|
A(e);
|
|
1115
1115
|
}), w(() => e.props.height, (e) => {
|
|
1116
|
-
a.value = e,
|
|
1116
|
+
a.value = e, Pe();
|
|
1117
1117
|
}, { immediate: !0 });
|
|
1118
|
-
let
|
|
1118
|
+
let Ot = () => {
|
|
1119
1119
|
r.value && (o.value = r.value.clientWidth);
|
|
1120
|
-
},
|
|
1120
|
+
}, kt = se(Ot, 100), At = () => {
|
|
1121
1121
|
if (!r.value) {
|
|
1122
1122
|
setTimeout(() => {
|
|
1123
|
-
|
|
1123
|
+
At();
|
|
1124
1124
|
}, 100);
|
|
1125
1125
|
return;
|
|
1126
1126
|
}
|
|
1127
|
-
window.addEventListener("resize",
|
|
1127
|
+
window.addEventListener("resize", kt), Ot();
|
|
1128
1128
|
};
|
|
1129
1129
|
return p(() => {
|
|
1130
|
-
|
|
1130
|
+
At();
|
|
1131
1131
|
}), d(() => {
|
|
1132
1132
|
u({
|
|
1133
|
-
top:
|
|
1133
|
+
top: B,
|
|
1134
1134
|
left: we
|
|
1135
1135
|
}), H();
|
|
1136
1136
|
}), f(() => {}), {
|
|
@@ -1139,16 +1139,16 @@ var _e = (e) => {
|
|
|
1139
1139
|
pretextTableRef: r,
|
|
1140
1140
|
tableRef: i,
|
|
1141
1141
|
isLoading: s,
|
|
1142
|
-
visibleData:
|
|
1143
|
-
visibleWidthStartColumnIndex:
|
|
1144
|
-
visibleWidthEndColumnIndex:
|
|
1145
|
-
gridTemplateColumns:
|
|
1146
|
-
blurAnyElement:
|
|
1142
|
+
visibleData: Oe,
|
|
1143
|
+
visibleWidthStartColumnIndex: je,
|
|
1144
|
+
visibleWidthEndColumnIndex: Me,
|
|
1145
|
+
gridTemplateColumns: Re,
|
|
1146
|
+
blurAnyElement: R,
|
|
1147
1147
|
columns: t,
|
|
1148
|
-
onScroll:
|
|
1149
|
-
onWheel:
|
|
1150
|
-
topEmptyHeight:
|
|
1151
|
-
scrollbarHeight:
|
|
1148
|
+
onScroll: Ee,
|
|
1149
|
+
onWheel: De,
|
|
1150
|
+
topEmptyHeight: Te,
|
|
1151
|
+
scrollbarHeight: j,
|
|
1152
1152
|
headerHeight: T,
|
|
1153
1153
|
headerStyles: E,
|
|
1154
1154
|
realColumns: n,
|
|
@@ -1158,57 +1158,58 @@ var _e = (e) => {
|
|
|
1158
1158
|
footerHeight: k,
|
|
1159
1159
|
footerColumns: te,
|
|
1160
1160
|
getFooterHeight: A,
|
|
1161
|
-
itemStyles:
|
|
1162
|
-
fixedLeftIndex:
|
|
1163
|
-
fixedRightIndex:
|
|
1164
|
-
fixedColumnsLeft:
|
|
1165
|
-
fixedColumnsRight:
|
|
1166
|
-
getGridStyles:
|
|
1161
|
+
itemStyles: ce,
|
|
1162
|
+
fixedLeftIndex: Le,
|
|
1163
|
+
fixedRightIndex: U,
|
|
1164
|
+
fixedColumnsLeft: Fe,
|
|
1165
|
+
fixedColumnsRight: Ie,
|
|
1166
|
+
getGridStyles: G,
|
|
1167
1167
|
divLineHeightOffset: 20,
|
|
1168
|
-
currentRow:
|
|
1168
|
+
currentRow: K,
|
|
1169
|
+
setCurrentRow: ze,
|
|
1169
1170
|
cellClick: Be,
|
|
1170
1171
|
headerClick: Ve,
|
|
1171
|
-
hoverRow:
|
|
1172
|
-
cellMousemove:
|
|
1173
|
-
headerChecked:
|
|
1174
|
-
headerCheckedIndeterminate:
|
|
1175
|
-
onHeaderChecked:
|
|
1176
|
-
onCellChecked:
|
|
1177
|
-
getCheckboxRecords:
|
|
1178
|
-
clearCheckboxRow:
|
|
1179
|
-
sortField:
|
|
1180
|
-
sortOrder:
|
|
1181
|
-
sort:
|
|
1182
|
-
filterPopupWidth:
|
|
1183
|
-
filterPopupId:
|
|
1184
|
-
inputFilterOptions:
|
|
1185
|
-
numberFilterOptions:
|
|
1186
|
-
filterFields:
|
|
1187
|
-
getFilterFields:
|
|
1188
|
-
filterClick:
|
|
1189
|
-
setFilter:
|
|
1190
|
-
clearFilter:
|
|
1191
|
-
setListFilterAll:
|
|
1192
|
-
isDragging:
|
|
1193
|
-
dragLineLeft:
|
|
1194
|
-
startResize:
|
|
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: $,
|
|
1181
|
+
sortOrder: mt,
|
|
1182
|
+
sort: ht,
|
|
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:
|
|
1197
|
+
setAllTreeExpand: q,
|
|
1197
1198
|
clearTreeExpand: it,
|
|
1198
|
-
defaultTreeConfig:
|
|
1199
|
-
setRowExpand:
|
|
1200
|
-
slotShowTimestamp:
|
|
1199
|
+
defaultTreeConfig: J,
|
|
1200
|
+
setRowExpand: ct,
|
|
1201
|
+
slotShowTimestamp: ke,
|
|
1201
1202
|
isRefresh: c,
|
|
1202
1203
|
realTableHeight: a,
|
|
1203
1204
|
realTableWidth: o,
|
|
1204
|
-
loadData:
|
|
1205
|
-
reloadData:
|
|
1206
|
-
getTableData:
|
|
1205
|
+
loadData: dt,
|
|
1206
|
+
reloadData: ft,
|
|
1207
|
+
getTableData: pt
|
|
1207
1208
|
};
|
|
1208
|
-
},
|
|
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 = {
|
|
1212
1213
|
key: 0,
|
|
1213
1214
|
style: {
|
|
1214
1215
|
display: "inline-flex",
|
|
@@ -1219,7 +1220,7 @@ var _e = (e) => {
|
|
|
1219
1220
|
padding: "0px",
|
|
1220
1221
|
width: "14px"
|
|
1221
1222
|
}
|
|
1222
|
-
},
|
|
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 _e = (e) => {
|
|
|
1230
1231
|
display: "flex",
|
|
1231
1232
|
"justify-content": "center",
|
|
1232
1233
|
"margin-top": "5px"
|
|
1233
|
-
} }, ke = { style: { margin: "0 0 4px" } },
|
|
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
|
-
} },
|
|
1240
|
+
} }, H = ["onMousedown"], je = ["onClick", "onMouseenter"], Me = {
|
|
1240
1241
|
key: 3,
|
|
1241
1242
|
style: { "margin-left": "6px" }
|
|
1242
|
-
}, Ne = {
|
|
1243
|
+
}, Ne = { style: {
|
|
1243
1244
|
display: "flex",
|
|
1244
1245
|
gap: "4px"
|
|
1245
|
-
} },
|
|
1246
|
+
} }, Pe = ["title"], Fe = {
|
|
1246
1247
|
key: 9,
|
|
1247
1248
|
style: {
|
|
1248
1249
|
width: "100%",
|
|
1249
1250
|
"text-align": "center"
|
|
1250
1251
|
}
|
|
1251
|
-
},
|
|
1252
|
+
}, Ie = ["title"], Le = { key: 1 }, U = /* @__PURE__ */ c({
|
|
1252
1253
|
inheritAttrs: !1,
|
|
1253
1254
|
name: "pretextTable",
|
|
1254
1255
|
props: {
|
|
@@ -1261,6 +1262,14 @@ var _e = (e) => {
|
|
|
1261
1262
|
type: Number,
|
|
1262
1263
|
default: 22
|
|
1263
1264
|
},
|
|
1265
|
+
cellStyle: {
|
|
1266
|
+
type: Object,
|
|
1267
|
+
default: () => ({})
|
|
1268
|
+
},
|
|
1269
|
+
heightOffset: {
|
|
1270
|
+
type: Number,
|
|
1271
|
+
default: 0
|
|
1272
|
+
},
|
|
1264
1273
|
loading: {
|
|
1265
1274
|
type: Boolean,
|
|
1266
1275
|
default: !1
|
|
@@ -1316,23 +1325,24 @@ var _e = (e) => {
|
|
|
1316
1325
|
"toggleRowExpand"
|
|
1317
1326
|
],
|
|
1318
1327
|
setup(c, { expose: d, emit: f }) {
|
|
1319
|
-
let p = c, { keyNames: m, pretextTableRef: g, nowDataSource: y, tableRef: x, isLoading: w, headerHeight:
|
|
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({
|
|
1320
1329
|
props: p,
|
|
1321
1330
|
emits: f
|
|
1322
1331
|
});
|
|
1323
1332
|
return d({
|
|
1324
|
-
loadData:
|
|
1325
|
-
reloadData:
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1333
|
+
loadData: ht,
|
|
1334
|
+
reloadData: gt,
|
|
1335
|
+
setCurrentRow: Be,
|
|
1336
|
+
getCheckboxRecords: Ye,
|
|
1337
|
+
clearCheckboxRow: Xe,
|
|
1338
|
+
updateFooter: ge,
|
|
1339
|
+
updateFooterCellLabel: _e,
|
|
1340
|
+
getFooterHeight: ye,
|
|
1341
|
+
getTableData: _t,
|
|
1342
|
+
setTreeExpand: ut,
|
|
1343
|
+
setAllTreeExpand: X,
|
|
1344
|
+
clearTreeExpand: Z,
|
|
1345
|
+
setRowExpand: dt
|
|
1336
1346
|
}), (c, d) => (h(), i("div", {
|
|
1337
1347
|
class: "cName-pretextTable",
|
|
1338
1348
|
style: { position: "relative" },
|
|
@@ -1374,60 +1384,60 @@ var _e = (e) => {
|
|
|
1374
1384
|
key: "header_" + (f?.field || "null") + "_" + m,
|
|
1375
1385
|
class: "pretextTable-grid-header",
|
|
1376
1386
|
style: u(f ? {
|
|
1377
|
-
fontWeight: S(
|
|
1378
|
-
fontSize: S(
|
|
1387
|
+
fontWeight: S(L).fontWeight,
|
|
1388
|
+
fontSize: S(L).fontSize,
|
|
1379
1389
|
gridRow: f?.style?.gridRow || "",
|
|
1380
1390
|
gridColumn: f?.style?.gridColumn || "",
|
|
1381
1391
|
zIndex: m == 0 ? 3 : f.fixed == "left" || f.fixed == "right" ? 2 : 1,
|
|
1382
|
-
left: f.fixed == "left" ? S(
|
|
1383
|
-
right: f.fixed == "right" ? S(
|
|
1392
|
+
left: f.fixed == "left" ? S(G)[m] : "",
|
|
1393
|
+
right: f.fixed == "right" ? S(K)[m] : "",
|
|
1384
1394
|
borderLeft: f.fixed == "right" ? "1px solid var(--pretextTable-border-color)" : "",
|
|
1385
|
-
boxShadow: f.fixed == "left" && m == S(W) ? "var(--pretextTable-shadow-color) 2px 0px 5px -1px" : f.fixed == "right" && m == S(
|
|
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" : "",
|
|
1386
1396
|
borderBottom: f ? "1px solid var(--pretextTable-border-color)" : "",
|
|
1387
1397
|
minHeight: "30px"
|
|
1388
1398
|
} : {}),
|
|
1389
|
-
onClick: (e) => S(
|
|
1390
|
-
}, [f ? f.type == "checkbox" && p == 0 ? (h(), i("span",
|
|
1391
|
-
modelValue: S(
|
|
1392
|
-
indeterminate: S(
|
|
1399
|
+
onClick: (e) => S(He)(f)
|
|
1400
|
+
}, [f ? f.type == "checkbox" && p == 0 ? (h(), i("span", Se, [s(S(k), {
|
|
1401
|
+
modelValue: S(Ge)[f.field],
|
|
1402
|
+
indeterminate: S(Ke)[f.field],
|
|
1393
1403
|
content: "",
|
|
1394
|
-
onChange: (e) => S(
|
|
1404
|
+
onChange: (e) => S(qe)(f.field)
|
|
1395
1405
|
}, null, 8, [
|
|
1396
1406
|
"modelValue",
|
|
1397
1407
|
"indeterminate",
|
|
1398
1408
|
"onChange"
|
|
1399
|
-
])])) : f?.type == "seq" && p == 0 ? (h(), i("div",
|
|
1409
|
+
])])) : f?.type == "seq" && p == 0 ? (h(), i("div", Ce, b(f.title || "序号"), 1)) : (h(), i("span", B, [
|
|
1400
1410
|
a("span", null, [f.slots?.header ? v(c.$slots, f.slots?.header, {
|
|
1401
1411
|
key: 0,
|
|
1402
1412
|
column: f,
|
|
1403
1413
|
text: f.title
|
|
1404
1414
|
}, () => [o(b(f.title), 1)]) : (h(), i(e, { key: 1 }, [o(b(f.title), 1)], 64))]),
|
|
1405
|
-
f.sortable && !f.children?.length ? (h(), i("span",
|
|
1415
|
+
f.sortable && !f.children?.length ? (h(), i("span", we, [s(S(A), {
|
|
1406
1416
|
name: "caret-up",
|
|
1407
1417
|
style: {
|
|
1408
1418
|
position: "absolute",
|
|
1409
1419
|
top: "-0.8em"
|
|
1410
1420
|
},
|
|
1411
|
-
class: l(["pretextTable-sort-icon", { "pretextTable-sort-icon-active": S(
|
|
1412
|
-
onClick: D((e) => S(
|
|
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"])
|
|
1413
1423
|
}, null, 8, ["class", "onClick"]), s(S(A), {
|
|
1414
1424
|
name: "caret-down",
|
|
1415
1425
|
style: {
|
|
1416
1426
|
position: "absolute",
|
|
1417
1427
|
top: "-0.2em"
|
|
1418
1428
|
},
|
|
1419
|
-
class: l(["pretextTable-sort-icon", { "pretextTable-sort-icon-active": S(
|
|
1420
|
-
onClick: D((e) => S(
|
|
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"])
|
|
1421
1431
|
}, null, 8, ["class", "onClick"])])) : r("", !0),
|
|
1422
|
-
S(q)[m]?.type && !f.children?.length ? (h(), i("span",
|
|
1432
|
+
S(q)[m]?.type && !f.children?.length ? (h(), i("span", Te, [s(S(A), {
|
|
1423
1433
|
name: "funnel",
|
|
1424
1434
|
class: l(["pretextTable-filter-icon", { "pretextTable-filter-icon-active": S(q)[m].isActive }]),
|
|
1425
|
-
onClick: D((e) => S(
|
|
1435
|
+
onClick: D((e) => S(J)(m, e), ["stop"])
|
|
1426
1436
|
}, null, 8, ["class", "onClick"]), S(q)[m].isShow ? (h(), n(t, {
|
|
1427
1437
|
key: 0,
|
|
1428
1438
|
to: "body"
|
|
1429
1439
|
}, [a("div", {
|
|
1430
|
-
id: S(
|
|
1440
|
+
id: S(tt) + f.field,
|
|
1431
1441
|
class: "pretextTable-filter-popup",
|
|
1432
1442
|
style: u([{
|
|
1433
1443
|
"background-color": "#fff",
|
|
@@ -1444,22 +1454,22 @@ var _e = (e) => {
|
|
|
1444
1454
|
a("div", Ee, b(f.title), 1),
|
|
1445
1455
|
S(q)[m].type == "inputFilter" ? (h(), i("div", {
|
|
1446
1456
|
key: 0,
|
|
1447
|
-
style: u({ width: S(
|
|
1457
|
+
style: u({ width: S(et) + "px" })
|
|
1448
1458
|
}, [a("div", null, [s(S(ne), {
|
|
1449
1459
|
modelValue: S(q)[m].value,
|
|
1450
1460
|
"onUpdate:modelValue": (e) => S(q)[m].value = e,
|
|
1451
1461
|
placeholder: "按回车筛选",
|
|
1452
1462
|
trim: !0,
|
|
1453
1463
|
style: { width: "100%" },
|
|
1454
|
-
onKeyup: ee((e) => S(
|
|
1464
|
+
onKeyup: ee((e) => S(Y)(f.field), ["enter"])
|
|
1455
1465
|
}, null, 8, [
|
|
1456
1466
|
"modelValue",
|
|
1457
1467
|
"onUpdate:modelValue",
|
|
1458
1468
|
"onKeyup"
|
|
1459
|
-
])]), a("div", De, [s(S(
|
|
1469
|
+
])]), a("div", De, [s(S(ie), {
|
|
1460
1470
|
modelValue: S(q)[m].inputFilter.type,
|
|
1461
1471
|
"onUpdate:modelValue": (e) => S(q)[m].inputFilter.type = e,
|
|
1462
|
-
options: S(
|
|
1472
|
+
options: S(nt)
|
|
1463
1473
|
}, null, 8, [
|
|
1464
1474
|
"modelValue",
|
|
1465
1475
|
"onUpdate:modelValue",
|
|
@@ -1467,22 +1477,22 @@ var _e = (e) => {
|
|
|
1467
1477
|
])])], 4)) : r("", !0),
|
|
1468
1478
|
S(q)[m].type == "numberFilter" || S(q)[m].type == "numberFilter%" ? (h(), i("div", {
|
|
1469
1479
|
key: 1,
|
|
1470
|
-
style: u({ width: S(
|
|
1471
|
-
}, [a("div", Oe, [s(S(
|
|
1480
|
+
style: u({ width: S(et) + "px" })
|
|
1481
|
+
}, [a("div", Oe, [s(S(ie), {
|
|
1472
1482
|
modelValue: S(q)[m].numberFilter.type,
|
|
1473
1483
|
"onUpdate:modelValue": (e) => S(q)[m].numberFilter.type = e,
|
|
1474
|
-
options: S(
|
|
1484
|
+
options: S(rt)
|
|
1475
1485
|
}, null, 8, [
|
|
1476
1486
|
"modelValue",
|
|
1477
1487
|
"onUpdate:modelValue",
|
|
1478
1488
|
"options"
|
|
1479
|
-
])]), a("div", null, [s(S(
|
|
1489
|
+
])]), a("div", null, [s(S(j), {
|
|
1480
1490
|
modelValue: S(q)[m].value,
|
|
1481
1491
|
"onUpdate:modelValue": (e) => S(q)[m].value = e,
|
|
1482
1492
|
placeholder: "按回车筛选",
|
|
1483
1493
|
controlConfig: { showButton: !1 },
|
|
1484
1494
|
style: { width: "100%" },
|
|
1485
|
-
onKeyup: ee((e) => S(
|
|
1495
|
+
onKeyup: ee((e) => S(Y)(f.field), ["enter"])
|
|
1486
1496
|
}, {
|
|
1487
1497
|
suffix: T(() => [...d[3] ||= [o("%", -1)]]),
|
|
1488
1498
|
_: 1
|
|
@@ -1493,12 +1503,12 @@ var _e = (e) => {
|
|
|
1493
1503
|
])])], 4)) : r("", !0),
|
|
1494
1504
|
S(q)[m].type == "listFilter" ? (h(), i("div", {
|
|
1495
1505
|
key: 2,
|
|
1496
|
-
style: u({ maxWidth: S(
|
|
1506
|
+
style: u({ maxWidth: S(et) + "px" })
|
|
1497
1507
|
}, [a("div", ke, [s(S(k), {
|
|
1498
1508
|
modelValue: S(q)[m].listFilter.selectedValue.length == S(q)[m].listFilter.listOptions.length,
|
|
1499
1509
|
indeterminate: S(q)[m].listFilter.selectedValue.length > 0 && S(q)[m].listFilter.selectedValue.length < S(q)[m].listFilter.listOptions.length,
|
|
1500
1510
|
content: "全部",
|
|
1501
|
-
onChange: (e) => S(
|
|
1511
|
+
onChange: (e) => S(ot)(S(q)[m])
|
|
1502
1512
|
}, null, 8, [
|
|
1503
1513
|
"modelValue",
|
|
1504
1514
|
"indeterminate",
|
|
@@ -1514,12 +1524,12 @@ var _e = (e) => {
|
|
|
1514
1524
|
"options",
|
|
1515
1525
|
"onChange"
|
|
1516
1526
|
])], 4)) : r("", !0),
|
|
1517
|
-
a("div",
|
|
1527
|
+
a("div", Ae, [
|
|
1518
1528
|
s(S(O), {
|
|
1519
1529
|
type: "primary",
|
|
1520
1530
|
size: "small",
|
|
1521
1531
|
mode: "text",
|
|
1522
|
-
onClick: (e) => S(
|
|
1532
|
+
onClick: (e) => S(Y)(f.field)
|
|
1523
1533
|
}, {
|
|
1524
1534
|
default: T(() => [...d[4] ||= [o(" 筛选 ", -1)]]),
|
|
1525
1535
|
_: 1
|
|
@@ -1528,7 +1538,7 @@ var _e = (e) => {
|
|
|
1528
1538
|
type: "primary",
|
|
1529
1539
|
size: "small",
|
|
1530
1540
|
mode: "text",
|
|
1531
|
-
onClick: (e) => S(
|
|
1541
|
+
onClick: (e) => S(at)(f.field)
|
|
1532
1542
|
}, {
|
|
1533
1543
|
default: T(() => [...d[5] ||= [o(" 重置 ", -1)]]),
|
|
1534
1544
|
_: 1
|
|
@@ -1537,14 +1547,14 @@ var _e = (e) => {
|
|
|
1537
1547
|
type: "primary",
|
|
1538
1548
|
size: "small",
|
|
1539
1549
|
mode: "text",
|
|
1540
|
-
onClick: d[0] ||= (e) => S(
|
|
1550
|
+
onClick: d[0] ||= (e) => S(at)()
|
|
1541
1551
|
}, {
|
|
1542
1552
|
default: T(() => [...d[6] ||= [o(" 重置所有 ", -1)]]),
|
|
1543
1553
|
_: 1
|
|
1544
1554
|
})
|
|
1545
1555
|
])
|
|
1546
|
-
], 12,
|
|
1547
|
-
])) : (h(), i("span",
|
|
1556
|
+
], 12, V)])) : r("", !0)])) : r("", !0)
|
|
1557
|
+
])) : (h(), i("span", xe)), f?.resizable && !f.children?.length ? (h(), i("div", {
|
|
1548
1558
|
key: 4,
|
|
1549
1559
|
style: {
|
|
1550
1560
|
position: "absolute",
|
|
@@ -1554,16 +1564,16 @@ var _e = (e) => {
|
|
|
1554
1564
|
height: "100%",
|
|
1555
1565
|
cursor: "col-resize"
|
|
1556
1566
|
},
|
|
1557
|
-
onMousedown: D((e) => S(
|
|
1558
|
-
}, null, 40,
|
|
1559
|
-
S(
|
|
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", {
|
|
1560
1570
|
key: 0,
|
|
1561
1571
|
style: u([{
|
|
1562
1572
|
display: "flex",
|
|
1563
1573
|
"align-items": "center",
|
|
1564
1574
|
position: "absolute",
|
|
1565
1575
|
left: "calc(50% - 35px)"
|
|
1566
|
-
}, { minHeight: `${S($) - S(
|
|
1576
|
+
}, { minHeight: `${S($) - S(M) - S(ve) - 30}px` }])
|
|
1567
1577
|
}, " 暂无数据 ", 4)) : r("", !0),
|
|
1568
1578
|
a("div", {
|
|
1569
1579
|
class: "pretextTable-grid",
|
|
@@ -1574,13 +1584,13 @@ var _e = (e) => {
|
|
|
1574
1584
|
contain: "layout paint style",
|
|
1575
1585
|
position: "relative"
|
|
1576
1586
|
}, {
|
|
1577
|
-
minHeight:
|
|
1587
|
+
minHeight: S($) - S(M) - S(ve) - S(he) - p.heightOffset + "px",
|
|
1578
1588
|
height: `${S(me)}px`
|
|
1579
1589
|
}])
|
|
1580
1590
|
}, [a("div", {
|
|
1581
1591
|
class: "pretextTable-grid-empty",
|
|
1582
|
-
style: u({ height: `${S(
|
|
1583
|
-
}, null, 4), (h(!0), i(e, null, _(S(
|
|
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", {
|
|
1584
1594
|
key: 0,
|
|
1585
1595
|
class: "pretextTable-grid-item",
|
|
1586
1596
|
style: u([{
|
|
@@ -1590,7 +1600,7 @@ var _e = (e) => {
|
|
|
1590
1600
|
}, [a("div", { style: u({
|
|
1591
1601
|
position: "sticky",
|
|
1592
1602
|
left: p.expandConfig?.mode == "inside" ? "0px" : void 0,
|
|
1593
|
-
width: p.expandConfig?.mode == "inside" ? `${S(
|
|
1603
|
+
width: p.expandConfig?.mode == "inside" ? `${S(mt) - 15}px` : "100%"
|
|
1594
1604
|
}) }, [v(c.$slots, p.expandConfig?.slotName, {
|
|
1595
1605
|
row: t,
|
|
1596
1606
|
rowIndex: d
|
|
@@ -1603,11 +1613,11 @@ var _e = (e) => {
|
|
|
1603
1613
|
"align-content": "start",
|
|
1604
1614
|
contain: "layout style paint"
|
|
1605
1615
|
}, { gridTemplateColumns: S(F) }])
|
|
1606
|
-
}, [(h(!0), i(e, null, _(S(
|
|
1616
|
+
}, [(h(!0), i(e, null, _(S(ue), (f, g) => (h(), i("div", {
|
|
1607
1617
|
key: "item_" + f.field,
|
|
1608
1618
|
class: l(["pretextTable-grid-item pretextTable-flex-align-items-center", {
|
|
1609
|
-
"pretextTable-grid-item-hover": p.rowConfig?.isHover && S(
|
|
1610
|
-
"pretextTable-grid-item-current": p.rowConfig?.isCurrent && S(
|
|
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],
|
|
1611
1621
|
"pretextTable-grid-item-stripe": p.stripe && t[S(m).stripe]
|
|
1612
1622
|
}]),
|
|
1613
1623
|
style: u({
|
|
@@ -1615,16 +1625,19 @@ var _e = (e) => {
|
|
|
1615
1625
|
fontSize: S(U).fontSize,
|
|
1616
1626
|
zIndex: +(f.fixed == "left" || f.fixed == "right"),
|
|
1617
1627
|
position: f.fixed == "left" || f.fixed == "right" ? "sticky" : "static",
|
|
1618
|
-
left: f.fixed == "left" ? S(
|
|
1619
|
-
right: f.fixed == "right" ? S(
|
|
1628
|
+
left: f.fixed == "left" ? S(G)[g] : "",
|
|
1629
|
+
right: f.fixed == "right" ? S(K)[g] : "",
|
|
1620
1630
|
borderLeft: f.fixed == "right" ? "1px solid var(--pretextTable-border-color)" : "",
|
|
1621
|
-
boxShadow: f.fixed == "left" && g == S(W) ? "var(--pretextTable-shadow-color) 2px 0px 5px -1px" : f.fixed == "right" && g == S(
|
|
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" : "",
|
|
1622
1632
|
height: `${t[S(m).height]}px`,
|
|
1623
1633
|
justifyContent: f.type == "checkbox" ? "center" : ""
|
|
1624
1634
|
}),
|
|
1625
|
-
onClick: (e) => S(
|
|
1626
|
-
onMouseenter: (e) => S(
|
|
1627
|
-
}, [f.fixed == "left" || f.fixed == "right" || g >= S(
|
|
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 }, [
|
|
1628
1641
|
E(s(S(A), {
|
|
1629
1642
|
name: "spinner",
|
|
1630
1643
|
roll: ""
|
|
@@ -1633,37 +1646,46 @@ var _e = (e) => {
|
|
|
1633
1646
|
name: "caret-right",
|
|
1634
1647
|
style: {},
|
|
1635
1648
|
class: "pretextTable-icon",
|
|
1636
|
-
onClick: D((e) => S(
|
|
1649
|
+
onClick: D((e) => S(ut)([t], !0), ["stop"])
|
|
1637
1650
|
}, null, 8, ["onClick"]), [[C, !t[S(m).isCollapsed] && !t[S(m).lazyLoading]]]),
|
|
1638
1651
|
E(s(S(A), {
|
|
1639
1652
|
name: "caret-down",
|
|
1640
1653
|
style: {},
|
|
1641
1654
|
class: "pretextTable-icon",
|
|
1642
|
-
onClick: D((e) => S(
|
|
1655
|
+
onClick: D((e) => S(ut)([t], !1), ["stop"])
|
|
1643
1656
|
}, null, 8, ["onClick"]), [[C, t[S(m).isCollapsed] && !t[S(m).lazyLoading]]])
|
|
1644
1657
|
], 64)) : r("", !0)], 64))], 64)) : r("", !0), f.type == "checkbox" ? (h(), n(S(k), {
|
|
1645
1658
|
key: 1,
|
|
1646
1659
|
modelValue: t[f.field],
|
|
1647
1660
|
indeterminate: t[S(m).checkedIndeterminate + f.field],
|
|
1648
|
-
onChange: (e) => S(
|
|
1661
|
+
onChange: (e) => S(Je)(t, f.field)
|
|
1649
1662
|
}, null, 8, [
|
|
1650
1663
|
"modelValue",
|
|
1651
1664
|
"indeterminate",
|
|
1652
1665
|
"onChange"
|
|
1653
1666
|
])) : f.type == "seq" ? (h(), i(e, { key: 2 }, [p.treeConfig?.isOpenTree ? (h(), i("span", {
|
|
1654
1667
|
key: 0,
|
|
1655
|
-
style: u({
|
|
1668
|
+
style: u({
|
|
1669
|
+
marginLeft: `${(Number(t[S(m).level]) - 1) * (p.treeConfig?.indent || 20)}px`,
|
|
1670
|
+
paddingLeft: S(U).paddingLeft
|
|
1671
|
+
})
|
|
1656
1672
|
}, null, 4)) : r("", !0), o(" " + b(t.pretextSeq), 1)], 64)) : f.type == "expand" ? (h(), i("span", Me, [E(s(S(A), {
|
|
1657
1673
|
name: "arrow-right",
|
|
1658
1674
|
style: {},
|
|
1659
1675
|
class: "pretextTable-icon",
|
|
1660
|
-
onClick: D((e) => S(
|
|
1676
|
+
onClick: D((e) => S(dt)([t], !0), ["stop"])
|
|
1661
1677
|
}, null, 8, ["onClick"]), [[C, !t[S(m).isRowExpanded]]]), E(s(S(A), {
|
|
1662
1678
|
name: "arrow-down",
|
|
1663
1679
|
style: {},
|
|
1664
1680
|
class: "pretextTable-icon",
|
|
1665
|
-
onClick: D((e) => S(
|
|
1666
|
-
}, null, 8, ["onClick"]), [[C, t[S(m).isRowExpanded]]])])) : f.slots?.defaultType == "a" ? (h(), i("
|
|
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), {
|
|
1667
1689
|
key: 0,
|
|
1668
1690
|
size: "mini",
|
|
1669
1691
|
border: !0,
|
|
@@ -1677,11 +1699,16 @@ var _e = (e) => {
|
|
|
1677
1699
|
"status",
|
|
1678
1700
|
"color",
|
|
1679
1701
|
"style"
|
|
1680
|
-
])) : r("", !0)], 64))), 256))])) : f.slots?.defaultType == "icon" ?
|
|
1702
|
+
])) : r("", !0)], 64))), 256))], 4)) : f.slots?.defaultType == "icon" ? (h(), i("span", {
|
|
1681
1703
|
key: 6,
|
|
1704
|
+
style: u({ paddingLeft: S(U).paddingLeft })
|
|
1705
|
+
}, [E(s(S(A), {
|
|
1682
1706
|
name: f.slots?.defaultProps?.icon?.name,
|
|
1683
1707
|
style: u(f.slots?.defaultProps?.icon?.style || {})
|
|
1684
|
-
}, null, 8, ["name", "style"])
|
|
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", {
|
|
1685
1712
|
key: 0,
|
|
1686
1713
|
title: n.tip || ""
|
|
1687
1714
|
}, [s(S(O), {
|
|
@@ -1703,14 +1730,17 @@ var _e = (e) => {
|
|
|
1703
1730
|
"disabled",
|
|
1704
1731
|
"loading",
|
|
1705
1732
|
"onClick"
|
|
1706
|
-
])], 8,
|
|
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), {
|
|
1707
1737
|
key: 0,
|
|
1708
1738
|
size: "mini",
|
|
1709
1739
|
modelValue: t[f.field],
|
|
1710
|
-
openLabel: f.slots?.defaultProps?.switch?.openLabel
|
|
1711
|
-
closeLabel: f.slots?.defaultProps?.switch?.closeLabel
|
|
1712
|
-
openValue: f.slots?.defaultProps?.switch?.openValue
|
|
1713
|
-
closeValue: f.slots?.defaultProps?.switch?.closeValue
|
|
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,
|
|
1714
1744
|
disabled: f.slots?.defaultProps?.switch?.disabledField && t[f.slots?.defaultProps?.switch?.disabledField],
|
|
1715
1745
|
loading: f.slots?.defaultProps?.switch?.loadingField && t[f.slots?.defaultProps?.switch?.loadingField],
|
|
1716
1746
|
onChange: (e) => f.slots?.defaultProps?.switch?.onChange?.(t, g)
|
|
@@ -1723,7 +1753,7 @@ var _e = (e) => {
|
|
|
1723
1753
|
"disabled",
|
|
1724
1754
|
"loading",
|
|
1725
1755
|
"onChange"
|
|
1726
|
-
])) : r("", !0)],
|
|
1756
|
+
])) : r("", !0)], 4)) : f.slots?.defaultType == "checkbox" ? (h(), i("span", Fe, [s(S(k), {
|
|
1727
1757
|
modelValue: t[f.field],
|
|
1728
1758
|
indeterminate: f.slots?.defaultProps?.checkbox?.checkedIndeterminateField ? t[f.slots?.defaultProps?.checkbox?.checkedIndeterminateField] : !1,
|
|
1729
1759
|
disabled: f.slots?.defaultProps?.checkbox?.disabledField && t[f.slots?.defaultProps?.checkbox?.disabledField],
|
|
@@ -1736,14 +1766,15 @@ var _e = (e) => {
|
|
|
1736
1766
|
])])) : (h(), i("span", {
|
|
1737
1767
|
key: 10,
|
|
1738
1768
|
class: l({ "pretextTable-text-ellipsis": !!p.showOverflow }),
|
|
1769
|
+
style: u({ paddingLeft: S(U).paddingLeft }),
|
|
1739
1770
|
title: p.showOverflow && t[f.field] || ""
|
|
1740
|
-
}, [f.slots?.default ? (h(), i(e, { key: 0 }, [!p.lazyLoadSlot || t.slotShowTimestamp == S(
|
|
1771
|
+
}, [f.slots?.default ? (h(), i(e, { key: 0 }, [!p.lazyLoadSlot || t.slotShowTimestamp == S(ft) ? v(c.$slots, f.slots?.default, {
|
|
1741
1772
|
key: 0,
|
|
1742
1773
|
row: t,
|
|
1743
1774
|
column: f,
|
|
1744
1775
|
rowIndex: d
|
|
1745
|
-
}, () => [o(b(t[f.field] ?? ""), 1)]) : r("", !0)], 64)) : (h(), i(e, { key: 1 }, [o(b(t[f.field] ?? ""), 1)], 64))],
|
|
1746
|
-
p.showFooter && S(
|
|
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),
|
|
1777
|
+
p.showFooter && S(R).length > 0 ? (h(), i("div", {
|
|
1747
1778
|
key: 1,
|
|
1748
1779
|
style: u([{
|
|
1749
1780
|
display: "grid",
|
|
@@ -1755,16 +1786,16 @@ var _e = (e) => {
|
|
|
1755
1786
|
bottom: "0",
|
|
1756
1787
|
"z-index": "1"
|
|
1757
1788
|
}, { gridTemplateColumns: S(F) }])
|
|
1758
|
-
}, [(h(!0), i(e, null, _(S(
|
|
1789
|
+
}, [(h(!0), i(e, null, _(S(R), (t) => (h(), i(e, null, [(h(!0), i(e, null, _(t, (e, t) => (h(), i("div", {
|
|
1759
1790
|
key: "footer_" + e.field,
|
|
1760
1791
|
class: "pretextTable-grid-footer",
|
|
1761
1792
|
style: u({
|
|
1762
|
-
fontSize: S(
|
|
1793
|
+
fontSize: S(L).fontSize,
|
|
1763
1794
|
zIndex: t == 0 ? 3 : e.fixed == "left" || e.fixed == "right" ? 2 : 1,
|
|
1764
|
-
left: e.fixed == "left" ? S(
|
|
1765
|
-
right: e.fixed == "right" ? S(
|
|
1795
|
+
left: e.fixed == "left" ? S(G)[t] : "",
|
|
1796
|
+
right: e.fixed == "right" ? S(K)[t] : "",
|
|
1766
1797
|
borderLeft: e.fixed == "right" ? "1px solid var(--pretextTable-border-color)" : "",
|
|
1767
|
-
boxShadow: e.fixed == "left" && t == S(W) ? "var(--pretextTable-shadow-color) 2px 0px 5px -1px" : e.fixed == "right" && t == S(
|
|
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" : "",
|
|
1768
1799
|
height: `${e.height}px`,
|
|
1769
1800
|
maxHeight: `${e.height}px`
|
|
1770
1801
|
})
|
|
@@ -1773,7 +1804,7 @@ var _e = (e) => {
|
|
|
1773
1804
|
footerColumn: e,
|
|
1774
1805
|
footerData: e.data,
|
|
1775
1806
|
footerRowIndex: t
|
|
1776
|
-
}, () => [o(b(e.data ?? ""), 1)]) : (h(), i("span",
|
|
1807
|
+
}, () => [o(b(e.data ?? ""), 1)]) : (h(), i("span", Le, b(e.data ?? ""), 1))], 4))), 128))], 64))), 256))], 4)) : r("", !0)
|
|
1777
1808
|
], 36),
|
|
1778
1809
|
E(a("div", { style: u([{
|
|
1779
1810
|
position: "absolute",
|
|
@@ -1784,10 +1815,10 @@ var _e = (e) => {
|
|
|
1784
1815
|
"z-index": "99999",
|
|
1785
1816
|
"box-shadow": "0 0 2px rgba(64, 158, 255, 0.5)"
|
|
1786
1817
|
}, {
|
|
1787
|
-
transform: `translateX(${S(
|
|
1818
|
+
transform: `translateX(${S(ct)}px)`,
|
|
1788
1819
|
height: S($) + "px"
|
|
1789
|
-
}]) }, null, 4), [[C, S(
|
|
1790
|
-
a("div", { style: u({ backgroundColor: S(
|
|
1820
|
+
}]) }, null, 4), [[C, S(st)]]),
|
|
1821
|
+
a("div", { style: u({ backgroundColor: S(pt) ? "red" : "" }) }, null, 4)
|
|
1791
1822
|
], 512));
|
|
1792
1823
|
}
|
|
1793
1824
|
}), W = U;
|