holyes-table 1.0.11 → 1.0.13
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/README.md +24 -2
- package/dist/index.mjs +304 -283
- package/dist/lib/pretextTable/hook/useCheckbox.d.ts +1 -1
- package/dist/lib/pretextTable/pretextTable.vue.d.ts +1 -1
- package/dist/lib/pretextTable/type.d.ts +8 -2
- package/dist/lib/pretextTable/useHolyesTable.d.ts +1 -1
- package/package.json +3 -2
- package//346/233/264/346/226/260/346/227/245/345/277/227.md +37 -0
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
|
|
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
3
|
import j, { debounce as ce, isNaN as M, orderBy as le, toArrayTree as ue } from "xe-utils";
|
|
4
4
|
//#region lib/pretextTable/worker/pretextTableGetItemHeight.ts?worker&inline
|
|
5
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" });
|
|
@@ -124,36 +124,36 @@ var pe = (e) => {
|
|
|
124
124
|
//#endregion
|
|
125
125
|
//#region lib/pretextTable/hook/useCheckbox.ts
|
|
126
126
|
function me(e) {
|
|
127
|
-
let { columns: t, blurAnyElement: n, nowDataSource: r, baseDataSource: i, emits: a, treeConfig: o } = e, s = o?.isOpenTree ?? I.isOpenTree, c = F.filterChildren, l = o?.childrenField ?? I.childrenField, u = o?.checkStrictly ?? I.checkStrictly, d =
|
|
128
|
-
|
|
129
|
-
for (let e of t.value) e.type == "checkbox" &&
|
|
130
|
-
return
|
|
131
|
-
},
|
|
127
|
+
let { columns: t, blurAnyElement: n, nowDataSource: r, baseDataSource: i, emits: a, treeConfig: o } = e, s = o?.isOpenTree ?? I.isOpenTree, c = F.filterChildren, l = o?.childrenField ?? I.childrenField, u = o?.checkStrictly ?? I.checkStrictly, d = [], f = () => {
|
|
128
|
+
d = [];
|
|
129
|
+
for (let e of t.value) e.type == "checkbox" && d.push(e.field);
|
|
130
|
+
return d;
|
|
131
|
+
}, p = g({}), m = g({}), h = (e) => {
|
|
132
132
|
switch (n(), !0) {
|
|
133
|
-
case
|
|
134
|
-
case !
|
|
135
|
-
|
|
133
|
+
case m.value[e] == 1:
|
|
134
|
+
case !p.value[e]:
|
|
135
|
+
p.value[e] = !0, m.value[e] = !1, u ? y(r.value, !0, e) : b(r.value, !0, e);
|
|
136
136
|
break;
|
|
137
137
|
default:
|
|
138
|
-
|
|
138
|
+
p.value[e] = !1, m.value[e] = !1, u ? y(r.value, !1, e) : b(r.value, !1, e);
|
|
139
139
|
break;
|
|
140
140
|
}
|
|
141
141
|
a("checkboxAll");
|
|
142
|
-
},
|
|
142
|
+
}, _ = (e) => {
|
|
143
143
|
let t = {}, n = [];
|
|
144
|
-
if (e ? n.push(e) : n =
|
|
144
|
+
if (e ? n.push(e) : n = f(), u) {
|
|
145
145
|
for (let e of r.value) for (let r of n) e[F.checkedIndeterminate + r] && (t[r + "indeterminateCount"] = (t[r + "indeterminateCount"] || 0) + 1), e[r] && (t[r + "checkedCount"] = (t[r + "checkedCount"] || 0) + 1);
|
|
146
146
|
for (let e of n) {
|
|
147
147
|
let n = t[e + "checkedCount"] || 0, i = t[e + "indeterminateCount"] || 0;
|
|
148
148
|
switch (!0) {
|
|
149
149
|
case n == 0 && i == 0:
|
|
150
|
-
|
|
150
|
+
m.value[e] = !1, p.value[e] = !1;
|
|
151
151
|
break;
|
|
152
152
|
case n == r.value.length && i == 0:
|
|
153
|
-
|
|
153
|
+
m.value[e] = !1, p.value[e] = !0;
|
|
154
154
|
break;
|
|
155
155
|
default:
|
|
156
|
-
|
|
156
|
+
m.value[e] = !0, p.value[e] = !1;
|
|
157
157
|
break;
|
|
158
158
|
}
|
|
159
159
|
}
|
|
@@ -167,20 +167,20 @@ function me(e) {
|
|
|
167
167
|
let n = t[e + "checkedCount"] || 0, r = t[e + "allCount"] || 0;
|
|
168
168
|
switch (!0) {
|
|
169
169
|
case n == 0:
|
|
170
|
-
|
|
170
|
+
m.value[e] = !1, p.value[e] = !1;
|
|
171
171
|
break;
|
|
172
172
|
case n == r:
|
|
173
|
-
|
|
173
|
+
m.value[e] = !1, p.value[e] = !0;
|
|
174
174
|
break;
|
|
175
175
|
default:
|
|
176
|
-
|
|
176
|
+
m.value[e] = !0, p.value[e] = !1;
|
|
177
177
|
break;
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
},
|
|
181
|
+
}, v = (e, t) => {
|
|
182
182
|
if (!s || !u) return;
|
|
183
|
-
let n = t ??
|
|
183
|
+
let n = t ?? d[0];
|
|
184
184
|
if (!e) return;
|
|
185
185
|
let r = e?.[F.parentRow], i = [];
|
|
186
186
|
e?.[c]?.length ? i = e[c] : e?.[l]?.length && (i = e[l]);
|
|
@@ -199,20 +199,20 @@ function me(e) {
|
|
|
199
199
|
break;
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
|
|
202
|
+
v(r, n);
|
|
203
|
+
}, y = (e, t, n) => {
|
|
204
|
+
let r = n ?? d[0];
|
|
205
|
+
for (let n of e) n[r] = t, n[F.checkedIndeterminate + r] = !1, s && u && (n[c]?.length ? y(n[c], t, r) : n[l]?.length && y(n[l], t, r));
|
|
203
206
|
}, b = (e, t, n) => {
|
|
204
|
-
let r = n ??
|
|
205
|
-
for (let n of e) n[r] = t, n[F.checkedIndeterminate + r] = !1, s &&
|
|
206
|
-
}, x = (e, t, n) => {
|
|
207
|
-
let r = n ?? f[0];
|
|
208
|
-
for (let n of e) n[r] = t, n[F.checkedIndeterminate + r] = !1, s && (n[c]?.length ? x(n[c], t, r) : n[l]?.length && x(n[l], t, r));
|
|
207
|
+
let r = n ?? d[0];
|
|
208
|
+
for (let n of e) n[r] = t, n[F.checkedIndeterminate + r] = !1, s && (n[c]?.length ? b(n[c], t, r) : n[l]?.length && b(n[l], t, r));
|
|
209
209
|
};
|
|
210
210
|
return {
|
|
211
|
-
getCheckField:
|
|
212
|
-
headerChecked:
|
|
213
|
-
headerCheckedIndeterminate:
|
|
214
|
-
onHeaderChecked:
|
|
215
|
-
upDataHeaderChecked:
|
|
211
|
+
getCheckField: f,
|
|
212
|
+
headerChecked: p,
|
|
213
|
+
headerCheckedIndeterminate: m,
|
|
214
|
+
onHeaderChecked: h,
|
|
215
|
+
upDataHeaderChecked: _,
|
|
216
216
|
upDataAllRowCheckedDeep: () => {
|
|
217
217
|
if (u) {
|
|
218
218
|
let e = /* @__PURE__ */ new Map(), t = (n) => {
|
|
@@ -225,26 +225,33 @@ function me(e) {
|
|
|
225
225
|
}, n = r.value;
|
|
226
226
|
for (let e of n) t(e);
|
|
227
227
|
e.forEach((e) => {
|
|
228
|
-
for (let t of
|
|
228
|
+
for (let t of d) v(e, t);
|
|
229
229
|
});
|
|
230
230
|
}
|
|
231
|
-
|
|
231
|
+
_(void 0);
|
|
232
232
|
},
|
|
233
233
|
onCellChecked: (t, n) => {
|
|
234
234
|
e.blurAnyElement();
|
|
235
|
-
let r = n ??
|
|
236
|
-
t[r] ?
|
|
235
|
+
let r = n ?? d[0];
|
|
236
|
+
t[r] ? y([t], !1, r) : y([t], !0, r), v(t, r), _(r), a("checkboxChange", {
|
|
237
237
|
row: t,
|
|
238
238
|
checked: t[r],
|
|
239
239
|
field: r
|
|
240
240
|
});
|
|
241
241
|
},
|
|
242
|
-
getCheckboxRecords: (e) => {
|
|
243
|
-
let t = [];
|
|
244
|
-
|
|
242
|
+
getCheckboxRecords: (e, t) => {
|
|
243
|
+
let n = t ?? d[0], a = [];
|
|
244
|
+
if (a = e ? i.value : r.value, !s) return a.filter((e) => e[n]);
|
|
245
|
+
let o = [], u = (t) => {
|
|
246
|
+
if (t[n] && o.push(t), e) {
|
|
247
|
+
if (t[l]?.length) for (let e of t[l]) u(e);
|
|
248
|
+
} else if (t[c]?.length) for (let e of t[c]) u(e);
|
|
249
|
+
};
|
|
250
|
+
for (let e of a) u(e);
|
|
251
|
+
return o;
|
|
245
252
|
},
|
|
246
253
|
clearCheckboxRowInit: () => {
|
|
247
|
-
|
|
254
|
+
p.value = {}, m.value = {};
|
|
248
255
|
}
|
|
249
256
|
};
|
|
250
257
|
}
|
|
@@ -694,8 +701,8 @@ var _e = (e) => {
|
|
|
694
701
|
}, u = (e) => {
|
|
695
702
|
i.value?.scrollTo(e);
|
|
696
703
|
}, m = y([]), h = y([]), _ = [], v = /* @__PURE__ */ new Map(), b = (t) => {
|
|
697
|
-
v.clear(), h.value = t, _ = [],
|
|
698
|
-
let n = 1, r = !1, i = 0, a = e.props.treeConfig?.childrenField ||
|
|
704
|
+
v.clear(), h.value = t, _ = [], ne();
|
|
705
|
+
let n = 1, r = !1, i = 0, a = e.props.treeConfig?.childrenField || K.childrenField, o = (t, n, r) => {
|
|
699
706
|
if (_.push(t), t[F.level] = r, e.props.treeConfig?.isOpenTree) {
|
|
700
707
|
let e = t?.[a] || [];
|
|
701
708
|
if (t?.[F.filterChildren]?.length > 0 && (e = t[F.filterChildren]), e.length > 0 && t[F.isCollapsed]) {
|
|
@@ -713,7 +720,7 @@ var _e = (e) => {
|
|
|
713
720
|
}), s++;
|
|
714
721
|
}, S = async (n, r) => {
|
|
715
722
|
let i = null;
|
|
716
|
-
i = typeof r == "string" ?
|
|
723
|
+
i = typeof r == "string" ? Y.get(r) : r, X(n);
|
|
717
724
|
let a = [];
|
|
718
725
|
for (let e of t.value) {
|
|
719
726
|
let t = x(e);
|
|
@@ -738,29 +745,29 @@ var _e = (e) => {
|
|
|
738
745
|
});
|
|
739
746
|
if (o) {
|
|
740
747
|
P(o.heightDatas);
|
|
741
|
-
let t = e.props.treeConfig?.childrenField ||
|
|
748
|
+
let t = e.props.treeConfig?.childrenField || K.childrenField;
|
|
742
749
|
i[t] = n;
|
|
743
750
|
}
|
|
744
751
|
}, C = (t) => {
|
|
745
752
|
let n = null;
|
|
746
|
-
if (n = typeof t == "string" ?
|
|
753
|
+
if (n = typeof t == "string" ? Y.get(t) : t, n[F.expandChildren]?.length) return;
|
|
747
754
|
let r = {
|
|
748
755
|
[F.isExpandRow]: !0,
|
|
749
756
|
[F.height]: e.props.expandConfig?.height || 0
|
|
750
757
|
};
|
|
751
|
-
|
|
752
|
-
}, { headerHeight: T, headerStyles: E, createHeader: ee, headerRef: D, getHeaderRefHeight: O } = fe({ pretextTableRef: r }), { footerHeight:
|
|
758
|
+
X([r]), n[F.expandChildren] = [r];
|
|
759
|
+
}, { headerHeight: T, headerStyles: E, createHeader: ee, headerRef: D, getHeaderRefHeight: O } = fe({ pretextTableRef: r }), { footerHeight: k, footerColumns: te, getFooterHeight: A, updateFooter: ne, updateFooterCellLabel: re } = ve({
|
|
753
760
|
showFooter: e.props.showFooter,
|
|
754
761
|
nowDataSource: h,
|
|
755
762
|
columns: t
|
|
756
|
-
}),
|
|
757
|
-
e == -1 && (e = ae.value),
|
|
763
|
+
}), ie = g(0), ae = g(0), oe = (e) => {
|
|
764
|
+
e == -1 && (e = ae.value), ie.value = e;
|
|
758
765
|
}, se = (e) => {
|
|
759
766
|
ae.value = e;
|
|
760
767
|
}, j = () => {
|
|
761
768
|
let e = 0;
|
|
762
769
|
for (let t of _) e += t[F.height] || 0;
|
|
763
|
-
|
|
770
|
+
ie.value = e;
|
|
764
771
|
}, M = {
|
|
765
772
|
fontWeight: "400",
|
|
766
773
|
fontSize: "14px"
|
|
@@ -779,7 +786,7 @@ var _e = (e) => {
|
|
|
779
786
|
...e.props.treeConfig,
|
|
780
787
|
loadMethod: void 0
|
|
781
788
|
},
|
|
782
|
-
defaultTreeConfig: { ...
|
|
789
|
+
defaultTreeConfig: { ...K }
|
|
783
790
|
};
|
|
784
791
|
i.postMessage(a), i.onmessage = (e) => {
|
|
785
792
|
n(e.data), i.terminate();
|
|
@@ -788,7 +795,7 @@ var _e = (e) => {
|
|
|
788
795
|
};
|
|
789
796
|
}), P = (e) => {
|
|
790
797
|
for (let t of e) {
|
|
791
|
-
let e =
|
|
798
|
+
let e = Y.get(t.id);
|
|
792
799
|
e && (e[F.height] = t.pretextHeight);
|
|
793
800
|
}
|
|
794
801
|
}, I = 0, R = !1, xe = async (e) => {
|
|
@@ -804,7 +811,7 @@ var _e = (e) => {
|
|
|
804
811
|
}
|
|
805
812
|
let n = 0;
|
|
806
813
|
if (e.length === 0) {
|
|
807
|
-
b(e), j(),
|
|
814
|
+
b(e), j(), De.value = [];
|
|
808
815
|
return;
|
|
809
816
|
}
|
|
810
817
|
let r = [];
|
|
@@ -832,7 +839,7 @@ var _e = (e) => {
|
|
|
832
839
|
index: 0,
|
|
833
840
|
columns: r
|
|
834
841
|
});
|
|
835
|
-
i && (n += i.tempItemHeights, P(i.heightDatas), b(e), j(),
|
|
842
|
+
i && (n += i.tempItemHeights, P(i.heightDatas), b(e), j(), H());
|
|
836
843
|
let a = [], o = Math.ceil((e.length - 100) / t / 2), s = o * 2, c = 0, l = 100;
|
|
837
844
|
for (let n = 1; n <= o; n++) for (let n = 0; n < 2; n++) a[n] || (a[n] = []), a[n].push({
|
|
838
845
|
tempI: l,
|
|
@@ -862,31 +869,31 @@ var _e = (e) => {
|
|
|
862
869
|
index: 0,
|
|
863
870
|
columns: r
|
|
864
871
|
});
|
|
865
|
-
R = !1, t && (P(t.heightDatas), b(e), j(),
|
|
872
|
+
R = !1, t && (P(t.heightDatas), b(e), j(), H());
|
|
866
873
|
}
|
|
867
|
-
}, Se = 0, Ce = 1e4, z = 0,
|
|
868
|
-
if (
|
|
869
|
-
|
|
870
|
-
|
|
874
|
+
}, Se = 0, Ce = 1e4, z = 0, we = 0, B = g(0), V = !1, Te = (e) => {
|
|
875
|
+
if (we = i.value?.scrollLeft || 0, z == i.value?.scrollTop) {
|
|
876
|
+
V ||= (window.requestAnimationFrame(() => {
|
|
877
|
+
Me(), V = !1;
|
|
871
878
|
}), !0);
|
|
872
879
|
return;
|
|
873
880
|
}
|
|
874
|
-
z = i.value?.scrollTop || 0, e.preventDefault(),
|
|
875
|
-
|
|
881
|
+
z = i.value?.scrollTop || 0, e.preventDefault(), V ||= (window.requestAnimationFrame(() => {
|
|
882
|
+
H(), V = !1;
|
|
876
883
|
}), !0);
|
|
877
|
-
},
|
|
884
|
+
}, Ee = (e) => {
|
|
878
885
|
if (e.shiftKey) {
|
|
879
886
|
e.preventDefault(), e.stopPropagation(), e.deltaY > 0 || e.deltaX > 0 ? i.value?.scrollBy({ left: 100 }) : i.value?.scrollBy({ left: -100 });
|
|
880
887
|
return;
|
|
881
888
|
}
|
|
882
889
|
e.preventDefault(), e.stopPropagation(), e.deltaY > 0 ? i.value?.scrollBy({ top: 150 }) : i.value?.scrollBy({ top: -150 });
|
|
883
|
-
},
|
|
890
|
+
}, De = g([]), Oe = g(0), ke = ce((e, t) => {
|
|
884
891
|
setTimeout(() => {
|
|
885
|
-
|
|
892
|
+
Oe.value = t, e.forEach((e) => {
|
|
886
893
|
e.slotShowTimestamp = t;
|
|
887
894
|
}), l();
|
|
888
895
|
}, 0);
|
|
889
|
-
}, 100),
|
|
896
|
+
}, 100), H = () => {
|
|
890
897
|
if (!i.value) return;
|
|
891
898
|
let e = i.value.scrollTop, t = a.value, n = 0, r = 0, o = [], s = "遍历";
|
|
892
899
|
switch (!0) {
|
|
@@ -912,7 +919,7 @@ var _e = (e) => {
|
|
|
912
919
|
s = v.get(i) || {
|
|
913
920
|
totalHeight: 0,
|
|
914
921
|
row: {}
|
|
915
|
-
}, r = s.totalHeight,
|
|
922
|
+
}, r = s.totalHeight, B.value = r - s.row[F.height], o.push(s.row), n = e + t;
|
|
916
923
|
getHeightFor: for (let e = i; e < _.length; e++) {
|
|
917
924
|
let t = _[e];
|
|
918
925
|
if (r += t[F.height], n) if (r <= n) o.push(t);
|
|
@@ -923,15 +930,15 @@ var _e = (e) => {
|
|
|
923
930
|
let a = _[i];
|
|
924
931
|
if (a) {
|
|
925
932
|
if (r += a[F.height], e <= r && n == 0) {
|
|
926
|
-
|
|
933
|
+
B.value = r - a[F.height], o.push(a), n = e + t;
|
|
927
934
|
continue;
|
|
928
935
|
}
|
|
929
936
|
if (n) if (r <= n) o.push(a);
|
|
930
937
|
else break getHeightFor;
|
|
931
938
|
}
|
|
932
939
|
}
|
|
933
|
-
|
|
934
|
-
},
|
|
940
|
+
De.value = o, Me(), ke(o, Math.floor(performance.now()));
|
|
941
|
+
}, Ae = g(0), je = g(0), Me = () => {
|
|
935
942
|
if (!i.value) return;
|
|
936
943
|
let e = i.value.scrollLeft, n = i.value.clientWidth;
|
|
937
944
|
for (let e of t.value) (e.fixed == "left" || e.fixed == "right") && (n -= e.width || e.minWidth || 0);
|
|
@@ -949,18 +956,18 @@ var _e = (e) => {
|
|
|
949
956
|
}
|
|
950
957
|
}
|
|
951
958
|
}
|
|
952
|
-
r < a && (
|
|
953
|
-
},
|
|
954
|
-
if (e.props.rowConfig?.isCurrent &&
|
|
959
|
+
r < a && (Ae.value = r, je.value = a);
|
|
960
|
+
}, Ne = ce(H, 200), { fixedColumnsLeft: Pe, fixedColumnsRight: Fe, fixedLeftIndex: Ie, fixedRightIndex: Le, reflashGridTemplateColumns: Re, gridTemplateColumns: ze, getGridStyles: U } = pe({ columns: t }), W = y({}), Be = (t, n) => {
|
|
961
|
+
if (e.props.rowConfig?.isCurrent && W.value != t && (W.value = t, e.emits("currentChange", {
|
|
955
962
|
newValue: t,
|
|
956
963
|
column: n
|
|
957
964
|
})), e.props.treeConfig?.isOpenTree) {
|
|
958
|
-
let r = e.props.treeConfig.childrenField ||
|
|
965
|
+
let r = e.props.treeConfig.childrenField || K.childrenField;
|
|
959
966
|
switch (!0) {
|
|
960
967
|
case t?.[r]?.length == 0: break;
|
|
961
968
|
case e.props.treeConfig?.trigger == "cell" && n.treeNode:
|
|
962
969
|
case e.props.treeConfig?.trigger == "row":
|
|
963
|
-
|
|
970
|
+
ot([t], !t[F.isCollapsed]);
|
|
964
971
|
break;
|
|
965
972
|
default: break;
|
|
966
973
|
}
|
|
@@ -968,7 +975,7 @@ var _e = (e) => {
|
|
|
968
975
|
if (e.props.expandConfig?.isExpand) switch (!0) {
|
|
969
976
|
case e.props.expandConfig?.trigger == "cell" && n.type == "expand":
|
|
970
977
|
case e.props.expandConfig?.trigger == "row":
|
|
971
|
-
|
|
978
|
+
J([t], !t[F.isRowExpanded]);
|
|
972
979
|
break;
|
|
973
980
|
default: break;
|
|
974
981
|
}
|
|
@@ -976,11 +983,11 @@ var _e = (e) => {
|
|
|
976
983
|
row: t,
|
|
977
984
|
column: n
|
|
978
985
|
});
|
|
979
|
-
},
|
|
980
|
-
e.emits && e.emits("headerCellClick", { column: t }), e.props.sortConfig?.trigger == "cell" && t.sortable &&
|
|
981
|
-
},
|
|
982
|
-
e.props.rowConfig?.isHover && (
|
|
983
|
-
}, { getCheckField:
|
|
986
|
+
}, Ve = (t) => {
|
|
987
|
+
e.emits && e.emits("headerCellClick", { column: t }), e.props.sortConfig?.trigger == "cell" && t.sortable && mt(t.field, "auto"), e.emits && e.emits("cellClick", { column: t });
|
|
988
|
+
}, G = y({}), He = (t) => {
|
|
989
|
+
e.props.rowConfig?.isHover && (G.value = t);
|
|
990
|
+
}, { getCheckField: Ue, headerChecked: We, headerCheckedIndeterminate: Ge, onHeaderChecked: Ke, upDataHeaderChecked: qe, upDataAllRowCheckedDeep: Je, onCellChecked: Ye, getCheckboxRecords: Xe, clearCheckboxRowInit: Ze } = me({
|
|
984
991
|
pretextId: F.id,
|
|
985
992
|
columns: t,
|
|
986
993
|
blurAnyElement: L,
|
|
@@ -988,87 +995,87 @@ var _e = (e) => {
|
|
|
988
995
|
baseDataSource: m,
|
|
989
996
|
emits: e.emits,
|
|
990
997
|
treeConfig: e.props.treeConfig
|
|
991
|
-
}),
|
|
992
|
-
|
|
998
|
+
}), Qe = (e) => {
|
|
999
|
+
Ze();
|
|
993
1000
|
let t = [];
|
|
994
|
-
if (t = e ? [e] :
|
|
995
|
-
}, { isDragging:
|
|
1001
|
+
if (t = e ? [e] : Ue(), t) for (let e of h.value) for (let n of t) e[n] = !1;
|
|
1002
|
+
}, { isDragging: $e, dragLineLeft: et, startResize: tt } = _e({
|
|
996
1003
|
pretextTableRef: r,
|
|
997
1004
|
afterResize: (t) => {
|
|
998
|
-
|
|
1005
|
+
Re(), e.emits("resizableChange", {
|
|
999
1006
|
column: { ...t.column },
|
|
1000
1007
|
resizeWidth: t.column.width
|
|
1001
1008
|
});
|
|
1002
1009
|
}
|
|
1003
|
-
}),
|
|
1004
|
-
b(h.value), j(),
|
|
1005
|
-
},
|
|
1010
|
+
}), nt = () => {
|
|
1011
|
+
b(h.value), j(), H();
|
|
1012
|
+
}, rt = (t) => {
|
|
1006
1013
|
if (t) {
|
|
1007
|
-
let t = e.props.treeConfig?.childrenField ||
|
|
1014
|
+
let t = e.props.treeConfig?.childrenField || K.childrenField, n = [], r = (e) => {
|
|
1008
1015
|
if (e[t]?.length) {
|
|
1009
1016
|
n.push(e);
|
|
1010
1017
|
for (let n of e[t]) r(n);
|
|
1011
1018
|
}
|
|
1012
1019
|
};
|
|
1013
1020
|
for (let e of h.value) r(e);
|
|
1014
|
-
|
|
1015
|
-
} else
|
|
1016
|
-
},
|
|
1017
|
-
|
|
1021
|
+
ot(n, !0);
|
|
1022
|
+
} else it();
|
|
1023
|
+
}, it = () => {
|
|
1024
|
+
q.forEach((e) => {
|
|
1018
1025
|
e[F.isCollapsed] = !1;
|
|
1019
|
-
}),
|
|
1020
|
-
}, { defaultTreeConfig:
|
|
1026
|
+
}), q.clear(), b(h.value), j(), H();
|
|
1027
|
+
}, { defaultTreeConfig: K, treeExpandMap: q, handleTree: at, setTreeExpand: ot } = ye({
|
|
1021
1028
|
treeConfig: e.props.treeConfig,
|
|
1022
|
-
afterTreeExpand:
|
|
1029
|
+
afterTreeExpand: nt,
|
|
1023
1030
|
insertChild: S
|
|
1024
|
-
}), { handleExpand:
|
|
1031
|
+
}), { handleExpand: st, setRowExpand: J } = be({
|
|
1025
1032
|
expandConfig: e.props.expandConfig,
|
|
1026
1033
|
afterRowExpand: (t, n) => {
|
|
1027
|
-
b(h.value), j(),
|
|
1034
|
+
b(h.value), j(), H(), e.emits("toggleRowExpand", {
|
|
1028
1035
|
expanded: n,
|
|
1029
1036
|
rows: t
|
|
1030
1037
|
});
|
|
1031
1038
|
},
|
|
1032
1039
|
insertExpandRow: C
|
|
1033
|
-
}),
|
|
1034
|
-
m.value = [], b([]),
|
|
1035
|
-
},
|
|
1036
|
-
let n =
|
|
1040
|
+
}), ct = 0, lt = () => {
|
|
1041
|
+
m.value = [], b([]), Y.clear(), W.value = {}, G.value = {}, Ze(), Q.value = "", pt.value = null, Ct(), ct = 0, I = 0;
|
|
1042
|
+
}, Y = /* @__PURE__ */ new Map(), X = (t) => {
|
|
1043
|
+
let n = ct;
|
|
1037
1044
|
for (let r of t) {
|
|
1038
|
-
r[F.id] = Math.random().toString(36).substring(2), r[F.index] = n, n++,
|
|
1039
|
-
let t = e.props.treeConfig?.childrenField ||
|
|
1040
|
-
e.props.treeConfig?.isOpenTree && r?.[t]?.length > 0 &&
|
|
1045
|
+
r[F.id] = Math.random().toString(36).substring(2), r[F.index] = n, n++, ct++, Y.set(r[F.id], r);
|
|
1046
|
+
let t = e.props.treeConfig?.childrenField || K.childrenField;
|
|
1047
|
+
e.props.treeConfig?.isOpenTree && r?.[t]?.length > 0 && X(r[t]);
|
|
1041
1048
|
}
|
|
1042
|
-
},
|
|
1049
|
+
}, Z = (e, t, n = 0) => {
|
|
1043
1050
|
R ? setTimeout(() => {
|
|
1044
|
-
n >= 50 ||
|
|
1051
|
+
n >= 50 || Z(e, t, n + 1);
|
|
1045
1052
|
}, 100) : u({
|
|
1046
1053
|
top: e,
|
|
1047
1054
|
left: t
|
|
1048
1055
|
});
|
|
1049
1056
|
}, ut = async (e) => {
|
|
1050
|
-
let t = z, n =
|
|
1051
|
-
await
|
|
1052
|
-
},
|
|
1057
|
+
let t = z, n = we;
|
|
1058
|
+
await dt(e), Z(t, n);
|
|
1059
|
+
}, dt = async (e) => {
|
|
1053
1060
|
try {
|
|
1054
|
-
u({ top: 0 }),
|
|
1055
|
-
let t =
|
|
1056
|
-
|
|
1061
|
+
u({ top: 0 }), lt();
|
|
1062
|
+
let t = at(e || []);
|
|
1063
|
+
X(t || []), m.value = t || [], xe(m.value);
|
|
1057
1064
|
} catch (e) {
|
|
1058
1065
|
console.error(e);
|
|
1059
1066
|
}
|
|
1060
|
-
},
|
|
1067
|
+
}, ft = () => {
|
|
1061
1068
|
let e = _.filter((e) => !e[F.isExpandRow]);
|
|
1062
1069
|
return {
|
|
1063
1070
|
fullData: m.value,
|
|
1064
1071
|
visibleData: e
|
|
1065
1072
|
};
|
|
1066
|
-
}, { sortField:
|
|
1073
|
+
}, { sortField: Q, sortOrder: pt, sort: mt, handleSort: $ } = he({
|
|
1067
1074
|
nowDataSource: h,
|
|
1068
|
-
getVisibleData:
|
|
1075
|
+
getVisibleData: H,
|
|
1069
1076
|
setNowDataSource: b,
|
|
1070
1077
|
treeConfig: e.props.treeConfig,
|
|
1071
|
-
defaultTreeConfig:
|
|
1078
|
+
defaultTreeConfig: K
|
|
1072
1079
|
}), { filterPopupWidth: ht, filterPopupId: gt, inputFilterOptions: _t, numberFilterOptions: vt, filterFields: yt, getFilterFields: bt, filterClick: xt, setFilter: St, clearFilter: Ct } = ge({
|
|
1073
1080
|
columns: t,
|
|
1074
1081
|
baseDataSource: m,
|
|
@@ -1076,10 +1083,10 @@ var _e = (e) => {
|
|
|
1076
1083
|
scrollTo: u,
|
|
1077
1084
|
refresh: l,
|
|
1078
1085
|
afterFilter: () => {
|
|
1079
|
-
j(),
|
|
1086
|
+
j(), $(), Je();
|
|
1080
1087
|
},
|
|
1081
1088
|
treeConfig: e.props.treeConfig,
|
|
1082
|
-
defaultTreeConfig:
|
|
1089
|
+
defaultTreeConfig: K
|
|
1083
1090
|
}), wt = (e) => {
|
|
1084
1091
|
L(), e.listFilter.selectedValue.length == e.listFilter.listOptions.length ? e.listFilter.selectedValue = [] : e.listFilter.selectedValue = e.listFilter.listOptions.map((e) => e.value);
|
|
1085
1092
|
}, Tt = (i) => {
|
|
@@ -1090,16 +1097,16 @@ var _e = (e) => {
|
|
|
1090
1097
|
return;
|
|
1091
1098
|
}
|
|
1092
1099
|
let a = ee(i) || [];
|
|
1093
|
-
a.finalColumns.length == 0 || a.realColumns.length == 0 || (
|
|
1100
|
+
a.finalColumns.length == 0 || a.realColumns.length == 0 || (st(), Se = a.finalColumns.length, j(), t.value = a.finalColumns, n.value = a.realColumns, setTimeout(() => {
|
|
1094
1101
|
O();
|
|
1095
|
-
}, 0),
|
|
1102
|
+
}, 0), A(e.props.footerProps), Ue(), U(), bt(), l());
|
|
1096
1103
|
};
|
|
1097
1104
|
w(() => e.props.columns, (e) => {
|
|
1098
1105
|
Tt(e);
|
|
1099
1106
|
}, { immediate: !0 }), w(() => e.props.footerProps, (e) => {
|
|
1100
|
-
|
|
1107
|
+
A(e);
|
|
1101
1108
|
}), w(() => e.props.height, (e) => {
|
|
1102
|
-
a.value = e,
|
|
1109
|
+
a.value = e, Ne();
|
|
1103
1110
|
}, { immediate: !0 });
|
|
1104
1111
|
let Et = () => {
|
|
1105
1112
|
r.value && (o.value = r.value.clientWidth);
|
|
@@ -1117,54 +1124,54 @@ var _e = (e) => {
|
|
|
1117
1124
|
}), d(() => {
|
|
1118
1125
|
u({
|
|
1119
1126
|
top: z,
|
|
1120
|
-
left:
|
|
1121
|
-
}),
|
|
1127
|
+
left: we
|
|
1128
|
+
}), H();
|
|
1122
1129
|
}), f(() => {}), {
|
|
1123
1130
|
keyNames: F,
|
|
1124
1131
|
nowDataSource: h,
|
|
1125
1132
|
pretextTableRef: r,
|
|
1126
1133
|
tableRef: i,
|
|
1127
1134
|
isLoading: s,
|
|
1128
|
-
visibleData:
|
|
1129
|
-
visibleWidthStartColumnIndex:
|
|
1130
|
-
visibleWidthEndColumnIndex:
|
|
1131
|
-
gridTemplateColumns:
|
|
1135
|
+
visibleData: De,
|
|
1136
|
+
visibleWidthStartColumnIndex: Ae,
|
|
1137
|
+
visibleWidthEndColumnIndex: je,
|
|
1138
|
+
gridTemplateColumns: ze,
|
|
1132
1139
|
blurAnyElement: L,
|
|
1133
1140
|
columns: t,
|
|
1134
|
-
onScroll:
|
|
1135
|
-
onWheel:
|
|
1136
|
-
topEmptyHeight:
|
|
1137
|
-
scrollbarHeight:
|
|
1141
|
+
onScroll: Te,
|
|
1142
|
+
onWheel: Ee,
|
|
1143
|
+
topEmptyHeight: B,
|
|
1144
|
+
scrollbarHeight: ie,
|
|
1138
1145
|
headerHeight: T,
|
|
1139
1146
|
headerStyles: E,
|
|
1140
1147
|
realColumns: n,
|
|
1141
1148
|
headerRef: D,
|
|
1142
|
-
updateFooter:
|
|
1143
|
-
updateFooterCellLabel:
|
|
1144
|
-
footerHeight:
|
|
1145
|
-
footerColumns:
|
|
1146
|
-
getFooterHeight:
|
|
1149
|
+
updateFooter: ne,
|
|
1150
|
+
updateFooterCellLabel: re,
|
|
1151
|
+
footerHeight: k,
|
|
1152
|
+
footerColumns: te,
|
|
1153
|
+
getFooterHeight: A,
|
|
1147
1154
|
itemStyles: M,
|
|
1148
|
-
fixedLeftIndex:
|
|
1149
|
-
fixedRightIndex:
|
|
1150
|
-
fixedColumnsLeft:
|
|
1151
|
-
fixedColumnsRight:
|
|
1152
|
-
getGridStyles:
|
|
1155
|
+
fixedLeftIndex: Ie,
|
|
1156
|
+
fixedRightIndex: Le,
|
|
1157
|
+
fixedColumnsLeft: Pe,
|
|
1158
|
+
fixedColumnsRight: Fe,
|
|
1159
|
+
getGridStyles: U,
|
|
1153
1160
|
divLineHeightOffset: 20,
|
|
1154
|
-
currentRow:
|
|
1155
|
-
cellClick:
|
|
1156
|
-
headerClick:
|
|
1157
|
-
hoverRow:
|
|
1158
|
-
cellMousemove:
|
|
1159
|
-
headerChecked:
|
|
1160
|
-
headerCheckedIndeterminate:
|
|
1161
|
-
onHeaderChecked:
|
|
1162
|
-
onCellChecked:
|
|
1163
|
-
getCheckboxRecords:
|
|
1164
|
-
clearCheckboxRow:
|
|
1165
|
-
sortField:
|
|
1161
|
+
currentRow: W,
|
|
1162
|
+
cellClick: Be,
|
|
1163
|
+
headerClick: Ve,
|
|
1164
|
+
hoverRow: G,
|
|
1165
|
+
cellMousemove: He,
|
|
1166
|
+
headerChecked: We,
|
|
1167
|
+
headerCheckedIndeterminate: Ge,
|
|
1168
|
+
onHeaderChecked: Ke,
|
|
1169
|
+
onCellChecked: Ye,
|
|
1170
|
+
getCheckboxRecords: Xe,
|
|
1171
|
+
clearCheckboxRow: Qe,
|
|
1172
|
+
sortField: Q,
|
|
1166
1173
|
sortOrder: pt,
|
|
1167
|
-
sort:
|
|
1174
|
+
sort: mt,
|
|
1168
1175
|
filterPopupWidth: ht,
|
|
1169
1176
|
filterPopupId: gt,
|
|
1170
1177
|
inputFilterOptions: _t,
|
|
@@ -1175,26 +1182,26 @@ var _e = (e) => {
|
|
|
1175
1182
|
setFilter: St,
|
|
1176
1183
|
clearFilter: Ct,
|
|
1177
1184
|
setListFilterAll: wt,
|
|
1178
|
-
isDragging:
|
|
1179
|
-
dragLineLeft:
|
|
1180
|
-
startResize:
|
|
1181
|
-
setTreeExpand:
|
|
1182
|
-
setAllTreeExpand:
|
|
1183
|
-
clearTreeExpand:
|
|
1184
|
-
defaultTreeConfig:
|
|
1185
|
-
setRowExpand:
|
|
1186
|
-
slotShowTimestamp:
|
|
1185
|
+
isDragging: $e,
|
|
1186
|
+
dragLineLeft: et,
|
|
1187
|
+
startResize: tt,
|
|
1188
|
+
setTreeExpand: ot,
|
|
1189
|
+
setAllTreeExpand: rt,
|
|
1190
|
+
clearTreeExpand: it,
|
|
1191
|
+
defaultTreeConfig: K,
|
|
1192
|
+
setRowExpand: J,
|
|
1193
|
+
slotShowTimestamp: Oe,
|
|
1187
1194
|
isRefresh: c,
|
|
1188
1195
|
realTableHeight: a,
|
|
1189
1196
|
realTableWidth: o,
|
|
1190
1197
|
loadData: ut,
|
|
1191
|
-
reloadData:
|
|
1192
|
-
getTableData:
|
|
1198
|
+
reloadData: dt,
|
|
1199
|
+
getTableData: ft
|
|
1193
1200
|
};
|
|
1194
|
-
}, xe = ["onClick"], Se = { key: 0 }, Ce = { key: 1 }, z = { key: 2 },
|
|
1201
|
+
}, xe = ["onClick"], Se = { key: 0 }, Ce = { key: 1 }, z = { key: 2 }, we = {
|
|
1195
1202
|
key: 3,
|
|
1196
1203
|
style: { "text-align": "center" }
|
|
1197
|
-
},
|
|
1204
|
+
}, B = {
|
|
1198
1205
|
key: 0,
|
|
1199
1206
|
style: {
|
|
1200
1207
|
display: "inline-flex",
|
|
@@ -1205,30 +1212,36 @@ var _e = (e) => {
|
|
|
1205
1212
|
padding: "0px",
|
|
1206
1213
|
width: "14px"
|
|
1207
1214
|
}
|
|
1208
|
-
},
|
|
1215
|
+
}, V = { key: 1 }, Te = ["id"], Ee = { style: {
|
|
1209
1216
|
"text-align": "center",
|
|
1210
1217
|
"font-weight": "bold"
|
|
1211
|
-
} },
|
|
1218
|
+
} }, De = { style: {
|
|
1212
1219
|
display: "flex",
|
|
1213
1220
|
"justify-content": "center",
|
|
1214
1221
|
"margin-top": "5px"
|
|
1215
|
-
} },
|
|
1222
|
+
} }, Oe = { style: {
|
|
1216
1223
|
display: "flex",
|
|
1217
1224
|
"justify-content": "center",
|
|
1218
1225
|
"margin-top": "5px"
|
|
1219
|
-
} },
|
|
1226
|
+
} }, ke = { style: { margin: "0 0 4px" } }, H = { style: {
|
|
1220
1227
|
display: "flex",
|
|
1221
1228
|
"justify-content": "center",
|
|
1222
1229
|
"margin-top": "5px",
|
|
1223
1230
|
padding: "5px 0",
|
|
1224
1231
|
"border-top": "1px solid #e0e0e0"
|
|
1225
|
-
} },
|
|
1232
|
+
} }, Ae = ["onMousedown"], je = ["onClick", "onMouseenter"], Me = {
|
|
1226
1233
|
key: 3,
|
|
1227
1234
|
style: { "margin-left": "6px" }
|
|
1228
|
-
},
|
|
1235
|
+
}, Ne = { key: 4 }, Pe = { key: 5 }, Fe = { style: {
|
|
1229
1236
|
display: "flex",
|
|
1230
1237
|
gap: "4px"
|
|
1231
|
-
} },
|
|
1238
|
+
} }, Ie = ["title"], Le = {
|
|
1239
|
+
key: 9,
|
|
1240
|
+
style: {
|
|
1241
|
+
width: "100%",
|
|
1242
|
+
"text-align": "center"
|
|
1243
|
+
}
|
|
1244
|
+
}, Re = ["title"], ze = { key: 1 }, U = /* @__PURE__ */ c({
|
|
1232
1245
|
inheritAttrs: !1,
|
|
1233
1246
|
name: "pretextTable",
|
|
1234
1247
|
props: {
|
|
@@ -1296,30 +1309,30 @@ var _e = (e) => {
|
|
|
1296
1309
|
"toggleRowExpand"
|
|
1297
1310
|
],
|
|
1298
1311
|
setup(c, { expose: d, emit: f }) {
|
|
1299
|
-
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: he, divLineHeightOffset: ge, updateFooter: _e, updateFooterCellLabel: ve, footerHeight: ye, footerColumns: L, getFooterHeight: be, itemStyles:
|
|
1312
|
+
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: he, divLineHeightOffset: ge, updateFooter: _e, updateFooterCellLabel: ve, footerHeight: ye, footerColumns: L, getFooterHeight: be, itemStyles: U, fixedLeftIndex: W, fixedRightIndex: Be, fixedColumnsLeft: Ve, fixedColumnsRight: G, currentRow: 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: K, filterFields: q, getFilterFields: at, filterClick: ot, setFilter: st, clearFilter: J, setListFilterAll: ct, isDragging: lt, dragLineLeft: Y, startResize: X, setTreeExpand: Z, setAllTreeExpand: ut, clearTreeExpand: dt, defaultTreeConfig: ft, setRowExpand: Q, slotShowTimestamp: pt, isRefresh: mt, realTableHeight: $, realTableWidth: ht, loadData: gt, reloadData: _t, getTableData: vt } = R({
|
|
1300
1313
|
props: p,
|
|
1301
1314
|
emits: f
|
|
1302
1315
|
});
|
|
1303
1316
|
return d({
|
|
1304
|
-
loadData:
|
|
1305
|
-
reloadData:
|
|
1306
|
-
getCheckboxRecords:
|
|
1307
|
-
clearCheckboxRow:
|
|
1317
|
+
loadData: gt,
|
|
1318
|
+
reloadData: _t,
|
|
1319
|
+
getCheckboxRecords: Ze,
|
|
1320
|
+
clearCheckboxRow: Qe,
|
|
1308
1321
|
updateFooter: _e,
|
|
1309
1322
|
updateFooterCellLabel: ve,
|
|
1310
1323
|
getFooterHeight: be,
|
|
1311
|
-
getTableData:
|
|
1324
|
+
getTableData: vt,
|
|
1312
1325
|
setTreeExpand: Z,
|
|
1313
|
-
setAllTreeExpand:
|
|
1314
|
-
clearTreeExpand:
|
|
1315
|
-
setRowExpand:
|
|
1326
|
+
setAllTreeExpand: ut,
|
|
1327
|
+
clearTreeExpand: dt,
|
|
1328
|
+
setRowExpand: Q
|
|
1316
1329
|
}), (c, d) => (h(), i("div", {
|
|
1317
1330
|
class: "cName-pretextTable",
|
|
1318
1331
|
style: { position: "relative" },
|
|
1319
1332
|
ref_key: "pretextTableRef",
|
|
1320
1333
|
ref: g
|
|
1321
1334
|
}, [
|
|
1322
|
-
s(S(
|
|
1335
|
+
s(S(re), {
|
|
1323
1336
|
modelValue: S(w),
|
|
1324
1337
|
text: p.loadingConfig?.text || "加载中..."
|
|
1325
1338
|
}, null, 8, ["modelValue", "text"]),
|
|
@@ -1359,55 +1372,55 @@ var _e = (e) => {
|
|
|
1359
1372
|
gridRow: f?.style?.gridRow || "",
|
|
1360
1373
|
gridColumn: f?.style?.gridColumn || "",
|
|
1361
1374
|
zIndex: m == 0 ? 3 : f.fixed == "left" || f.fixed == "right" ? 2 : 1,
|
|
1362
|
-
left: f.fixed == "left" ? S(
|
|
1363
|
-
right: f.fixed == "right" ? S(
|
|
1375
|
+
left: f.fixed == "left" ? S(Ve)[m] : "",
|
|
1376
|
+
right: f.fixed == "right" ? S(G)[m] : "",
|
|
1364
1377
|
borderLeft: f.fixed == "right" ? "1px solid var(--pretextTable-border-color)" : "",
|
|
1365
|
-
boxShadow: f.fixed == "left" && m == S(
|
|
1378
|
+
boxShadow: f.fixed == "left" && m == S(W) ? "var(--pretextTable-shadow-color) 2px 0px 5px -1px" : f.fixed == "right" && m == S(Be) ? "var(--pretextTable-shadow-color) -2px 0px 5px -1px" : "",
|
|
1366
1379
|
borderBottom: f ? "1px solid var(--pretextTable-border-color)" : "",
|
|
1367
1380
|
minHeight: "30px"
|
|
1368
1381
|
} : {}),
|
|
1369
|
-
onClick: (e) => S(
|
|
1370
|
-
}, [f ? f.type == "checkbox" && p == 0 ? (h(), i("span", Ce, [s(S(
|
|
1371
|
-
modelValue: S(
|
|
1372
|
-
indeterminate: S(
|
|
1382
|
+
onClick: (e) => S(We)(f)
|
|
1383
|
+
}, [f ? f.type == "checkbox" && p == 0 ? (h(), i("span", Ce, [s(S(k), {
|
|
1384
|
+
modelValue: S(qe)[f.field],
|
|
1385
|
+
indeterminate: S(Je)[f.field],
|
|
1373
1386
|
content: "",
|
|
1374
|
-
onChange: (e) => S(
|
|
1387
|
+
onChange: (e) => S(Ye)(f.field)
|
|
1375
1388
|
}, null, 8, [
|
|
1376
1389
|
"modelValue",
|
|
1377
1390
|
"indeterminate",
|
|
1378
1391
|
"onChange"
|
|
1379
|
-
])])) : f?.type == "seq" && p == 0 ? (h(), i("div", z, b(f.title || "序号"), 1)) : (h(), i("span",
|
|
1392
|
+
])])) : f?.type == "seq" && p == 0 ? (h(), i("div", z, b(f.title || "序号"), 1)) : (h(), i("span", we, [
|
|
1380
1393
|
a("span", null, [f.slots?.header ? v(c.$slots, f.slots?.header, {
|
|
1381
1394
|
key: 0,
|
|
1382
1395
|
column: f,
|
|
1383
1396
|
text: f.title
|
|
1384
1397
|
}, () => [o(b(f.title), 1)]) : (h(), i(e, { key: 1 }, [o(b(f.title), 1)], 64))]),
|
|
1385
|
-
f.sortable && !f.children?.length ? (h(), i("span",
|
|
1398
|
+
f.sortable && !f.children?.length ? (h(), i("span", B, [s(S(A), {
|
|
1386
1399
|
name: "caret-up",
|
|
1387
1400
|
style: {
|
|
1388
1401
|
position: "absolute",
|
|
1389
1402
|
top: "-0.8em"
|
|
1390
1403
|
},
|
|
1391
|
-
class: l(["pretextTable-sort-icon", { "pretextTable-sort-icon-active": S(
|
|
1392
|
-
onClick: D((e) => S(
|
|
1393
|
-
}, null, 8, ["class", "onClick"]), s(S(
|
|
1404
|
+
class: l(["pretextTable-sort-icon", { "pretextTable-sort-icon-active": S($e) == f.field && S(et) == "asc" }]),
|
|
1405
|
+
onClick: D((e) => S(tt)(f.field, "asc"), ["stop"])
|
|
1406
|
+
}, null, 8, ["class", "onClick"]), s(S(A), {
|
|
1394
1407
|
name: "caret-down",
|
|
1395
1408
|
style: {
|
|
1396
1409
|
position: "absolute",
|
|
1397
1410
|
top: "-0.2em"
|
|
1398
1411
|
},
|
|
1399
|
-
class: l(["pretextTable-sort-icon", { "pretextTable-sort-icon-active": S(
|
|
1400
|
-
onClick: D((e) => S(
|
|
1412
|
+
class: l(["pretextTable-sort-icon", { "pretextTable-sort-icon-active": S($e) == f.field && S(et) == "desc" }]),
|
|
1413
|
+
onClick: D((e) => S(tt)(f.field, "desc"), ["stop"])
|
|
1401
1414
|
}, null, 8, ["class", "onClick"])])) : r("", !0),
|
|
1402
|
-
S(
|
|
1415
|
+
S(q)[m]?.type && !f.children?.length ? (h(), i("span", V, [s(S(A), {
|
|
1403
1416
|
name: "funnel",
|
|
1404
|
-
class: l(["pretextTable-filter-icon", { "pretextTable-filter-icon-active": S(
|
|
1405
|
-
onClick: D((e) => S(
|
|
1406
|
-
}, null, 8, ["class", "onClick"]), S(
|
|
1417
|
+
class: l(["pretextTable-filter-icon", { "pretextTable-filter-icon-active": S(q)[m].isActive }]),
|
|
1418
|
+
onClick: D((e) => S(ot)(m, e), ["stop"])
|
|
1419
|
+
}, null, 8, ["class", "onClick"]), S(q)[m].isShow ? (h(), n(t, {
|
|
1407
1420
|
key: 0,
|
|
1408
1421
|
to: "body"
|
|
1409
1422
|
}, [a("div", {
|
|
1410
|
-
id: S(
|
|
1423
|
+
id: S(rt) + f.field,
|
|
1411
1424
|
class: "pretextTable-filter-popup",
|
|
1412
1425
|
style: u([{
|
|
1413
1426
|
"background-color": "#fff",
|
|
@@ -1417,52 +1430,52 @@ var _e = (e) => {
|
|
|
1417
1430
|
"z-index": "99999"
|
|
1418
1431
|
}, {
|
|
1419
1432
|
position: "absolute",
|
|
1420
|
-
top: S(
|
|
1421
|
-
left: S(
|
|
1433
|
+
top: S(q)[m].clientY + "px",
|
|
1434
|
+
left: S(q)[m].clientX + "px"
|
|
1422
1435
|
}])
|
|
1423
1436
|
}, [
|
|
1424
|
-
a("div",
|
|
1425
|
-
S(
|
|
1437
|
+
a("div", Ee, b(f.title), 1),
|
|
1438
|
+
S(q)[m].type == "inputFilter" ? (h(), i("div", {
|
|
1426
1439
|
key: 0,
|
|
1427
|
-
style: u({ width: S(
|
|
1428
|
-
}, [a("div", null, [s(S(
|
|
1429
|
-
modelValue: S(
|
|
1430
|
-
"onUpdate:modelValue": (e) => S(
|
|
1440
|
+
style: u({ width: S(nt) + "px" })
|
|
1441
|
+
}, [a("div", null, [s(S(ne), {
|
|
1442
|
+
modelValue: S(q)[m].value,
|
|
1443
|
+
"onUpdate:modelValue": (e) => S(q)[m].value = e,
|
|
1431
1444
|
placeholder: "按回车筛选",
|
|
1432
1445
|
trim: !0,
|
|
1433
1446
|
style: { width: "100%" },
|
|
1434
|
-
onKeyup: ee((e) => S(
|
|
1447
|
+
onKeyup: ee((e) => S(st)(f.field), ["enter"])
|
|
1435
1448
|
}, null, 8, [
|
|
1436
1449
|
"modelValue",
|
|
1437
1450
|
"onUpdate:modelValue",
|
|
1438
1451
|
"onKeyup"
|
|
1439
|
-
])]), a("div",
|
|
1440
|
-
modelValue: S(
|
|
1441
|
-
"onUpdate:modelValue": (e) => S(
|
|
1442
|
-
options: S(
|
|
1452
|
+
])]), a("div", De, [s(S(ae), {
|
|
1453
|
+
modelValue: S(q)[m].inputFilter.type,
|
|
1454
|
+
"onUpdate:modelValue": (e) => S(q)[m].inputFilter.type = e,
|
|
1455
|
+
options: S(it)
|
|
1443
1456
|
}, null, 8, [
|
|
1444
1457
|
"modelValue",
|
|
1445
1458
|
"onUpdate:modelValue",
|
|
1446
1459
|
"options"
|
|
1447
1460
|
])])], 4)) : r("", !0),
|
|
1448
|
-
S(
|
|
1461
|
+
S(q)[m].type == "numberFilter" || S(q)[m].type == "numberFilter%" ? (h(), i("div", {
|
|
1449
1462
|
key: 1,
|
|
1450
|
-
style: u({ width: S(
|
|
1451
|
-
}, [a("div",
|
|
1452
|
-
modelValue: S(
|
|
1453
|
-
"onUpdate:modelValue": (e) => S(
|
|
1454
|
-
options: S(
|
|
1463
|
+
style: u({ width: S(nt) + "px" })
|
|
1464
|
+
}, [a("div", Oe, [s(S(ae), {
|
|
1465
|
+
modelValue: S(q)[m].numberFilter.type,
|
|
1466
|
+
"onUpdate:modelValue": (e) => S(q)[m].numberFilter.type = e,
|
|
1467
|
+
options: S(K)
|
|
1455
1468
|
}, null, 8, [
|
|
1456
1469
|
"modelValue",
|
|
1457
1470
|
"onUpdate:modelValue",
|
|
1458
1471
|
"options"
|
|
1459
|
-
])]), a("div", null, [s(S(
|
|
1460
|
-
modelValue: S(
|
|
1461
|
-
"onUpdate:modelValue": (e) => S(
|
|
1472
|
+
])]), a("div", null, [s(S(ie), {
|
|
1473
|
+
modelValue: S(q)[m].value,
|
|
1474
|
+
"onUpdate:modelValue": (e) => S(q)[m].value = e,
|
|
1462
1475
|
placeholder: "按回车筛选",
|
|
1463
1476
|
controlConfig: { showButton: !1 },
|
|
1464
1477
|
style: { width: "100%" },
|
|
1465
|
-
onKeyup: ee((e) => S(
|
|
1478
|
+
onKeyup: ee((e) => S(st)(f.field), ["enter"])
|
|
1466
1479
|
}, {
|
|
1467
1480
|
suffix: T(() => [...d[3] ||= [o("%", -1)]]),
|
|
1468
1481
|
_: 1
|
|
@@ -1471,22 +1484,22 @@ var _e = (e) => {
|
|
|
1471
1484
|
"onUpdate:modelValue",
|
|
1472
1485
|
"onKeyup"
|
|
1473
1486
|
])])], 4)) : r("", !0),
|
|
1474
|
-
S(
|
|
1487
|
+
S(q)[m].type == "listFilter" ? (h(), i("div", {
|
|
1475
1488
|
key: 2,
|
|
1476
|
-
style: u({ maxWidth: S(
|
|
1477
|
-
}, [a("div",
|
|
1478
|
-
modelValue: S(
|
|
1479
|
-
indeterminate: S(
|
|
1489
|
+
style: u({ maxWidth: S(nt) + "px" })
|
|
1490
|
+
}, [a("div", ke, [s(S(k), {
|
|
1491
|
+
modelValue: S(q)[m].listFilter.selectedValue.length == S(q)[m].listFilter.listOptions.length,
|
|
1492
|
+
indeterminate: S(q)[m].listFilter.selectedValue.length > 0 && S(q)[m].listFilter.selectedValue.length < S(q)[m].listFilter.listOptions.length,
|
|
1480
1493
|
content: "全部",
|
|
1481
|
-
onChange: (e) => S(
|
|
1494
|
+
onChange: (e) => S(ct)(S(q)[m])
|
|
1482
1495
|
}, null, 8, [
|
|
1483
1496
|
"modelValue",
|
|
1484
1497
|
"indeterminate",
|
|
1485
1498
|
"onChange"
|
|
1486
|
-
])]), s(S(
|
|
1487
|
-
modelValue: S(
|
|
1488
|
-
"onUpdate:modelValue": (e) => S(
|
|
1489
|
-
options: S(
|
|
1499
|
+
])]), s(S(te), {
|
|
1500
|
+
modelValue: S(q)[m].listFilter.selectedValue,
|
|
1501
|
+
"onUpdate:modelValue": (e) => S(q)[m].listFilter.selectedValue = e,
|
|
1502
|
+
options: S(q)[m].listFilter.listOptions,
|
|
1490
1503
|
onChange: S(I)
|
|
1491
1504
|
}, null, 8, [
|
|
1492
1505
|
"modelValue",
|
|
@@ -1494,12 +1507,12 @@ var _e = (e) => {
|
|
|
1494
1507
|
"options",
|
|
1495
1508
|
"onChange"
|
|
1496
1509
|
])], 4)) : r("", !0),
|
|
1497
|
-
a("div",
|
|
1510
|
+
a("div", H, [
|
|
1498
1511
|
s(S(O), {
|
|
1499
1512
|
type: "primary",
|
|
1500
1513
|
size: "small",
|
|
1501
1514
|
mode: "text",
|
|
1502
|
-
onClick: (e) => S(
|
|
1515
|
+
onClick: (e) => S(st)(f.field)
|
|
1503
1516
|
}, {
|
|
1504
1517
|
default: T(() => [...d[4] ||= [o(" 筛选 ", -1)]]),
|
|
1505
1518
|
_: 1
|
|
@@ -1508,7 +1521,7 @@ var _e = (e) => {
|
|
|
1508
1521
|
type: "primary",
|
|
1509
1522
|
size: "small",
|
|
1510
1523
|
mode: "text",
|
|
1511
|
-
onClick: (e) => S(
|
|
1524
|
+
onClick: (e) => S(J)(f.field)
|
|
1512
1525
|
}, {
|
|
1513
1526
|
default: T(() => [...d[5] ||= [o(" 重置 ", -1)]]),
|
|
1514
1527
|
_: 1
|
|
@@ -1517,13 +1530,13 @@ var _e = (e) => {
|
|
|
1517
1530
|
type: "primary",
|
|
1518
1531
|
size: "small",
|
|
1519
1532
|
mode: "text",
|
|
1520
|
-
onClick: d[0] ||= (e) => S(
|
|
1533
|
+
onClick: d[0] ||= (e) => S(J)()
|
|
1521
1534
|
}, {
|
|
1522
1535
|
default: T(() => [...d[6] ||= [o(" 重置所有 ", -1)]]),
|
|
1523
1536
|
_: 1
|
|
1524
1537
|
})
|
|
1525
1538
|
])
|
|
1526
|
-
], 12,
|
|
1539
|
+
], 12, Te)])) : r("", !0)])) : r("", !0)
|
|
1527
1540
|
])) : (h(), i("span", Se)), f?.resizable && !f.children?.length ? (h(), i("div", {
|
|
1528
1541
|
key: 4,
|
|
1529
1542
|
style: {
|
|
@@ -1535,7 +1548,7 @@ var _e = (e) => {
|
|
|
1535
1548
|
cursor: "col-resize"
|
|
1536
1549
|
},
|
|
1537
1550
|
onMousedown: D((e) => S(X)(e, f), ["prevent", "stop"])
|
|
1538
|
-
}, null, 40,
|
|
1551
|
+
}, null, 40, Ae)) : r("", !0)], 12, xe))), 128))], 64))), 128))], 4),
|
|
1539
1552
|
S(M).length == 0 ? (h(), i("div", {
|
|
1540
1553
|
key: 0,
|
|
1541
1554
|
style: u([{
|
|
@@ -1570,7 +1583,7 @@ var _e = (e) => {
|
|
|
1570
1583
|
}, [a("div", { style: u({
|
|
1571
1584
|
position: "sticky",
|
|
1572
1585
|
left: p.expandConfig?.mode == "inside" ? "0px" : void 0,
|
|
1573
|
-
width: p.expandConfig?.mode == "inside" ? `${S(
|
|
1586
|
+
width: p.expandConfig?.mode == "inside" ? `${S(ht) - 15}px` : "100%"
|
|
1574
1587
|
}) }, [v(c.$slots, p.expandConfig?.slotName, {
|
|
1575
1588
|
row: t,
|
|
1576
1589
|
rowIndex: d
|
|
@@ -1586,46 +1599,46 @@ var _e = (e) => {
|
|
|
1586
1599
|
}, [(h(!0), i(e, null, _(S(N), (f, g) => (h(), i("div", {
|
|
1587
1600
|
key: "item_" + f.field,
|
|
1588
1601
|
class: l(["pretextTable-grid-item pretextTable-flex-align-items-center", {
|
|
1589
|
-
"pretextTable-grid-item-hover": p.rowConfig?.isHover && S(
|
|
1590
|
-
"pretextTable-grid-item-current": p.rowConfig?.isCurrent && S(
|
|
1602
|
+
"pretextTable-grid-item-hover": p.rowConfig?.isHover && S(Ge)[S(m).id] == t[S(m).id],
|
|
1603
|
+
"pretextTable-grid-item-current": p.rowConfig?.isCurrent && S(He)[S(m).id] == t[S(m).id],
|
|
1591
1604
|
"pretextTable-grid-item-stripe": p.stripe && t[S(m).stripe]
|
|
1592
1605
|
}]),
|
|
1593
1606
|
style: u({
|
|
1594
|
-
fontWeight: S(
|
|
1595
|
-
fontSize: S(
|
|
1607
|
+
fontWeight: S(U).fontWeight,
|
|
1608
|
+
fontSize: S(U).fontSize,
|
|
1596
1609
|
zIndex: +(f.fixed == "left" || f.fixed == "right"),
|
|
1597
1610
|
position: f.fixed == "left" || f.fixed == "right" ? "sticky" : "static",
|
|
1598
|
-
left: f.fixed == "left" ? S(
|
|
1599
|
-
right: f.fixed == "right" ? S(
|
|
1611
|
+
left: f.fixed == "left" ? S(Ve)[g] : "",
|
|
1612
|
+
right: f.fixed == "right" ? S(G)[g] : "",
|
|
1600
1613
|
borderLeft: f.fixed == "right" ? "1px solid var(--pretextTable-border-color)" : "",
|
|
1601
|
-
boxShadow: f.fixed == "left" && g == S(
|
|
1614
|
+
boxShadow: f.fixed == "left" && g == S(W) ? "var(--pretextTable-shadow-color) 2px 0px 5px -1px" : f.fixed == "right" && g == S(Be) ? "var(--pretextTable-shadow-color) -2px 0px 5px -1px" : "",
|
|
1602
1615
|
height: `${t[S(m).height]}px`,
|
|
1603
1616
|
justifyContent: f.type == "checkbox" ? "center" : ""
|
|
1604
1617
|
}),
|
|
1605
|
-
onClick: (e) => S(
|
|
1606
|
-
onMouseenter: (e) => S(
|
|
1607
|
-
}, [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(
|
|
1608
|
-
E(s(S(
|
|
1618
|
+
onClick: (e) => S(Ue)(t, f),
|
|
1619
|
+
onMouseenter: (e) => S(Ke)(t)
|
|
1620
|
+
}, [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(ft).indent) + "px" }) }, null, 4), p.treeConfig?.showIcon === !1 ? r("", !0) : (h(), i(e, { key: 0 }, [t[p.treeConfig?.childrenField || S(ft).childrenField]?.length > 0 || p.treeConfig?.lazy && t[p.treeConfig?.hasChildField || S(ft).hasChildField] ? (h(), i(e, { key: 0 }, [
|
|
1621
|
+
E(s(S(A), {
|
|
1609
1622
|
name: "spinner",
|
|
1610
1623
|
roll: ""
|
|
1611
1624
|
}, null, 512), [[C, t[S(m).lazyLoading]]]),
|
|
1612
|
-
E(s(S(
|
|
1625
|
+
E(s(S(A), {
|
|
1613
1626
|
name: "caret-right",
|
|
1614
1627
|
style: {},
|
|
1615
1628
|
class: "pretextTable-icon",
|
|
1616
1629
|
onClick: D((e) => S(Z)([t], !0), ["stop"])
|
|
1617
1630
|
}, null, 8, ["onClick"]), [[C, !t[S(m).isCollapsed] && !t[S(m).lazyLoading]]]),
|
|
1618
|
-
E(s(S(
|
|
1631
|
+
E(s(S(A), {
|
|
1619
1632
|
name: "caret-down",
|
|
1620
1633
|
style: {},
|
|
1621
1634
|
class: "pretextTable-icon",
|
|
1622
1635
|
onClick: D((e) => S(Z)([t], !1), ["stop"])
|
|
1623
1636
|
}, null, 8, ["onClick"]), [[C, t[S(m).isCollapsed] && !t[S(m).lazyLoading]]])
|
|
1624
|
-
], 64)) : r("", !0)], 64))], 64)) : r("", !0), f.type == "checkbox" ? (h(), n(S(
|
|
1637
|
+
], 64)) : r("", !0)], 64))], 64)) : r("", !0), f.type == "checkbox" ? (h(), n(S(k), {
|
|
1625
1638
|
key: 1,
|
|
1626
1639
|
modelValue: t[f.field],
|
|
1627
1640
|
indeterminate: t[S(m).checkedIndeterminate + f.field],
|
|
1628
|
-
onChange: (e) => S(
|
|
1641
|
+
onChange: (e) => S(Xe)(t, f.field)
|
|
1629
1642
|
}, null, 8, [
|
|
1630
1643
|
"modelValue",
|
|
1631
1644
|
"indeterminate",
|
|
@@ -1633,17 +1646,17 @@ var _e = (e) => {
|
|
|
1633
1646
|
])) : f.type == "seq" ? (h(), i(e, { key: 2 }, [p.treeConfig?.isOpenTree ? (h(), i("span", {
|
|
1634
1647
|
key: 0,
|
|
1635
1648
|
style: u({ marginLeft: `${(Number(t[S(m).level]) - 1) * (p.treeConfig?.indent || 20)}px` })
|
|
1636
|
-
}, null, 4)) : r("", !0), o(" " + b(t.pretextSeq), 1)], 64)) : f.type == "expand" ? (h(), i("span",
|
|
1649
|
+
}, null, 4)) : r("", !0), o(" " + b(t.pretextSeq), 1)], 64)) : f.type == "expand" ? (h(), i("span", Me, [E(s(S(A), {
|
|
1637
1650
|
name: "arrow-right",
|
|
1638
1651
|
style: {},
|
|
1639
1652
|
class: "pretextTable-icon",
|
|
1640
|
-
onClick: D((e) => S(
|
|
1641
|
-
}, null, 8, ["onClick"]), [[C, !t[S(m).isRowExpanded]]]), E(s(S(
|
|
1653
|
+
onClick: D((e) => S(Q)([t], !0), ["stop"])
|
|
1654
|
+
}, null, 8, ["onClick"]), [[C, !t[S(m).isRowExpanded]]]), E(s(S(A), {
|
|
1642
1655
|
name: "arrow-down",
|
|
1643
1656
|
style: {},
|
|
1644
1657
|
class: "pretextTable-icon",
|
|
1645
|
-
onClick: D((e) => S(
|
|
1646
|
-
}, null, 8, ["onClick"]), [[C, t[S(m).isRowExpanded]]])])) : f.slots?.defaultType == "a" ? (h(), i("a",
|
|
1658
|
+
onClick: D((e) => S(Q)([t], !1), ["stop"])
|
|
1659
|
+
}, 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), {
|
|
1647
1660
|
key: 0,
|
|
1648
1661
|
size: "mini",
|
|
1649
1662
|
border: !0,
|
|
@@ -1657,11 +1670,11 @@ var _e = (e) => {
|
|
|
1657
1670
|
"status",
|
|
1658
1671
|
"color",
|
|
1659
1672
|
"style"
|
|
1660
|
-
])) : r("", !0)], 64))), 256))])) : f.slots?.defaultType == "icon" ? E((h(), n(S(
|
|
1673
|
+
])) : r("", !0)], 64))), 256))])) : f.slots?.defaultType == "icon" ? E((h(), n(S(A), {
|
|
1661
1674
|
key: 6,
|
|
1662
1675
|
name: f.slots?.defaultProps?.icon?.name,
|
|
1663
1676
|
style: u(f.slots?.defaultProps?.icon?.style || {})
|
|
1664
|
-
}, 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",
|
|
1677
|
+
}, 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", {
|
|
1665
1678
|
key: 0,
|
|
1666
1679
|
title: n.tip || ""
|
|
1667
1680
|
}, [s(S(O), {
|
|
@@ -1683,7 +1696,7 @@ var _e = (e) => {
|
|
|
1683
1696
|
"disabled",
|
|
1684
1697
|
"loading",
|
|
1685
1698
|
"onClick"
|
|
1686
|
-
])], 8,
|
|
1699
|
+
])], 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), {
|
|
1687
1700
|
key: 0,
|
|
1688
1701
|
size: "mini",
|
|
1689
1702
|
modelValue: t[f.field],
|
|
@@ -1703,16 +1716,24 @@ var _e = (e) => {
|
|
|
1703
1716
|
"disabled",
|
|
1704
1717
|
"loading",
|
|
1705
1718
|
"onChange"
|
|
1706
|
-
])) : r("", !0)], 64)) : (h(), i("span", {
|
|
1707
|
-
|
|
1719
|
+
])) : r("", !0)], 64)) : f.slots?.defaultType == "checkbox" ? (h(), i("span", Le, [s(S(k), {
|
|
1720
|
+
modelValue: t[f.field],
|
|
1721
|
+
indeterminate: f.slots?.defaultProps?.checkbox?.checkedIndeterminateField ? t[f.slots?.defaultProps?.checkbox?.checkedIndeterminateField] : !1,
|
|
1722
|
+
onChange: (e) => f.slots?.defaultProps?.checkbox?.onChange?.(t, g)
|
|
1723
|
+
}, null, 8, [
|
|
1724
|
+
"modelValue",
|
|
1725
|
+
"indeterminate",
|
|
1726
|
+
"onChange"
|
|
1727
|
+
])])) : (h(), i("span", {
|
|
1728
|
+
key: 10,
|
|
1708
1729
|
class: l({ "pretextTable-text-ellipsis": !!p.showOverflow }),
|
|
1709
1730
|
title: p.showOverflow && t[f.field] || ""
|
|
1710
|
-
}, [f.slots?.default ? (h(), i(e, { key: 0 }, [!p.lazyLoadSlot || t.slotShowTimestamp == S(
|
|
1731
|
+
}, [f.slots?.default ? (h(), i(e, { key: 0 }, [!p.lazyLoadSlot || t.slotShowTimestamp == S(pt) ? v(c.$slots, f.slots?.default, {
|
|
1711
1732
|
key: 0,
|
|
1712
1733
|
row: t,
|
|
1713
1734
|
column: f,
|
|
1714
1735
|
rowIndex: d
|
|
1715
|
-
}, () => [o(b(t[f.field] ?? ""), 1)]) : r("", !0)], 64)) : (h(), i(e, { key: 1 }, [o(b(t[f.field] ?? ""), 1)], 64))], 10,
|
|
1736
|
+
}, () => [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),
|
|
1716
1737
|
p.showFooter && S(L).length > 0 ? (h(), i("div", {
|
|
1717
1738
|
key: 1,
|
|
1718
1739
|
style: u([{
|
|
@@ -1731,10 +1752,10 @@ var _e = (e) => {
|
|
|
1731
1752
|
style: u({
|
|
1732
1753
|
fontSize: S(he).fontSize,
|
|
1733
1754
|
zIndex: t == 0 ? 3 : e.fixed == "left" || e.fixed == "right" ? 2 : 1,
|
|
1734
|
-
left: e.fixed == "left" ? S(
|
|
1735
|
-
right: e.fixed == "right" ? S(
|
|
1755
|
+
left: e.fixed == "left" ? S(Ve)[t] : "",
|
|
1756
|
+
right: e.fixed == "right" ? S(G)[t] : "",
|
|
1736
1757
|
borderLeft: e.fixed == "right" ? "1px solid var(--pretextTable-border-color)" : "",
|
|
1737
|
-
boxShadow: e.fixed == "left" && t == S(
|
|
1758
|
+
boxShadow: e.fixed == "left" && t == S(W) ? "var(--pretextTable-shadow-color) 2px 0px 5px -1px" : e.fixed == "right" && t == S(Be) ? "var(--pretextTable-shadow-color) -2px 0px 5px -1px" : "",
|
|
1738
1759
|
height: `${e.height}px`,
|
|
1739
1760
|
maxHeight: `${e.height}px`
|
|
1740
1761
|
})
|
|
@@ -1743,7 +1764,7 @@ var _e = (e) => {
|
|
|
1743
1764
|
footerColumn: e,
|
|
1744
1765
|
footerData: e.data,
|
|
1745
1766
|
footerRowIndex: t
|
|
1746
|
-
}, () => [o(b(e.data ?? ""), 1)]) : (h(), i("span",
|
|
1767
|
+
}, () => [o(b(e.data ?? ""), 1)]) : (h(), i("span", ze, b(e.data ?? ""), 1))], 4))), 128))], 64))), 256))], 4)) : r("", !0)
|
|
1747
1768
|
], 36),
|
|
1748
1769
|
E(a("div", { style: u([{
|
|
1749
1770
|
position: "absolute",
|
|
@@ -1754,15 +1775,15 @@ var _e = (e) => {
|
|
|
1754
1775
|
"z-index": "99999",
|
|
1755
1776
|
"box-shadow": "0 0 2px rgba(64, 158, 255, 0.5)"
|
|
1756
1777
|
}, {
|
|
1757
|
-
transform: `translateX(${S(
|
|
1778
|
+
transform: `translateX(${S(Y)}px)`,
|
|
1758
1779
|
height: S($) + "px"
|
|
1759
|
-
}]) }, null, 4), [[C, S(
|
|
1760
|
-
a("div", { style: u({ backgroundColor: S(
|
|
1780
|
+
}]) }, null, 4), [[C, S(lt)]]),
|
|
1781
|
+
a("div", { style: u({ backgroundColor: S(mt) ? "red" : "" }) }, null, 4)
|
|
1761
1782
|
], 512));
|
|
1762
1783
|
}
|
|
1763
|
-
}),
|
|
1764
|
-
|
|
1765
|
-
e.component("HolyesTable",
|
|
1784
|
+
}), W = U;
|
|
1785
|
+
W.install = (e) => {
|
|
1786
|
+
e.component("HolyesTable", W);
|
|
1766
1787
|
};
|
|
1767
1788
|
//#endregion
|
|
1768
|
-
export {
|
|
1789
|
+
export { W as default, U as pretextTable };
|