holyes-table 1.0.31 → 1.0.32
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 +372 -354
- package/dist/{lib/pretextTable → pretextTable}/pretextTable.vue.d.ts +1 -0
- package/dist/{lib/pretextTable → pretextTable}/useHolyesTable.d.ts +1 -0
- package/package.json +1 -1
- package//346/233/264/346/226/260/346/227/245/345/277/227.md +4 -0
- /package/dist/{lib/main.d.ts → main.d.ts} +0 -0
- /package/dist/{lib/pretextTable → pretextTable}/config.d.ts +0 -0
- /package/dist/{lib/pretextTable → pretextTable}/hook/useCheckbox.d.ts +0 -0
- /package/dist/{lib/pretextTable → pretextTable}/hook/useExpand.d.ts +0 -0
- /package/dist/{lib/pretextTable → pretextTable}/hook/useFilter.d.ts +0 -0
- /package/dist/{lib/pretextTable → pretextTable}/hook/useFooter.d.ts +0 -0
- /package/dist/{lib/pretextTable → pretextTable}/hook/useGridStyles.d.ts +0 -0
- /package/dist/{lib/pretextTable → pretextTable}/hook/useHeader.d.ts +0 -0
- /package/dist/{lib/pretextTable → pretextTable}/hook/useHeaderResize.d.ts +0 -0
- /package/dist/{lib/pretextTable → pretextTable}/hook/useSort.d.ts +0 -0
- /package/dist/{lib/pretextTable → pretextTable}/hook/useTree.d.ts +0 -0
- /package/dist/{lib/pretextTable → pretextTable}/type.d.ts +0 -0
- /package/dist/{lib/pretextTable → pretextTable}/utils/index.d.ts +0 -0
- /package/dist/{lib/pretextTable → pretextTable}/worker/pretextTableGetItemHeight.d.ts +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
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
|
|
3
|
-
import
|
|
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 j, VxeSwitch as ae, VxeTag as oe } from "vxe-pc-ui";
|
|
3
|
+
import M, { debounce as se, isNaN as N, orderBy as ce, toArrayTree as P } from "xe-utils";
|
|
4
4
|
//#region lib/pretextTable/worker/pretextTableGetItemHeight.ts?worker&inline
|
|
5
|
-
var
|
|
6
|
-
function
|
|
5
|
+
var F = "(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()}})();", le = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", F], { type: "text/javascript;charset=utf-8" });
|
|
6
|
+
function ue(e) {
|
|
7
7
|
let t;
|
|
8
8
|
try {
|
|
9
|
-
if (t =
|
|
9
|
+
if (t = le && (self.URL || self.webkitURL).createObjectURL(le), !t) throw "";
|
|
10
10
|
let n = new Worker(t, { name: e?.name });
|
|
11
11
|
return n.addEventListener("error", () => {
|
|
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(F), { name: e?.name });
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region lib/pretextTable/hook/useHeader.ts
|
|
20
|
-
function
|
|
20
|
+
function de(e) {
|
|
21
21
|
let { pretextTableRef: t } = e, n = g(0), r = {
|
|
22
22
|
fontWeight: "600",
|
|
23
23
|
fontSize: "14px"
|
|
@@ -68,7 +68,7 @@ function fe(e) {
|
|
|
68
68
|
}
|
|
69
69
|
//#endregion
|
|
70
70
|
//#region lib/pretextTable/hook/useGridStyles.ts
|
|
71
|
-
var
|
|
71
|
+
var fe = (e) => {
|
|
72
72
|
let t = g([]), n = g([]), r = g(-1), i = g(-1), a = g("");
|
|
73
73
|
return {
|
|
74
74
|
fixedColumnsLeft: t,
|
|
@@ -93,7 +93,7 @@ var pe = (e) => {
|
|
|
93
93
|
a.value = o, t.value = s, n.value = c, r.value = l, i.value = u;
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
|
-
},
|
|
96
|
+
}, I = {
|
|
97
97
|
id: "pretextId",
|
|
98
98
|
seq: "pretextSeq",
|
|
99
99
|
stripe: "pretextStripe",
|
|
@@ -108,7 +108,7 @@ var pe = (e) => {
|
|
|
108
108
|
expandChildren: "pretextExpandChildren",
|
|
109
109
|
parentRow: "pretextParentRow",
|
|
110
110
|
checkedIndeterminate: "pretextCheckedIndeterminate_"
|
|
111
|
-
},
|
|
111
|
+
}, L = {
|
|
112
112
|
isOpenTree: !1,
|
|
113
113
|
transform: !0,
|
|
114
114
|
idField: "id",
|
|
@@ -123,8 +123,8 @@ var pe = (e) => {
|
|
|
123
123
|
};
|
|
124
124
|
//#endregion
|
|
125
125
|
//#region lib/pretextTable/hook/useCheckbox.ts
|
|
126
|
-
function
|
|
127
|
-
let { columns: t, blurAnyElement: n, nowDataSource: r, baseDataSource: i, baseDataMap: a, emits: o, treeConfig: s } = e, c = s?.isOpenTree ??
|
|
126
|
+
function pe(e) {
|
|
127
|
+
let { columns: t, blurAnyElement: n, nowDataSource: r, baseDataSource: i, baseDataMap: a, emits: o, treeConfig: s } = e, c = s?.isOpenTree ?? L.isOpenTree, l = I.filterChildren, u = s?.childrenField ?? L.childrenField, d = s?.checkStrictly ?? L.checkStrictly, f = [], p = () => {
|
|
128
128
|
f = [];
|
|
129
129
|
for (let e of t.value) e.type == "checkbox" && f.push(e.field);
|
|
130
130
|
return f;
|
|
@@ -142,7 +142,7 @@ function me(e) {
|
|
|
142
142
|
}, v = (e) => {
|
|
143
143
|
let t = {}, n = [];
|
|
144
144
|
if (e ? n.push(e) : n = p(), d) {
|
|
145
|
-
for (let e of r.value) for (let r of n) e[
|
|
145
|
+
for (let e of r.value) for (let r of n) e[I.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) {
|
|
@@ -182,30 +182,30 @@ function me(e) {
|
|
|
182
182
|
if (!c || !d) return;
|
|
183
183
|
let n = t ?? f[0];
|
|
184
184
|
if (!e) return;
|
|
185
|
-
let r = a.get(e?.[
|
|
185
|
+
let r = a.get(e?.[I.parentRow]) || null, i = [];
|
|
186
186
|
e?.[l]?.length ? i = e[l] : e?.[u]?.length && (i = e[u]);
|
|
187
187
|
let o = 0, s = 0;
|
|
188
188
|
if (i.length) {
|
|
189
|
-
for (let e of i) e[n] && o++, e[
|
|
189
|
+
for (let e of i) e[n] && o++, e[I.checkedIndeterminate + n] && s++;
|
|
190
190
|
switch (!0) {
|
|
191
191
|
case o == 0 && s == 0:
|
|
192
|
-
e[n] = !1, e[
|
|
192
|
+
e[n] = !1, e[I.checkedIndeterminate + n] = !1;
|
|
193
193
|
break;
|
|
194
194
|
case o == i.length && s == 0:
|
|
195
|
-
e[n] = !0, e[
|
|
195
|
+
e[n] = !0, e[I.checkedIndeterminate + n] = !1;
|
|
196
196
|
break;
|
|
197
197
|
default:
|
|
198
|
-
e[n] = !1, e[
|
|
198
|
+
e[n] = !1, e[I.checkedIndeterminate + n] = !0;
|
|
199
199
|
break;
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
y(r, n);
|
|
203
203
|
}, b = (e, t, n) => {
|
|
204
204
|
let r = n ?? f[0];
|
|
205
|
-
for (let n of e) n[r] = t, n[
|
|
205
|
+
for (let n of e) n[r] = t, n[I.checkedIndeterminate + r] = !1, c && d && (n[l]?.length ? b(n[l], t, r) : n[u]?.length && b(n[u], t, r));
|
|
206
206
|
}, x = (e, t, n) => {
|
|
207
207
|
let r = n ?? f[0];
|
|
208
|
-
for (let n of e) n[r] = t, n[
|
|
208
|
+
for (let n of e) n[r] = t, n[I.checkedIndeterminate + r] = !1, c && (n[l]?.length ? x(n[l], t, r) : n[u]?.length && x(n[u], t, r));
|
|
209
209
|
};
|
|
210
210
|
return {
|
|
211
211
|
getCheckField: p,
|
|
@@ -219,8 +219,8 @@ function me(e) {
|
|
|
219
219
|
let r = [];
|
|
220
220
|
if (n?.[l]?.length ? r = n[l] : n?.[u]?.length && (r = n[u]), r.length) for (let e of r) t(e);
|
|
221
221
|
else {
|
|
222
|
-
let t = a.get(n?.[
|
|
223
|
-
t && e.set(t[
|
|
222
|
+
let t = a.get(n?.[I.parentRow]) || null;
|
|
223
|
+
t && e.set(t[I.id], t);
|
|
224
224
|
}
|
|
225
225
|
}, n = r.value;
|
|
226
226
|
for (let e of n) t(e);
|
|
@@ -257,7 +257,7 @@ function me(e) {
|
|
|
257
257
|
}
|
|
258
258
|
//#endregion
|
|
259
259
|
//#region lib/pretextTable/hook/useSort.ts
|
|
260
|
-
function
|
|
260
|
+
function me(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) {
|
|
@@ -293,7 +293,14 @@ function he(e) {
|
|
|
293
293
|
}
|
|
294
294
|
return r;
|
|
295
295
|
}, f = () => {
|
|
296
|
-
l.value === null
|
|
296
|
+
if (l.value === null) {
|
|
297
|
+
let e = d(t.value, I.index, "asc");
|
|
298
|
+
r(e);
|
|
299
|
+
} else {
|
|
300
|
+
let e = d(t.value, c, l.value);
|
|
301
|
+
r(e);
|
|
302
|
+
}
|
|
303
|
+
n();
|
|
297
304
|
};
|
|
298
305
|
return {
|
|
299
306
|
sortField: s,
|
|
@@ -304,7 +311,7 @@ function he(e) {
|
|
|
304
311
|
}
|
|
305
312
|
//#endregion
|
|
306
313
|
//#region lib/pretextTable/hook/useFilter.ts
|
|
307
|
-
function
|
|
314
|
+
function he(e) {
|
|
308
315
|
let { columns: t, baseDataSource: n, setNowDataSource: r, scrollTo: i, refresh: a, afterFilter: o, treeConfig: s, defaultTreeConfig: c } = e, l = [{
|
|
309
316
|
label: "模糊搜索",
|
|
310
317
|
value: "模糊"
|
|
@@ -459,14 +466,14 @@ function ge(e) {
|
|
|
459
466
|
let e = w(r, t);
|
|
460
467
|
e.isFind && (i.push(e.newRow), n = !0);
|
|
461
468
|
}
|
|
462
|
-
return r[
|
|
469
|
+
return r[I.filterChildren] = i, {
|
|
463
470
|
isFind: n,
|
|
464
471
|
newRow: r
|
|
465
472
|
};
|
|
466
473
|
}, T = (e) => {
|
|
467
474
|
let t = s.childrenField || c.childrenField;
|
|
468
475
|
if (e[t]?.length) for (let n of e[t]) T(n);
|
|
469
|
-
e[
|
|
476
|
+
e[I.filterChildren] = [];
|
|
470
477
|
}, E = () => {
|
|
471
478
|
let e = [];
|
|
472
479
|
baseDataSourceFor: for (let t of n.value) {
|
|
@@ -501,7 +508,7 @@ function ge(e) {
|
|
|
501
508
|
}
|
|
502
509
|
//#endregion
|
|
503
510
|
//#region lib/pretextTable/hook/useHeaderResize.ts
|
|
504
|
-
var
|
|
511
|
+
var ge = (e) => {
|
|
505
512
|
let { pretextTableRef: t, afterResize: n } = e, r = g(!1), i = 0, a = g(0), o = 0, s = 0, c = null, l = (e, n) => {
|
|
506
513
|
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
514
|
}, u = null, d = (e) => {
|
|
@@ -523,7 +530,7 @@ var _e = (e) => {
|
|
|
523
530
|
dragLineLeft: a,
|
|
524
531
|
startResize: l
|
|
525
532
|
};
|
|
526
|
-
},
|
|
533
|
+
}, _e = (e) => {
|
|
527
534
|
let { showFooter: t, nowDataSource: n, columns: r } = e, i = g(0), a = g([]), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = (e) => {
|
|
528
535
|
if (s.clear(), !t) {
|
|
529
536
|
i.value = 0;
|
|
@@ -580,15 +587,15 @@ var _e = (e) => {
|
|
|
580
587
|
case i?.type === "合计":
|
|
581
588
|
let n = t[e], r = 0;
|
|
582
589
|
if (o.get(e) || []) {
|
|
583
|
-
switch (r = Number(i.data) +
|
|
590
|
+
switch (r = Number(i.data) + M.toNumber(n), i?.dataType) {
|
|
584
591
|
case "number0":
|
|
585
|
-
r =
|
|
592
|
+
r = M.toFixed(r, 0);
|
|
586
593
|
break;
|
|
587
594
|
case "number1":
|
|
588
|
-
r =
|
|
595
|
+
r = M.toFixed(r, 1);
|
|
589
596
|
break;
|
|
590
597
|
case "number2":
|
|
591
|
-
r =
|
|
598
|
+
r = M.toFixed(r, 2);
|
|
592
599
|
break;
|
|
593
600
|
default: break;
|
|
594
601
|
}
|
|
@@ -622,19 +629,19 @@ var _e = (e) => {
|
|
|
622
629
|
}
|
|
623
630
|
}
|
|
624
631
|
};
|
|
625
|
-
},
|
|
626
|
-
let { treeConfig: t, afterTreeExpand: n, insertChild: r } = e, i = t?.idField ||
|
|
627
|
-
let r = t?.childrenField ||
|
|
628
|
-
for (let t of e) s.get(t[i]) && (t[
|
|
632
|
+
}, ve = (e) => {
|
|
633
|
+
let { treeConfig: t, afterTreeExpand: n, insertChild: r } = e, i = t?.idField || L.idField, a = t?.parentField || L.parentField, o = t?.childrenField || L.childrenField, s = /* @__PURE__ */ new Map(), c = (e, n = !1) => {
|
|
634
|
+
let r = t?.childrenField || L.childrenField, i = t?.idField || I.id || "";
|
|
635
|
+
for (let t of e) s.get(t[i]) && (t[I.isCollapsed] = !0), n && t[r]?.length && c(t[r], !0);
|
|
629
636
|
};
|
|
630
637
|
return {
|
|
631
|
-
defaultTreeConfig:
|
|
638
|
+
defaultTreeConfig: L,
|
|
632
639
|
treeExpandMap: s,
|
|
633
640
|
handleTree: (e) => {
|
|
634
641
|
if (t?.reserve ? t?.idField || (console.error("当前设置了treeConfig.reserve, 请设置idField, 用于保留展开状态"), s.clear()) : s.clear(), !t?.isOpenTree) return e;
|
|
635
642
|
let n = (e) => {
|
|
636
643
|
let t = e?.[o] || [];
|
|
637
|
-
for (let r of t) r[
|
|
644
|
+
for (let r of t) r[I.parentRow] = e[I.id], n(r);
|
|
638
645
|
}, r = e;
|
|
639
646
|
if (t?.transform) t?.reserve && c(r, !1);
|
|
640
647
|
else {
|
|
@@ -642,7 +649,7 @@ var _e = (e) => {
|
|
|
642
649
|
for (let e of r) n(e);
|
|
643
650
|
return r;
|
|
644
651
|
}
|
|
645
|
-
r =
|
|
652
|
+
r = P(r, {
|
|
646
653
|
key: i,
|
|
647
654
|
parentKey: a,
|
|
648
655
|
children: o
|
|
@@ -651,27 +658,27 @@ var _e = (e) => {
|
|
|
651
658
|
return r;
|
|
652
659
|
},
|
|
653
660
|
setTreeExpand: async (e, i) => {
|
|
654
|
-
let a = t?.hasChildField ||
|
|
655
|
-
for (let n of e) if (n[
|
|
661
|
+
let a = t?.hasChildField || L.hasChildField, o = t?.childrenField || L.childrenField, c = t?.idField || I.id;
|
|
662
|
+
for (let n of e) if (n[I.isCollapsed] = i, i) {
|
|
656
663
|
if (s.set(n[c], n), t?.lazy && n[a] && !n[o]?.length) {
|
|
657
|
-
n[
|
|
664
|
+
n[I.lazyLoading] = !0;
|
|
658
665
|
try {
|
|
659
666
|
let e = await t?.loadMethod?.({ row: n }) || [];
|
|
660
667
|
Array.isArray(e) || (console.warn("懒加载loadMethod 返回的不是数组", e), e = []), await r(e, n);
|
|
661
668
|
} catch (e) {
|
|
662
669
|
console.error("加载子节点失败", n, e);
|
|
663
670
|
} finally {
|
|
664
|
-
n[
|
|
671
|
+
n[I.lazyLoading] = !1;
|
|
665
672
|
}
|
|
666
673
|
}
|
|
667
674
|
} else s.delete(n[c]);
|
|
668
675
|
n(e, i);
|
|
669
676
|
}
|
|
670
677
|
};
|
|
671
|
-
},
|
|
678
|
+
}, R = () => {
|
|
672
679
|
let e = document.activeElement;
|
|
673
680
|
e?.blur && e.blur();
|
|
674
|
-
},
|
|
681
|
+
}, ye = (e) => {
|
|
675
682
|
let { expandConfig: t, afterRowExpand: n, insertExpandRow: r } = e, i = {
|
|
676
683
|
transform: !0,
|
|
677
684
|
parentField: "parentId",
|
|
@@ -694,11 +701,11 @@ var _e = (e) => {
|
|
|
694
701
|
}
|
|
695
702
|
},
|
|
696
703
|
setRowExpand: (e, t) => {
|
|
697
|
-
for (let n of e) n[
|
|
704
|
+
for (let n of e) n[I.isRowExpanded] = t, t ? (a.set(n[I.id], n), r(n)) : a.delete(n[I.id]);
|
|
698
705
|
n(e, t);
|
|
699
706
|
}
|
|
700
707
|
};
|
|
701
|
-
},
|
|
708
|
+
}, z = (e) => {
|
|
702
709
|
let t = y([]), n = y([]), r = g(), i = g(), a = g(0), o = g(0), s = g(!1);
|
|
703
710
|
w(() => e.props.loading, (e) => {
|
|
704
711
|
s.value = e;
|
|
@@ -710,20 +717,20 @@ var _e = (e) => {
|
|
|
710
717
|
}, u = (e) => {
|
|
711
718
|
i.value?.scrollTo(e);
|
|
712
719
|
}, m = /* @__PURE__ */ new Map(), h = y([]), _ = y([]), v = [], b = /* @__PURE__ */ new Map(), S = (t) => {
|
|
713
|
-
b.clear(), _.value = t, v = [],
|
|
714
|
-
let n = 1, r = !1, i = 0, a = e.props.treeConfig?.childrenField ||
|
|
715
|
-
if (v.push(t), t[
|
|
720
|
+
b.clear(), _.value = t, v = [], re();
|
|
721
|
+
let n = 1, r = !1, i = 0, a = e.props.treeConfig?.childrenField || Y.childrenField, o = (t, n, r) => {
|
|
722
|
+
if (v.push(t), t[I.level] = r, e.props.treeConfig?.isOpenTree) {
|
|
716
723
|
let e = t?.[a] || [];
|
|
717
|
-
if (t?.[
|
|
724
|
+
if (t?.[I.filterChildren]?.length > 0 && (e = t[I.filterChildren]), e.length > 0 && t[I.isCollapsed]) {
|
|
718
725
|
let t = 1;
|
|
719
|
-
for (let i of e) i[
|
|
726
|
+
for (let i of e) i[I.stripe] = !1, i[I.seq] = n + "." + t, t++, o(i, i[I.seq], r + 1);
|
|
720
727
|
}
|
|
721
728
|
}
|
|
722
|
-
if (e.props.expandConfig?.isExpand && t[
|
|
729
|
+
if (e.props.expandConfig?.isExpand && t[I.expandChildren]?.length > 0 && t[I.isRowExpanded]) for (let e of t[I.expandChildren]) v.push(e);
|
|
723
730
|
};
|
|
724
|
-
for (let e of _.value) e[
|
|
731
|
+
for (let e of _.value) e[I.seq] = n, o(e, `${n}`, 1), n++, e[I.stripe] = r, r = !r;
|
|
725
732
|
let s = 1;
|
|
726
|
-
for (let e of v) i += e[
|
|
733
|
+
for (let e of v) i += e[I.height] || 0, b.set(s, {
|
|
727
734
|
totalHeight: i,
|
|
728
735
|
row: e
|
|
729
736
|
}), s++;
|
|
@@ -747,81 +754,81 @@ var _e = (e) => {
|
|
|
747
754
|
treeNode: t.treeNode || !1
|
|
748
755
|
});
|
|
749
756
|
}
|
|
750
|
-
let o = await
|
|
757
|
+
let o = await L({
|
|
751
758
|
tempData: n,
|
|
752
759
|
index: 0,
|
|
753
760
|
columns: a
|
|
754
761
|
});
|
|
755
762
|
if (o) {
|
|
756
|
-
|
|
757
|
-
let t = e.props.treeConfig?.childrenField ||
|
|
763
|
+
z(o.heightDatas);
|
|
764
|
+
let t = e.props.treeConfig?.childrenField || Y.childrenField;
|
|
758
765
|
i[t] = n;
|
|
759
766
|
}
|
|
760
767
|
}, T = (t) => {
|
|
761
768
|
let n = null;
|
|
762
|
-
if (n = typeof t == "string" ? m.get(t) : t, n[
|
|
769
|
+
if (n = typeof t == "string" ? m.get(t) : t, n[I.expandChildren]?.length) return;
|
|
763
770
|
let r = {
|
|
764
|
-
[
|
|
765
|
-
[
|
|
771
|
+
[I.isExpandRow]: !0,
|
|
772
|
+
[I.height]: e.props.expandConfig?.height || 0
|
|
766
773
|
};
|
|
767
|
-
Z([r]), n[
|
|
768
|
-
}, { headerHeight: E, headerStyles: ee, createHeader: D, headerRef: O, getHeaderRefHeight: k } =
|
|
774
|
+
Z([r]), n[I.expandChildren] = [r];
|
|
775
|
+
}, { headerHeight: E, headerStyles: ee, createHeader: D, headerRef: O, getHeaderRefHeight: k } = de({ pretextTableRef: r }), { footerHeight: te, footerColumns: A, getFooterHeight: ne, updateFooter: re, updateFooterCellLabel: ie } = _e({
|
|
769
776
|
showFooter: e.props.showFooter,
|
|
770
777
|
nowDataSource: _,
|
|
771
778
|
columns: t
|
|
772
|
-
}),
|
|
773
|
-
e == -1 && (e =
|
|
774
|
-
},
|
|
775
|
-
|
|
776
|
-
},
|
|
779
|
+
}), j = g(0), ae = g(0), oe = (e) => {
|
|
780
|
+
e == -1 && (e = ae.value), j.value = e;
|
|
781
|
+
}, M = (e) => {
|
|
782
|
+
ae.value = e;
|
|
783
|
+
}, N = () => {
|
|
777
784
|
let e = 0;
|
|
778
|
-
for (let t of v) e += t[
|
|
779
|
-
|
|
780
|
-
},
|
|
785
|
+
for (let t of v) e += t[I.height] || 0;
|
|
786
|
+
j.value = e;
|
|
787
|
+
}, ce = (e, t) => e ? isNaN(Number(e)) ? /^\d+px$/.test(e) ? e : t : e + "px" : t, P = {
|
|
781
788
|
fontWeight: "400",
|
|
782
|
-
fontSize:
|
|
783
|
-
paddingLeft:
|
|
784
|
-
},
|
|
785
|
-
let i = new
|
|
789
|
+
fontSize: ce(e.props.cellStyle?.fontSize, "14px"),
|
|
790
|
+
paddingLeft: ce(e.props.cellStyle?.paddingLeft, "0px")
|
|
791
|
+
}, F = !!e.props.showOverflow, le = e.props.cellMinHeight || 22, L = (t) => new Promise((n, r) => {
|
|
792
|
+
let i = new ue(), a = {
|
|
786
793
|
tempData: t.tempData,
|
|
787
794
|
index: t.index,
|
|
788
795
|
columns: t.columns,
|
|
789
796
|
commonStyles: " \"Microsoft YaHei\", \"微软雅黑\", sans-serif",
|
|
790
|
-
itemStyles:
|
|
797
|
+
itemStyles: P,
|
|
791
798
|
divLineHeight: 22,
|
|
792
|
-
keyNames:
|
|
793
|
-
isNoAutoWrap:
|
|
794
|
-
cellMinHeight:
|
|
799
|
+
keyNames: I,
|
|
800
|
+
isNoAutoWrap: F,
|
|
801
|
+
cellMinHeight: le,
|
|
795
802
|
treeConfig: {
|
|
796
803
|
...e.props.treeConfig,
|
|
797
804
|
loadMethod: void 0
|
|
798
805
|
},
|
|
799
|
-
defaultTreeConfig: { ...
|
|
806
|
+
defaultTreeConfig: { ...Y }
|
|
800
807
|
};
|
|
801
808
|
i.postMessage(a), i.onmessage = (e) => {
|
|
802
809
|
n(e.data), i.terminate();
|
|
803
810
|
}, i.onerror = (e) => {
|
|
804
811
|
r(e), i.terminate();
|
|
805
812
|
};
|
|
806
|
-
}),
|
|
813
|
+
}), z = (e) => {
|
|
807
814
|
for (let t of e) {
|
|
808
815
|
let e = m.get(t.id);
|
|
809
|
-
e && (e[
|
|
816
|
+
e && (e[I.height] = t.pretextHeight);
|
|
810
817
|
}
|
|
811
|
-
},
|
|
818
|
+
}, be = 0, B = !1, xe = async (e) => {
|
|
812
819
|
if (t.value?.length === 0) {
|
|
813
|
-
if (
|
|
820
|
+
if (be++, be > 50) {
|
|
814
821
|
console.error("表格没有设置 columns.value");
|
|
815
822
|
return;
|
|
816
823
|
}
|
|
817
824
|
setTimeout(() => {
|
|
818
|
-
|
|
825
|
+
xe(e);
|
|
819
826
|
}, 100);
|
|
820
827
|
return;
|
|
821
828
|
}
|
|
822
829
|
let n = 0;
|
|
823
830
|
if (e.length === 0) {
|
|
824
|
-
S(e),
|
|
831
|
+
S(e), N(), Oe.value = [];
|
|
825
832
|
return;
|
|
826
833
|
}
|
|
827
834
|
let r = [];
|
|
@@ -841,15 +848,15 @@ var _e = (e) => {
|
|
|
841
848
|
treeNode: t.treeNode || !1
|
|
842
849
|
});
|
|
843
850
|
}
|
|
844
|
-
if (e.length *
|
|
851
|
+
if (e.length * Se >= Ce) {
|
|
845
852
|
let t = 5e3;
|
|
846
|
-
|
|
847
|
-
let i = await
|
|
853
|
+
B = !0;
|
|
854
|
+
let i = await L({
|
|
848
855
|
tempData: e.slice(0, 100),
|
|
849
856
|
index: 0,
|
|
850
857
|
columns: r
|
|
851
858
|
});
|
|
852
|
-
i && (n += i.tempItemHeights,
|
|
859
|
+
i && (n += i.tempItemHeights, z(i.heightDatas), S(e), N(), U());
|
|
853
860
|
let a = [], o = Math.ceil((e.length - 100) / t / 2), s = o * 2, c = 0, l = 100;
|
|
854
861
|
for (let n = 1; n <= o; n++) for (let n = 0; n < 2; n++) a[n] || (a[n] = []), a[n].push({
|
|
855
862
|
tempI: l,
|
|
@@ -862,48 +869,48 @@ var _e = (e) => {
|
|
|
862
869
|
c++;
|
|
863
870
|
continue;
|
|
864
871
|
}
|
|
865
|
-
let t = await
|
|
872
|
+
let t = await L({
|
|
866
873
|
tempData: i.tempData,
|
|
867
874
|
index: i.tempI,
|
|
868
875
|
columns: r
|
|
869
876
|
});
|
|
870
|
-
t && (n += t.tempItemHeights,
|
|
877
|
+
t && (n += t.tempItemHeights, M(n), oe(n), c++, z(t.heightDatas), c == s && (S(e), N(), B = !1));
|
|
871
878
|
}
|
|
872
879
|
};
|
|
873
880
|
for (let e of a) t(e);
|
|
874
881
|
}
|
|
875
882
|
} else {
|
|
876
|
-
|
|
877
|
-
let t = await
|
|
883
|
+
B = !0;
|
|
884
|
+
let t = await L({
|
|
878
885
|
tempData: e,
|
|
879
886
|
index: 0,
|
|
880
887
|
columns: r
|
|
881
888
|
});
|
|
882
|
-
|
|
889
|
+
B = !1, t && (z(t.heightDatas), S(e), N(), U());
|
|
883
890
|
}
|
|
884
|
-
},
|
|
885
|
-
if (
|
|
886
|
-
|
|
887
|
-
|
|
891
|
+
}, Se = 0, Ce = 1e4, V = 0, we = 0, Te = g(0), H = !1, Ee = (e) => {
|
|
892
|
+
if (we = i.value?.scrollLeft || 0, V == i.value?.scrollTop) {
|
|
893
|
+
H ||= (window.requestAnimationFrame(() => {
|
|
894
|
+
Ne(), H = !1;
|
|
888
895
|
}), !0);
|
|
889
896
|
return;
|
|
890
897
|
}
|
|
891
|
-
|
|
892
|
-
|
|
898
|
+
V = i.value?.scrollTop || 0, e.preventDefault(), H ||= (window.requestAnimationFrame(() => {
|
|
899
|
+
U(), H = !1;
|
|
893
900
|
}), !0);
|
|
894
|
-
},
|
|
901
|
+
}, De = (e) => {
|
|
895
902
|
if (e.shiftKey) {
|
|
896
903
|
e.preventDefault(), e.stopPropagation(), e.deltaY > 0 || e.deltaX > 0 ? i.value?.scrollBy({ left: 100 }) : i.value?.scrollBy({ left: -100 });
|
|
897
904
|
return;
|
|
898
905
|
}
|
|
899
906
|
e.preventDefault(), e.stopPropagation(), e.deltaY > 0 ? i.value?.scrollBy({ top: 150 }) : i.value?.scrollBy({ top: -150 });
|
|
900
|
-
},
|
|
907
|
+
}, Oe = g([]), ke = g(0), Ae = se((e, t) => {
|
|
901
908
|
setTimeout(() => {
|
|
902
|
-
|
|
909
|
+
ke.value = t, e.forEach((e) => {
|
|
903
910
|
e.slotShowTimestamp = t;
|
|
904
911
|
}), l();
|
|
905
912
|
}, 0);
|
|
906
|
-
}, 100),
|
|
913
|
+
}, 100), U = () => {
|
|
907
914
|
if (!i.value) return;
|
|
908
915
|
let e = i.value.scrollTop, t = a.value, n = 0, r = 0, o = [], s = "遍历";
|
|
909
916
|
switch (!0) {
|
|
@@ -929,30 +936,34 @@ var _e = (e) => {
|
|
|
929
936
|
s = b.get(i) || {
|
|
930
937
|
totalHeight: 0,
|
|
931
938
|
row: {}
|
|
932
|
-
}, r = s.totalHeight,
|
|
939
|
+
}, r = s.totalHeight, Te.value = r - s.row[I.height], o.push(s.row), n = e + t;
|
|
933
940
|
getHeightFor: for (let e = i; e < v.length; e++) {
|
|
934
941
|
let t = v[e];
|
|
935
|
-
if (r += t[
|
|
942
|
+
if (r += t[I.height], n) if (r <= n) o.push(t);
|
|
936
943
|
else break getHeightFor;
|
|
937
944
|
}
|
|
938
945
|
}
|
|
939
946
|
if (s == "遍历" || c) getHeightFor: for (let i = 0; i < v.length; i++) {
|
|
940
947
|
let a = v[i];
|
|
941
948
|
if (a) {
|
|
942
|
-
if (r += a[
|
|
943
|
-
|
|
949
|
+
if (r += a[I.height], e <= r && n == 0) {
|
|
950
|
+
Te.value = r - a[I.height], o.push(a), n = e + t;
|
|
944
951
|
continue;
|
|
945
952
|
}
|
|
946
953
|
if (n) if (r <= n) o.push(a);
|
|
947
954
|
else break getHeightFor;
|
|
948
955
|
}
|
|
949
956
|
}
|
|
950
|
-
|
|
951
|
-
},
|
|
957
|
+
Oe.value = o, Ne(), Ae(o, Math.floor(performance.now()));
|
|
958
|
+
}, je = g(0), Me = g(0), Ne = () => {
|
|
952
959
|
if (!i.value) return;
|
|
953
960
|
let e = i.value.scrollLeft, n = i.value.clientWidth;
|
|
954
961
|
for (let e of t.value) (e.fixed == "left" || e.fixed == "right") && (n -= e.width || e.minWidth || 0);
|
|
955
962
|
let r = 0, a = t.value.length - 1, o = !1, s = 0;
|
|
963
|
+
if (e == 0) {
|
|
964
|
+
je.value = r, Me.value = a;
|
|
965
|
+
return;
|
|
966
|
+
}
|
|
956
967
|
for (let i = 0; i < t.value.length; i++) {
|
|
957
968
|
let c = t.value[i];
|
|
958
969
|
if (!(c.fixed == "left" || c.fixed == "right")) {
|
|
@@ -966,17 +977,17 @@ var _e = (e) => {
|
|
|
966
977
|
}
|
|
967
978
|
}
|
|
968
979
|
}
|
|
969
|
-
r <= a && (
|
|
970
|
-
},
|
|
971
|
-
e.props.rowConfig?.isCurrent &&
|
|
972
|
-
},
|
|
973
|
-
if (
|
|
974
|
-
let r = e.props.treeConfig.childrenField ||
|
|
980
|
+
r <= a && (je.value = r, Me.value = a);
|
|
981
|
+
}, Pe = se(U, 200), { fixedColumnsLeft: Fe, fixedColumnsRight: Ie, fixedLeftIndex: Le, fixedRightIndex: W, reflashGridTemplateColumns: G, gridTemplateColumns: Re, getGridStyles: K } = fe({ columns: t }), q = y({}), ze = (t, n = !0) => {
|
|
982
|
+
e.props.rowConfig?.isCurrent && q.value != t && (q.value = t, n && e.emits("currentChange", { newValue: t }));
|
|
983
|
+
}, Be = (t, n) => {
|
|
984
|
+
if (ze(t), e.props.treeConfig?.isOpenTree) {
|
|
985
|
+
let r = e.props.treeConfig.childrenField || Y.childrenField;
|
|
975
986
|
switch (!0) {
|
|
976
987
|
case t?.[r]?.length == 0: break;
|
|
977
988
|
case e.props.treeConfig?.trigger == "cell" && n.treeNode:
|
|
978
989
|
case e.props.treeConfig?.trigger == "row":
|
|
979
|
-
|
|
990
|
+
st([t], !t[I.isCollapsed]);
|
|
980
991
|
break;
|
|
981
992
|
default: break;
|
|
982
993
|
}
|
|
@@ -984,7 +995,7 @@ var _e = (e) => {
|
|
|
984
995
|
if (e.props.expandConfig?.isExpand) switch (!0) {
|
|
985
996
|
case e.props.expandConfig?.trigger == "cell" && n.type == "expand":
|
|
986
997
|
case e.props.expandConfig?.trigger == "row":
|
|
987
|
-
|
|
998
|
+
lt([t], !t[I.isRowExpanded]);
|
|
988
999
|
break;
|
|
989
1000
|
default: break;
|
|
990
1001
|
}
|
|
@@ -992,116 +1003,118 @@ var _e = (e) => {
|
|
|
992
1003
|
row: t,
|
|
993
1004
|
column: n
|
|
994
1005
|
});
|
|
995
|
-
},
|
|
1006
|
+
}, Ve = (t) => {
|
|
996
1007
|
e.emits && e.emits("headerCellClick", { column: t }), e.props.sortConfig?.trigger == "cell" && t.sortable && gt(t.field, "auto"), e.emits && e.emits("cellClick", { column: t });
|
|
997
|
-
},
|
|
998
|
-
e.props.rowConfig?.isHover && (
|
|
999
|
-
},
|
|
1008
|
+
}, He = y({}), Ue = (t) => {
|
|
1009
|
+
e.props.rowConfig?.isHover && (He.value = t);
|
|
1010
|
+
}, We = (e) => {
|
|
1000
1011
|
let { cellClassName: t } = e.column;
|
|
1001
1012
|
return typeof t == "function" ? t(e) : t || "";
|
|
1002
|
-
}, { getCheckField:
|
|
1003
|
-
pretextId:
|
|
1013
|
+
}, { getCheckField: Ge, headerChecked: Ke, headerCheckedIndeterminate: qe, onHeaderChecked: Je, upDataHeaderChecked: Ye, upDataAllRowCheckedDeep: Xe, onCellChecked: Ze, getCheckboxRecords: Qe, clearCheckboxRowInit: $e } = pe({
|
|
1014
|
+
pretextId: I.id,
|
|
1004
1015
|
columns: t,
|
|
1005
|
-
blurAnyElement:
|
|
1016
|
+
blurAnyElement: R,
|
|
1006
1017
|
nowDataSource: _,
|
|
1007
1018
|
baseDataSource: h,
|
|
1008
1019
|
baseDataMap: m,
|
|
1009
1020
|
emits: e.emits,
|
|
1010
1021
|
treeConfig: e.props.treeConfig
|
|
1011
|
-
}),
|
|
1012
|
-
|
|
1022
|
+
}), et = (e) => {
|
|
1023
|
+
$e();
|
|
1013
1024
|
let t = [];
|
|
1014
|
-
if (t = e ? [e] :
|
|
1015
|
-
}, { isDragging:
|
|
1025
|
+
if (t = e ? [e] : Ge(), t) for (let e of _.value) for (let n of t) e[n] = !1;
|
|
1026
|
+
}, { isDragging: tt, dragLineLeft: nt, startResize: rt } = ge({
|
|
1016
1027
|
pretextTableRef: r,
|
|
1017
1028
|
afterResize: (t) => {
|
|
1018
|
-
|
|
1029
|
+
G(), e.emits("resizableChange", {
|
|
1019
1030
|
column: { ...t.column },
|
|
1020
1031
|
resizeWidth: t.column.width
|
|
1021
1032
|
});
|
|
1022
1033
|
}
|
|
1023
|
-
}),
|
|
1024
|
-
S(_.value),
|
|
1025
|
-
},
|
|
1034
|
+
}), it = () => {
|
|
1035
|
+
S(_.value), N(), U();
|
|
1036
|
+
}, J = (t) => {
|
|
1026
1037
|
if (t) {
|
|
1027
|
-
let t = e.props.treeConfig?.childrenField ||
|
|
1038
|
+
let t = e.props.treeConfig?.childrenField || Y.childrenField, n = [], r = (e) => {
|
|
1028
1039
|
if (e[t]?.length) {
|
|
1029
1040
|
n.push(e);
|
|
1030
1041
|
for (let n of e[t]) r(n);
|
|
1031
1042
|
}
|
|
1032
1043
|
};
|
|
1033
1044
|
for (let e of _.value) r(e);
|
|
1034
|
-
|
|
1035
|
-
} else
|
|
1036
|
-
},
|
|
1037
|
-
|
|
1038
|
-
e[
|
|
1039
|
-
}),
|
|
1040
|
-
}, { defaultTreeConfig:
|
|
1045
|
+
st(n, !0);
|
|
1046
|
+
} else at();
|
|
1047
|
+
}, at = () => {
|
|
1048
|
+
X.forEach((e) => {
|
|
1049
|
+
e[I.isCollapsed] = !1;
|
|
1050
|
+
}), X.clear(), S(_.value), N(), U();
|
|
1051
|
+
}, { defaultTreeConfig: Y, treeExpandMap: X, handleTree: ot, setTreeExpand: st } = ve({
|
|
1041
1052
|
treeConfig: e.props.treeConfig,
|
|
1042
|
-
afterTreeExpand:
|
|
1053
|
+
afterTreeExpand: it,
|
|
1043
1054
|
insertChild: C
|
|
1044
|
-
}), { handleExpand:
|
|
1055
|
+
}), { handleExpand: ct, setRowExpand: lt } = ye({
|
|
1045
1056
|
expandConfig: e.props.expandConfig,
|
|
1046
1057
|
afterRowExpand: (t, n) => {
|
|
1047
|
-
S(_.value),
|
|
1058
|
+
S(_.value), N(), U(), e.emits("toggleRowExpand", {
|
|
1048
1059
|
expanded: n,
|
|
1049
1060
|
rows: t
|
|
1050
1061
|
});
|
|
1051
1062
|
},
|
|
1052
1063
|
insertExpandRow: T
|
|
1053
|
-
}),
|
|
1054
|
-
h.value = [], S([]), m.clear(),
|
|
1064
|
+
}), ut = 0, dt = () => {
|
|
1065
|
+
h.value = [], S([]), m.clear(), q.value = {}, He.value = {}, $e(), ht.value = "", $.value = null, Et(), ut = 0, be = 0;
|
|
1055
1066
|
}, Z = (t) => {
|
|
1056
|
-
let n =
|
|
1067
|
+
let n = ut;
|
|
1057
1068
|
for (let r of t) {
|
|
1058
|
-
r[
|
|
1059
|
-
let t = e.props.treeConfig?.childrenField ||
|
|
1069
|
+
r[I.id] = Math.random().toString(36).substring(2), r[I.index] = n, n++, ut++, m.set(r[I.id], r);
|
|
1070
|
+
let t = e.props.treeConfig?.childrenField || Y.childrenField;
|
|
1060
1071
|
e.props.treeConfig?.isOpenTree && r?.[t]?.length > 0 && Z(r[t]);
|
|
1061
1072
|
}
|
|
1062
1073
|
}, ft = (e, t, n = 0) => {
|
|
1063
|
-
|
|
1074
|
+
B ? setTimeout(() => {
|
|
1064
1075
|
n >= 50 || ft(e, t, n + 1);
|
|
1065
1076
|
}, 100) : u({
|
|
1066
1077
|
top: e,
|
|
1067
1078
|
left: t
|
|
1068
1079
|
});
|
|
1069
1080
|
}, pt = async (e) => {
|
|
1070
|
-
let t =
|
|
1081
|
+
let t = V, n = we;
|
|
1071
1082
|
await Q(e), ft(t, n);
|
|
1072
1083
|
}, Q = async (e) => {
|
|
1073
1084
|
try {
|
|
1074
|
-
u({ top: 0 }),
|
|
1085
|
+
u({ top: 0 }), dt(), Z(e || []);
|
|
1086
|
+
let t = ot(e || []);
|
|
1087
|
+
h.value = t || [], xe(h.value);
|
|
1075
1088
|
} catch (e) {
|
|
1076
1089
|
console.error(e);
|
|
1077
1090
|
}
|
|
1078
1091
|
}, mt = () => {
|
|
1079
|
-
let e = v.filter((e) => !e[
|
|
1092
|
+
let e = v.filter((e) => !e[I.isExpandRow]);
|
|
1080
1093
|
return {
|
|
1081
1094
|
fullData: h.value,
|
|
1082
1095
|
visibleData: e,
|
|
1083
1096
|
baseDataMap: m
|
|
1084
1097
|
};
|
|
1085
|
-
}, { sortField: ht, sortOrder: $, sort: gt, handleSort: _t } =
|
|
1098
|
+
}, { sortField: ht, sortOrder: $, sort: gt, handleSort: _t } = me({
|
|
1086
1099
|
nowDataSource: _,
|
|
1087
|
-
getVisibleData:
|
|
1100
|
+
getVisibleData: U,
|
|
1088
1101
|
setNowDataSource: S,
|
|
1089
1102
|
treeConfig: e.props.treeConfig,
|
|
1090
|
-
defaultTreeConfig:
|
|
1103
|
+
defaultTreeConfig: Y,
|
|
1091
1104
|
columns: t
|
|
1092
|
-
}), { filterPopupWidth: vt, filterPopupId: yt, inputFilterOptions: bt, numberFilterOptions: xt, filterFields: St, getFilterFields: Ct, filterClick: wt, setFilter: Tt, clearFilter: Et } =
|
|
1105
|
+
}), { filterPopupWidth: vt, filterPopupId: yt, inputFilterOptions: bt, numberFilterOptions: xt, filterFields: St, getFilterFields: Ct, filterClick: wt, setFilter: Tt, clearFilter: Et } = he({
|
|
1093
1106
|
columns: t,
|
|
1094
1107
|
baseDataSource: h,
|
|
1095
1108
|
setNowDataSource: S,
|
|
1096
1109
|
scrollTo: u,
|
|
1097
1110
|
refresh: l,
|
|
1098
1111
|
afterFilter: () => {
|
|
1099
|
-
|
|
1112
|
+
N(), _t(), Xe();
|
|
1100
1113
|
},
|
|
1101
1114
|
treeConfig: e.props.treeConfig,
|
|
1102
|
-
defaultTreeConfig:
|
|
1115
|
+
defaultTreeConfig: Y
|
|
1103
1116
|
}), Dt = (e) => {
|
|
1104
|
-
|
|
1117
|
+
R(), e.listFilter.selectedValue.length == e.listFilter.listOptions.length ? e.listFilter.selectedValue = [] : e.listFilter.selectedValue = e.listFilter.listOptions.map((e) => e.value);
|
|
1105
1118
|
}, Ot = (i) => {
|
|
1106
1119
|
if (!r.value) {
|
|
1107
1120
|
setTimeout(() => {
|
|
@@ -1110,80 +1123,83 @@ var _e = (e) => {
|
|
|
1110
1123
|
return;
|
|
1111
1124
|
}
|
|
1112
1125
|
let a = D(i) || [];
|
|
1113
|
-
a.finalColumns.length == 0 || a.realColumns.length == 0 || (
|
|
1126
|
+
a.finalColumns.length == 0 || a.realColumns.length == 0 || (ct(), Se = a.finalColumns.length, N(), t.value = a.finalColumns, n.value = a.realColumns, setTimeout(() => {
|
|
1114
1127
|
k();
|
|
1115
|
-
}, 0),
|
|
1128
|
+
}, 0), ne(e.props.footerProps), Ge(), K(), Ct(), l());
|
|
1116
1129
|
};
|
|
1117
1130
|
w(() => e.props.columns, (e) => {
|
|
1118
1131
|
Ot(e);
|
|
1119
1132
|
}, { immediate: !0 }), w(() => e.props.footerProps, (e) => {
|
|
1120
|
-
|
|
1133
|
+
ne(e);
|
|
1121
1134
|
}), w(() => e.props.height, (e) => {
|
|
1122
|
-
a.value = e,
|
|
1135
|
+
a.value = e, Pe();
|
|
1123
1136
|
}, { immediate: !0 });
|
|
1124
1137
|
let kt = () => {
|
|
1125
1138
|
r.value && (o.value = r.value.clientWidth);
|
|
1126
|
-
}, At =
|
|
1139
|
+
}, At = se(kt, 100), jt = null, Mt = () => {
|
|
1127
1140
|
if (!r.value) {
|
|
1128
1141
|
setTimeout(() => {
|
|
1129
|
-
|
|
1142
|
+
Mt();
|
|
1130
1143
|
}, 100);
|
|
1131
1144
|
return;
|
|
1132
1145
|
}
|
|
1133
|
-
|
|
1146
|
+
r.value.clientWidth == 0 && (jt = new ResizeObserver((t) => {
|
|
1147
|
+
let n = t[0].contentRect;
|
|
1148
|
+
(n.width > 0 || n.height > 0) && (kt(), k(), a.value = e.props.height, Pe(), jt?.disconnect());
|
|
1149
|
+
}), jt.observe(r.value)), window.addEventListener("resize", At), kt();
|
|
1134
1150
|
};
|
|
1135
1151
|
return p(() => {
|
|
1136
|
-
|
|
1152
|
+
Mt();
|
|
1137
1153
|
}), d(() => {
|
|
1138
1154
|
u({
|
|
1139
|
-
top:
|
|
1140
|
-
left:
|
|
1141
|
-
}),
|
|
1155
|
+
top: V,
|
|
1156
|
+
left: we
|
|
1157
|
+
}), U();
|
|
1142
1158
|
}), f(() => {}), {
|
|
1143
|
-
keyNames:
|
|
1159
|
+
keyNames: I,
|
|
1144
1160
|
nowDataSource: _,
|
|
1145
1161
|
pretextTableRef: r,
|
|
1146
1162
|
tableRef: i,
|
|
1147
1163
|
isLoading: s,
|
|
1148
|
-
visibleData:
|
|
1149
|
-
visibleWidthStartColumnIndex:
|
|
1150
|
-
visibleWidthEndColumnIndex:
|
|
1151
|
-
gridTemplateColumns:
|
|
1152
|
-
blurAnyElement:
|
|
1164
|
+
visibleData: Oe,
|
|
1165
|
+
visibleWidthStartColumnIndex: je,
|
|
1166
|
+
visibleWidthEndColumnIndex: Me,
|
|
1167
|
+
gridTemplateColumns: Re,
|
|
1168
|
+
blurAnyElement: R,
|
|
1153
1169
|
columns: t,
|
|
1154
|
-
onScroll:
|
|
1155
|
-
onWheel:
|
|
1156
|
-
topEmptyHeight:
|
|
1157
|
-
scrollbarHeight:
|
|
1170
|
+
onScroll: Ee,
|
|
1171
|
+
onWheel: De,
|
|
1172
|
+
topEmptyHeight: Te,
|
|
1173
|
+
scrollbarHeight: j,
|
|
1158
1174
|
headerHeight: E,
|
|
1159
1175
|
headerStyles: ee,
|
|
1160
1176
|
realColumns: n,
|
|
1161
1177
|
headerRef: O,
|
|
1162
|
-
updateFooter:
|
|
1163
|
-
updateFooterCellLabel:
|
|
1178
|
+
updateFooter: re,
|
|
1179
|
+
updateFooterCellLabel: ie,
|
|
1164
1180
|
footerHeight: te,
|
|
1165
1181
|
footerColumns: A,
|
|
1166
|
-
getFooterHeight:
|
|
1167
|
-
itemStyles:
|
|
1168
|
-
fixedLeftIndex:
|
|
1169
|
-
fixedRightIndex:
|
|
1170
|
-
fixedColumnsLeft:
|
|
1171
|
-
fixedColumnsRight:
|
|
1172
|
-
getGridStyles:
|
|
1182
|
+
getFooterHeight: ne,
|
|
1183
|
+
itemStyles: P,
|
|
1184
|
+
fixedLeftIndex: Le,
|
|
1185
|
+
fixedRightIndex: W,
|
|
1186
|
+
fixedColumnsLeft: Fe,
|
|
1187
|
+
fixedColumnsRight: Ie,
|
|
1188
|
+
getGridStyles: K,
|
|
1173
1189
|
divLineHeightOffset: 20,
|
|
1174
|
-
currentRow:
|
|
1175
|
-
setCurrentRow:
|
|
1176
|
-
cellClick:
|
|
1177
|
-
headerClick:
|
|
1178
|
-
hoverRow:
|
|
1179
|
-
cellMousemove:
|
|
1180
|
-
resolveCellClassName:
|
|
1181
|
-
headerChecked:
|
|
1182
|
-
headerCheckedIndeterminate:
|
|
1183
|
-
onHeaderChecked:
|
|
1184
|
-
onCellChecked:
|
|
1185
|
-
getCheckboxRecords:
|
|
1186
|
-
clearCheckboxRow:
|
|
1190
|
+
currentRow: q,
|
|
1191
|
+
setCurrentRow: ze,
|
|
1192
|
+
cellClick: Be,
|
|
1193
|
+
headerClick: Ve,
|
|
1194
|
+
hoverRow: He,
|
|
1195
|
+
cellMousemove: Ue,
|
|
1196
|
+
resolveCellClassName: We,
|
|
1197
|
+
headerChecked: Ke,
|
|
1198
|
+
headerCheckedIndeterminate: qe,
|
|
1199
|
+
onHeaderChecked: Je,
|
|
1200
|
+
onCellChecked: Ze,
|
|
1201
|
+
getCheckboxRecords: Qe,
|
|
1202
|
+
clearCheckboxRow: et,
|
|
1187
1203
|
sortField: ht,
|
|
1188
1204
|
sortOrder: $,
|
|
1189
1205
|
sort: gt,
|
|
@@ -1197,26 +1213,27 @@ var _e = (e) => {
|
|
|
1197
1213
|
setFilter: Tt,
|
|
1198
1214
|
clearFilter: Et,
|
|
1199
1215
|
setListFilterAll: Dt,
|
|
1200
|
-
isDragging:
|
|
1201
|
-
dragLineLeft:
|
|
1202
|
-
startResize:
|
|
1203
|
-
setTreeExpand:
|
|
1204
|
-
setAllTreeExpand:
|
|
1205
|
-
clearTreeExpand:
|
|
1206
|
-
defaultTreeConfig:
|
|
1207
|
-
setRowExpand:
|
|
1208
|
-
slotShowTimestamp:
|
|
1216
|
+
isDragging: tt,
|
|
1217
|
+
dragLineLeft: nt,
|
|
1218
|
+
startResize: rt,
|
|
1219
|
+
setTreeExpand: st,
|
|
1220
|
+
setAllTreeExpand: J,
|
|
1221
|
+
clearTreeExpand: at,
|
|
1222
|
+
defaultTreeConfig: Y,
|
|
1223
|
+
setRowExpand: lt,
|
|
1224
|
+
slotShowTimestamp: ke,
|
|
1209
1225
|
isRefresh: c,
|
|
1210
1226
|
realTableHeight: a,
|
|
1211
1227
|
realTableWidth: o,
|
|
1212
1228
|
loadData: pt,
|
|
1213
1229
|
reloadData: Q,
|
|
1214
|
-
getTableData: mt
|
|
1230
|
+
getTableData: mt,
|
|
1231
|
+
refresh: l
|
|
1215
1232
|
};
|
|
1216
|
-
},
|
|
1233
|
+
}, be = ["onClick"], B = { key: 0 }, xe = { key: 1 }, Se = { key: 2 }, Ce = {
|
|
1217
1234
|
key: 3,
|
|
1218
1235
|
style: { "text-align": "center" }
|
|
1219
|
-
},
|
|
1236
|
+
}, V = {
|
|
1220
1237
|
key: 0,
|
|
1221
1238
|
style: {
|
|
1222
1239
|
display: "inline-flex",
|
|
@@ -1227,37 +1244,37 @@ var _e = (e) => {
|
|
|
1227
1244
|
padding: "0px",
|
|
1228
1245
|
width: "14px"
|
|
1229
1246
|
}
|
|
1230
|
-
},
|
|
1247
|
+
}, we = { key: 1 }, Te = ["id"], H = { style: {
|
|
1231
1248
|
"text-align": "center",
|
|
1232
1249
|
"font-weight": "bold"
|
|
1233
|
-
} },
|
|
1250
|
+
} }, Ee = { style: {
|
|
1234
1251
|
display: "flex",
|
|
1235
1252
|
"justify-content": "center",
|
|
1236
1253
|
"margin-top": "5px"
|
|
1237
|
-
} },
|
|
1254
|
+
} }, De = { style: {
|
|
1238
1255
|
display: "flex",
|
|
1239
1256
|
"justify-content": "center",
|
|
1240
1257
|
"margin-top": "5px"
|
|
1241
|
-
} },
|
|
1258
|
+
} }, Oe = { style: { margin: "0 0 4px" } }, ke = { style: {
|
|
1242
1259
|
display: "flex",
|
|
1243
1260
|
"justify-content": "center",
|
|
1244
1261
|
gap: "10px",
|
|
1245
1262
|
"margin-top": "5px",
|
|
1246
1263
|
padding: "5px 0",
|
|
1247
1264
|
"border-top": "1px solid #e0e0e0"
|
|
1248
|
-
} },
|
|
1265
|
+
} }, Ae = ["onMousedown"], U = ["onClick", "onMouseenter"], je = {
|
|
1249
1266
|
key: 3,
|
|
1250
1267
|
style: { "margin-left": "0px" }
|
|
1251
|
-
},
|
|
1268
|
+
}, Me = ["onClick"], Ne = { style: {
|
|
1252
1269
|
display: "flex",
|
|
1253
1270
|
gap: "4px"
|
|
1254
|
-
} },
|
|
1271
|
+
} }, Pe = ["title"], Fe = {
|
|
1255
1272
|
key: 0,
|
|
1256
1273
|
style: {
|
|
1257
1274
|
width: "100%",
|
|
1258
1275
|
"text-align": "center"
|
|
1259
1276
|
}
|
|
1260
|
-
},
|
|
1277
|
+
}, Ie = ["title"], Le = { key: 1 }, W = /* @__PURE__ */ c({
|
|
1261
1278
|
inheritAttrs: !1,
|
|
1262
1279
|
name: "pretextTable",
|
|
1263
1280
|
props: {
|
|
@@ -1333,21 +1350,22 @@ var _e = (e) => {
|
|
|
1333
1350
|
"toggleRowExpand"
|
|
1334
1351
|
],
|
|
1335
1352
|
setup(c, { expose: d, emit: f }) {
|
|
1336
|
-
let p = c, { keyNames: m, pretextTableRef: g, nowDataSource: y, tableRef: x, isLoading: w, headerHeight:
|
|
1353
|
+
let p = c, { keyNames: m, pretextTableRef: g, nowDataSource: y, tableRef: x, isLoading: w, headerHeight: M, topEmptyHeight: se, visibleData: N, visibleWidthStartColumnIndex: ce, visibleWidthEndColumnIndex: P, columns: F, realColumns: le, headerRef: ue, onScroll: de, onWheel: fe, gridTemplateColumns: I, blurAnyElement: L, scrollbarHeight: pe, headerStyles: me, divLineHeightOffset: he, updateFooter: ge, updateFooterCellLabel: _e, footerHeight: ve, footerColumns: R, getFooterHeight: ye, itemStyles: W, fixedLeftIndex: G, fixedRightIndex: Re, fixedColumnsLeft: K, fixedColumnsRight: q, currentRow: ze, setCurrentRow: Be, cellClick: Ve, headerClick: He, hoverRow: Ue, cellMousemove: We, resolveCellClassName: Ge, headerChecked: Ke, headerCheckedIndeterminate: qe, onHeaderChecked: Je, onCellChecked: Ye, getCheckboxRecords: Xe, clearCheckboxRow: Ze, sortField: Qe, sortOrder: $e, sort: et, filterPopupWidth: tt, filterPopupId: nt, inputFilterOptions: rt, numberFilterOptions: it, filterFields: J, getFilterFields: at, filterClick: Y, setFilter: X, clearFilter: ot, setListFilterAll: st, isDragging: ct, dragLineLeft: lt, startResize: ut, setTreeExpand: dt, setAllTreeExpand: Z, clearTreeExpand: ft, defaultTreeConfig: pt, setRowExpand: Q, slotShowTimestamp: mt, isRefresh: ht, realTableHeight: $, realTableWidth: gt, loadData: _t, reloadData: vt, getTableData: yt, refresh: bt } = z({
|
|
1337
1354
|
props: p,
|
|
1338
1355
|
emits: f
|
|
1339
1356
|
});
|
|
1340
1357
|
return d({
|
|
1341
1358
|
loadData: _t,
|
|
1342
1359
|
reloadData: vt,
|
|
1343
|
-
setCurrentRow:
|
|
1344
|
-
getCheckboxRecords:
|
|
1345
|
-
clearCheckboxRow:
|
|
1346
|
-
updateFooter:
|
|
1347
|
-
updateFooterCellLabel:
|
|
1348
|
-
getFooterHeight:
|
|
1360
|
+
setCurrentRow: Be,
|
|
1361
|
+
getCheckboxRecords: Xe,
|
|
1362
|
+
clearCheckboxRow: Ze,
|
|
1363
|
+
updateFooter: ge,
|
|
1364
|
+
updateFooterCellLabel: _e,
|
|
1365
|
+
getFooterHeight: ye,
|
|
1349
1366
|
getTableData: yt,
|
|
1350
|
-
|
|
1367
|
+
refresh: bt,
|
|
1368
|
+
setTreeExpand: dt,
|
|
1351
1369
|
setAllTreeExpand: Z,
|
|
1352
1370
|
clearTreeExpand: ft,
|
|
1353
1371
|
setRowExpand: Q
|
|
@@ -1357,7 +1375,7 @@ var _e = (e) => {
|
|
|
1357
1375
|
ref_key: "pretextTableRef",
|
|
1358
1376
|
ref: g
|
|
1359
1377
|
}, [
|
|
1360
|
-
s(S(
|
|
1378
|
+
s(S(re), {
|
|
1361
1379
|
modelValue: S(w),
|
|
1362
1380
|
text: p.loadingConfig?.text || "加载中..."
|
|
1363
1381
|
}, null, 8, ["modelValue", "text"]),
|
|
@@ -1371,12 +1389,12 @@ var _e = (e) => {
|
|
|
1371
1389
|
}, { height: `${S($)}px` }]),
|
|
1372
1390
|
ref_key: "tableRef",
|
|
1373
1391
|
ref: x,
|
|
1374
|
-
onScroll: d[1] ||= (...e) => S(
|
|
1375
|
-
onWheel: d[2] ||= (...e) => S(
|
|
1392
|
+
onScroll: d[1] ||= (...e) => S(de) && S(de)(...e),
|
|
1393
|
+
onWheel: d[2] ||= (...e) => S(fe) && S(fe)(...e)
|
|
1376
1394
|
}, [
|
|
1377
1395
|
a("div", {
|
|
1378
1396
|
ref_key: "headerRef",
|
|
1379
|
-
ref:
|
|
1397
|
+
ref: ue,
|
|
1380
1398
|
style: u([{
|
|
1381
1399
|
display: "grid",
|
|
1382
1400
|
width: "max-content",
|
|
@@ -1387,65 +1405,65 @@ var _e = (e) => {
|
|
|
1387
1405
|
top: "0",
|
|
1388
1406
|
left: "0",
|
|
1389
1407
|
"z-index": "1"
|
|
1390
|
-
}, { gridTemplateColumns: S(
|
|
1391
|
-
}, [(h(!0), i(e, null, _(S(
|
|
1408
|
+
}, { gridTemplateColumns: S(I) }])
|
|
1409
|
+
}, [(h(!0), i(e, null, _(S(le), (f, p) => (h(), i(e, { key: "headerRow_" + p }, [(h(!0), i(e, null, _(f, (f, m) => (h(), i("div", {
|
|
1392
1410
|
key: "header_" + (f?.field || "null") + "_" + m,
|
|
1393
1411
|
class: l(["pretextTable-grid-header", "pretextTable-grid-header" + (f?.field || "") + "_" + p]),
|
|
1394
1412
|
style: u(f ? {
|
|
1395
|
-
fontWeight: S(
|
|
1396
|
-
fontSize: S(
|
|
1413
|
+
fontWeight: S(me).fontWeight,
|
|
1414
|
+
fontSize: S(me).fontSize,
|
|
1397
1415
|
gridRow: f?.style?.gridRow || "",
|
|
1398
1416
|
gridColumn: f?.style?.gridColumn || "",
|
|
1399
1417
|
zIndex: m == 0 ? 3 : f.fixed == "left" || f.fixed == "right" ? 2 : 1,
|
|
1400
|
-
left: f.fixed == "left" ? S(
|
|
1401
|
-
right: f.fixed == "right" ? S(
|
|
1418
|
+
left: f.fixed == "left" ? S(K)[m] : "",
|
|
1419
|
+
right: f.fixed == "right" ? S(q)[m] : "",
|
|
1402
1420
|
borderLeft: f.fixed == "right" ? "1px solid var(--pretextTable-border-color)" : "",
|
|
1403
|
-
boxShadow: f.fixed == "left" && m == S(
|
|
1421
|
+
boxShadow: f.fixed == "left" && m == S(G) ? "var(--pretextTable-shadow-color) 2px 0px 5px -1px" : f.fixed == "right" && m == S(Re) ? "var(--pretextTable-shadow-color) -2px 0px 5px -1px" : "",
|
|
1404
1422
|
borderBottom: f ? "1px solid var(--pretextTable-border-color)" : "",
|
|
1405
1423
|
minHeight: "30px"
|
|
1406
1424
|
} : {}),
|
|
1407
|
-
onClick: (e) => S(
|
|
1408
|
-
}, [f ? f.type == "checkbox" && p == 0 ? (h(), i("span",
|
|
1409
|
-
modelValue: S(
|
|
1410
|
-
indeterminate: S(
|
|
1425
|
+
onClick: (e) => S(He)(f)
|
|
1426
|
+
}, [f ? f.type == "checkbox" && p == 0 ? (h(), i("span", xe, [s(S(k), {
|
|
1427
|
+
modelValue: S(Ke)[f.field],
|
|
1428
|
+
indeterminate: S(qe)[f.field],
|
|
1411
1429
|
content: "",
|
|
1412
|
-
onChange: (e) => S(
|
|
1430
|
+
onChange: (e) => S(Je)(f.field)
|
|
1413
1431
|
}, null, 8, [
|
|
1414
1432
|
"modelValue",
|
|
1415
1433
|
"indeterminate",
|
|
1416
1434
|
"onChange"
|
|
1417
|
-
])])) : f?.type == "seq" && p == 0 ? (h(), i("div",
|
|
1435
|
+
])])) : f?.type == "seq" && p == 0 ? (h(), i("div", Se, b(f.title || "序号"), 1)) : (h(), i("span", Ce, [
|
|
1418
1436
|
a("span", null, [f.slots?.header ? v(c.$slots, f.slots?.header, {
|
|
1419
1437
|
key: 0,
|
|
1420
1438
|
column: f,
|
|
1421
1439
|
text: f.title
|
|
1422
1440
|
}, () => [o(b(f.title), 1)]) : (h(), i(e, { key: 1 }, [o(b(f.title), 1)], 64))]),
|
|
1423
|
-
f.sortable && !f.children?.length ? (h(), i("span",
|
|
1441
|
+
f.sortable && !f.children?.length ? (h(), i("span", V, [s(S(A), {
|
|
1424
1442
|
name: "caret-up",
|
|
1425
1443
|
style: {
|
|
1426
1444
|
position: "absolute",
|
|
1427
1445
|
top: "-0.8em"
|
|
1428
1446
|
},
|
|
1429
|
-
class: l(["pretextTable-sort-icon", { "pretextTable-sort-icon-active": S(
|
|
1430
|
-
onClick: D((e) => S(
|
|
1447
|
+
class: l(["pretextTable-sort-icon", { "pretextTable-sort-icon-active": S(Qe) == f.field && S($e) == "asc" }]),
|
|
1448
|
+
onClick: D((e) => S(et)(f.field, "asc"), ["stop"])
|
|
1431
1449
|
}, null, 8, ["class", "onClick"]), s(S(A), {
|
|
1432
1450
|
name: "caret-down",
|
|
1433
1451
|
style: {
|
|
1434
1452
|
position: "absolute",
|
|
1435
1453
|
top: "-0.2em"
|
|
1436
1454
|
},
|
|
1437
|
-
class: l(["pretextTable-sort-icon", { "pretextTable-sort-icon-active": S(
|
|
1438
|
-
onClick: D((e) => S(
|
|
1455
|
+
class: l(["pretextTable-sort-icon", { "pretextTable-sort-icon-active": S(Qe) == f.field && S($e) == "desc" }]),
|
|
1456
|
+
onClick: D((e) => S(et)(f.field, "desc"), ["stop"])
|
|
1439
1457
|
}, null, 8, ["class", "onClick"])])) : r("", !0),
|
|
1440
|
-
S(
|
|
1458
|
+
S(J)[m]?.type && !f.children?.length ? (h(), i("span", we, [s(S(A), {
|
|
1441
1459
|
name: "funnel",
|
|
1442
|
-
class: l(["pretextTable-filter-icon", { "pretextTable-filter-icon-active": S(
|
|
1443
|
-
onClick: D((e) => S(
|
|
1444
|
-
}, null, 8, ["class", "onClick"]), S(
|
|
1460
|
+
class: l(["pretextTable-filter-icon", { "pretextTable-filter-icon-active": S(J)[m].isActive }]),
|
|
1461
|
+
onClick: D((e) => S(Y)(m, e), ["stop"])
|
|
1462
|
+
}, null, 8, ["class", "onClick"]), S(J)[m].isShow ? (h(), n(t, {
|
|
1445
1463
|
key: 0,
|
|
1446
1464
|
to: "body"
|
|
1447
1465
|
}, [a("div", {
|
|
1448
|
-
id: S(
|
|
1466
|
+
id: S(nt) + f.field,
|
|
1449
1467
|
class: "pretextTable-filter-popup",
|
|
1450
1468
|
style: u([{
|
|
1451
1469
|
"background-color": "#fff",
|
|
@@ -1455,52 +1473,52 @@ var _e = (e) => {
|
|
|
1455
1473
|
"z-index": "99999"
|
|
1456
1474
|
}, {
|
|
1457
1475
|
position: "absolute",
|
|
1458
|
-
top: S(
|
|
1459
|
-
left: S(
|
|
1476
|
+
top: S(J)[m].clientY + "px",
|
|
1477
|
+
left: S(J)[m].clientX + "px"
|
|
1460
1478
|
}])
|
|
1461
1479
|
}, [
|
|
1462
|
-
a("div",
|
|
1463
|
-
S(
|
|
1480
|
+
a("div", H, b(f.title), 1),
|
|
1481
|
+
S(J)[m].type == "inputFilter" ? (h(), i("div", {
|
|
1464
1482
|
key: 0,
|
|
1465
|
-
style: u({ width: S(
|
|
1466
|
-
}, [a("div", null, [s(S(
|
|
1467
|
-
modelValue: S(
|
|
1468
|
-
"onUpdate:modelValue": (e) => S(
|
|
1483
|
+
style: u({ width: S(tt) + "px" })
|
|
1484
|
+
}, [a("div", null, [s(S(ne), {
|
|
1485
|
+
modelValue: S(J)[m].value,
|
|
1486
|
+
"onUpdate:modelValue": (e) => S(J)[m].value = e,
|
|
1469
1487
|
placeholder: "按回车筛选",
|
|
1470
1488
|
trim: !0,
|
|
1471
1489
|
style: { width: "100%" },
|
|
1472
|
-
onKeyup: ee((e) => S(
|
|
1490
|
+
onKeyup: ee((e) => S(X)(f.field), ["enter"])
|
|
1473
1491
|
}, null, 8, [
|
|
1474
1492
|
"modelValue",
|
|
1475
1493
|
"onUpdate:modelValue",
|
|
1476
1494
|
"onKeyup"
|
|
1477
|
-
])]), a("div",
|
|
1478
|
-
modelValue: S(
|
|
1479
|
-
"onUpdate:modelValue": (e) => S(
|
|
1480
|
-
options: S(
|
|
1495
|
+
])]), a("div", Ee, [s(S(j), {
|
|
1496
|
+
modelValue: S(J)[m].inputFilter.type,
|
|
1497
|
+
"onUpdate:modelValue": (e) => S(J)[m].inputFilter.type = e,
|
|
1498
|
+
options: S(rt)
|
|
1481
1499
|
}, null, 8, [
|
|
1482
1500
|
"modelValue",
|
|
1483
1501
|
"onUpdate:modelValue",
|
|
1484
1502
|
"options"
|
|
1485
1503
|
])])], 4)) : r("", !0),
|
|
1486
|
-
S(
|
|
1504
|
+
S(J)[m].type == "numberFilter" || S(J)[m].type == "numberFilter%" ? (h(), i("div", {
|
|
1487
1505
|
key: 1,
|
|
1488
|
-
style: u({ width: S(
|
|
1489
|
-
}, [a("div",
|
|
1490
|
-
modelValue: S(
|
|
1491
|
-
"onUpdate:modelValue": (e) => S(
|
|
1492
|
-
options: S(
|
|
1506
|
+
style: u({ width: S(tt) + "px" })
|
|
1507
|
+
}, [a("div", De, [s(S(j), {
|
|
1508
|
+
modelValue: S(J)[m].numberFilter.type,
|
|
1509
|
+
"onUpdate:modelValue": (e) => S(J)[m].numberFilter.type = e,
|
|
1510
|
+
options: S(it)
|
|
1493
1511
|
}, null, 8, [
|
|
1494
1512
|
"modelValue",
|
|
1495
1513
|
"onUpdate:modelValue",
|
|
1496
1514
|
"options"
|
|
1497
|
-
])]), a("div", null, [s(S(
|
|
1498
|
-
modelValue: S(
|
|
1499
|
-
"onUpdate:modelValue": (e) => S(
|
|
1515
|
+
])]), a("div", null, [s(S(ie), {
|
|
1516
|
+
modelValue: S(J)[m].value,
|
|
1517
|
+
"onUpdate:modelValue": (e) => S(J)[m].value = e,
|
|
1500
1518
|
placeholder: "按回车筛选",
|
|
1501
1519
|
controlConfig: { showButton: !1 },
|
|
1502
1520
|
style: { width: "100%" },
|
|
1503
|
-
onKeyup: ee((e) => S(
|
|
1521
|
+
onKeyup: ee((e) => S(X)(f.field), ["enter"])
|
|
1504
1522
|
}, {
|
|
1505
1523
|
suffix: T(() => [...d[3] ||= [o("%", -1)]]),
|
|
1506
1524
|
_: 1
|
|
@@ -1509,35 +1527,35 @@ var _e = (e) => {
|
|
|
1509
1527
|
"onUpdate:modelValue",
|
|
1510
1528
|
"onKeyup"
|
|
1511
1529
|
])])], 4)) : r("", !0),
|
|
1512
|
-
S(
|
|
1530
|
+
S(J)[m].type == "listFilter" ? (h(), i("div", {
|
|
1513
1531
|
key: 2,
|
|
1514
|
-
style: u({ maxWidth: S(
|
|
1515
|
-
}, [a("div",
|
|
1516
|
-
modelValue: S(
|
|
1517
|
-
indeterminate: S(
|
|
1532
|
+
style: u({ maxWidth: S(tt) + "px" })
|
|
1533
|
+
}, [a("div", Oe, [s(S(k), {
|
|
1534
|
+
modelValue: S(J)[m].listFilter.selectedValue.length == S(J)[m].listFilter.listOptions.length,
|
|
1535
|
+
indeterminate: S(J)[m].listFilter.selectedValue.length > 0 && S(J)[m].listFilter.selectedValue.length < S(J)[m].listFilter.listOptions.length,
|
|
1518
1536
|
content: "全部",
|
|
1519
|
-
onChange: (e) => S(
|
|
1537
|
+
onChange: (e) => S(st)(S(J)[m])
|
|
1520
1538
|
}, null, 8, [
|
|
1521
1539
|
"modelValue",
|
|
1522
1540
|
"indeterminate",
|
|
1523
1541
|
"onChange"
|
|
1524
1542
|
])]), s(S(te), {
|
|
1525
|
-
modelValue: S(
|
|
1526
|
-
"onUpdate:modelValue": (e) => S(
|
|
1527
|
-
options: S(
|
|
1528
|
-
onChange: S(
|
|
1543
|
+
modelValue: S(J)[m].listFilter.selectedValue,
|
|
1544
|
+
"onUpdate:modelValue": (e) => S(J)[m].listFilter.selectedValue = e,
|
|
1545
|
+
options: S(J)[m].listFilter.listOptions,
|
|
1546
|
+
onChange: S(L)
|
|
1529
1547
|
}, null, 8, [
|
|
1530
1548
|
"modelValue",
|
|
1531
1549
|
"onUpdate:modelValue",
|
|
1532
1550
|
"options",
|
|
1533
1551
|
"onChange"
|
|
1534
1552
|
])], 4)) : r("", !0),
|
|
1535
|
-
a("div",
|
|
1553
|
+
a("div", ke, [
|
|
1536
1554
|
s(S(O), {
|
|
1537
1555
|
type: "primary",
|
|
1538
1556
|
size: "small",
|
|
1539
1557
|
mode: "text",
|
|
1540
|
-
onClick: (e) => S(
|
|
1558
|
+
onClick: (e) => S(X)(f.field)
|
|
1541
1559
|
}, {
|
|
1542
1560
|
default: T(() => [...d[4] ||= [o(" 筛选 ", -1)]]),
|
|
1543
1561
|
_: 1
|
|
@@ -1546,7 +1564,7 @@ var _e = (e) => {
|
|
|
1546
1564
|
type: "primary",
|
|
1547
1565
|
size: "small",
|
|
1548
1566
|
mode: "text",
|
|
1549
|
-
onClick: (e) => S(
|
|
1567
|
+
onClick: (e) => S(ot)(f.field)
|
|
1550
1568
|
}, {
|
|
1551
1569
|
default: T(() => [...d[5] ||= [o(" 重置 ", -1)]]),
|
|
1552
1570
|
_: 1
|
|
@@ -1555,14 +1573,14 @@ var _e = (e) => {
|
|
|
1555
1573
|
type: "primary",
|
|
1556
1574
|
size: "small",
|
|
1557
1575
|
mode: "text",
|
|
1558
|
-
onClick: d[0] ||= (e) => S(
|
|
1576
|
+
onClick: d[0] ||= (e) => S(ot)()
|
|
1559
1577
|
}, {
|
|
1560
1578
|
default: T(() => [...d[6] ||= [o(" 重置所有 ", -1)]]),
|
|
1561
1579
|
_: 1
|
|
1562
1580
|
})
|
|
1563
1581
|
])
|
|
1564
|
-
], 12,
|
|
1565
|
-
])) : (h(), i("span",
|
|
1582
|
+
], 12, Te)])) : r("", !0)])) : r("", !0)
|
|
1583
|
+
])) : (h(), i("span", B)), f?.resizable && !f.children?.length ? (h(), i("div", {
|
|
1566
1584
|
key: 4,
|
|
1567
1585
|
style: {
|
|
1568
1586
|
position: "absolute",
|
|
@@ -1572,16 +1590,16 @@ var _e = (e) => {
|
|
|
1572
1590
|
height: "100%",
|
|
1573
1591
|
cursor: "col-resize"
|
|
1574
1592
|
},
|
|
1575
|
-
onMousedown: D((e) => S(
|
|
1576
|
-
}, null, 40,
|
|
1577
|
-
S(
|
|
1593
|
+
onMousedown: D((e) => S(ut)(e, f), ["prevent", "stop"])
|
|
1594
|
+
}, null, 40, Ae)) : r("", !0)], 14, be))), 128))], 64))), 128))], 4),
|
|
1595
|
+
S(N).length == 0 ? (h(), i("div", {
|
|
1578
1596
|
key: 0,
|
|
1579
1597
|
style: u([{
|
|
1580
1598
|
display: "flex",
|
|
1581
1599
|
"align-items": "center",
|
|
1582
1600
|
position: "absolute",
|
|
1583
1601
|
left: "calc(50% - 35px)"
|
|
1584
|
-
}, { minHeight: `${S($) - S(
|
|
1602
|
+
}, { minHeight: `${S($) - S(M) - S(ve) - 30}px` }])
|
|
1585
1603
|
}, " 暂无数据 ", 4)) : r("", !0),
|
|
1586
1604
|
a("div", {
|
|
1587
1605
|
class: "pretextTable-grid",
|
|
@@ -1592,13 +1610,13 @@ var _e = (e) => {
|
|
|
1592
1610
|
contain: "layout paint style",
|
|
1593
1611
|
position: "relative"
|
|
1594
1612
|
}, {
|
|
1595
|
-
minHeight: S($) - S(
|
|
1596
|
-
height: `${S(
|
|
1613
|
+
minHeight: S($) - S(M) - S(ve) - S(he) - p.heightOffset + "px",
|
|
1614
|
+
height: `${S(pe)}px`
|
|
1597
1615
|
}])
|
|
1598
1616
|
}, [a("div", {
|
|
1599
1617
|
class: "pretextTable-grid-empty",
|
|
1600
|
-
style: u({ height: `${S(
|
|
1601
|
-
}, null, 4), (h(!0), i(e, null, _(S(
|
|
1618
|
+
style: u({ height: `${S(se)}px` })
|
|
1619
|
+
}, 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", {
|
|
1602
1620
|
key: 0,
|
|
1603
1621
|
class: "pretextTable-grid-item",
|
|
1604
1622
|
style: u([{
|
|
@@ -1620,34 +1638,34 @@ var _e = (e) => {
|
|
|
1620
1638
|
"min-width": "100%",
|
|
1621
1639
|
"align-content": "start",
|
|
1622
1640
|
contain: "layout style paint"
|
|
1623
|
-
}, { gridTemplateColumns: S(
|
|
1624
|
-
}, [(h(!0), i(e, null, _(S(
|
|
1641
|
+
}, { gridTemplateColumns: S(I) }])
|
|
1642
|
+
}, [(h(!0), i(e, null, _(S(F), (f, g) => (h(), i("div", {
|
|
1625
1643
|
key: "item_" + f.field,
|
|
1626
1644
|
class: l(["pretextTable-grid-item pretextTable-flex-align-items-center", {
|
|
1627
|
-
"pretextTable-grid-item-hover": p.rowConfig?.isHover && S(
|
|
1628
|
-
"pretextTable-grid-item-current": p.rowConfig?.isCurrent && S(
|
|
1645
|
+
"pretextTable-grid-item-hover": p.rowConfig?.isHover && S(Ue)[S(m).id] == t[S(m).id],
|
|
1646
|
+
"pretextTable-grid-item-current": p.rowConfig?.isCurrent && S(ze)[S(m).id] == t[S(m).id],
|
|
1629
1647
|
"pretextTable-grid-item-stripe": p.stripe && t[S(m).stripe]
|
|
1630
1648
|
}]),
|
|
1631
1649
|
style: u({
|
|
1632
|
-
fontWeight: S(
|
|
1633
|
-
fontSize: S(
|
|
1650
|
+
fontWeight: S(W).fontWeight,
|
|
1651
|
+
fontSize: S(W).fontSize,
|
|
1634
1652
|
zIndex: +(f.fixed == "left" || f.fixed == "right"),
|
|
1635
1653
|
position: f.fixed == "left" || f.fixed == "right" ? "sticky" : "static",
|
|
1636
|
-
left: f.fixed == "left" ? S(
|
|
1637
|
-
right: f.fixed == "right" ? S(
|
|
1654
|
+
left: f.fixed == "left" ? S(K)[g] : "",
|
|
1655
|
+
right: f.fixed == "right" ? S(q)[g] : "",
|
|
1638
1656
|
borderLeft: f.fixed == "right" ? "1px solid var(--pretextTable-border-color)" : "",
|
|
1639
|
-
boxShadow: f.fixed == "left" && g == S(
|
|
1657
|
+
boxShadow: f.fixed == "left" && g == S(G) ? "var(--pretextTable-shadow-color) 2px 0px 5px -1px" : f.fixed == "right" && g == S(Re) ? "var(--pretextTable-shadow-color) -2px 0px 5px -1px" : "",
|
|
1640
1658
|
height: `${t[S(m).height]}px`,
|
|
1641
1659
|
justifyContent: f.type == "checkbox" || f.slots?.defaultType == "checkbox" ? "center" : ""
|
|
1642
1660
|
}),
|
|
1643
|
-
onClick: (e) => S(
|
|
1644
|
-
onMouseenter: (e) => S(
|
|
1645
|
-
}, [f.fixed == "left" || f.fixed == "right" || g >= S(
|
|
1661
|
+
onClick: (e) => S(Ve)(t, f),
|
|
1662
|
+
onMouseenter: (e) => S(We)(t)
|
|
1663
|
+
}, [f.fixed == "left" || f.fixed == "right" || g >= S(ce) && g <= S(P) ? (h(), i("div", {
|
|
1646
1664
|
key: 0,
|
|
1647
1665
|
class: l([
|
|
1648
1666
|
"pretextTable-grid-cell",
|
|
1649
1667
|
"pretextTable-grid-cell" + f.field,
|
|
1650
|
-
f.cellClassName ? S(
|
|
1668
|
+
f.cellClassName ? S(Ge)({
|
|
1651
1669
|
column: f,
|
|
1652
1670
|
row: t,
|
|
1653
1671
|
index: g
|
|
@@ -1656,7 +1674,7 @@ var _e = (e) => {
|
|
|
1656
1674
|
])
|
|
1657
1675
|
}, [p.treeConfig?.isOpenTree && f.treeNode ? (h(), i(e, { key: 0 }, [a("span", { style: u({
|
|
1658
1676
|
marginLeft: (Number(t[S(m).level]) - 1) * (p.treeConfig?.indent || S(pt).indent) + "px",
|
|
1659
|
-
paddingLeft: S(
|
|
1677
|
+
paddingLeft: S(W).paddingLeft
|
|
1660
1678
|
}) }, null, 4), p.treeConfig?.showIcon === !1 ? r("", !0) : (h(), i(e, { key: 0 }, [t[p.treeConfig?.childrenField || S(pt).childrenField]?.length > 0 || p.treeConfig?.lazy && t[p.treeConfig?.hasChildField || S(pt).hasChildField] ? (h(), i(e, { key: 0 }, [
|
|
1661
1679
|
E(s(S(A), {
|
|
1662
1680
|
name: "spinner",
|
|
@@ -1666,19 +1684,19 @@ var _e = (e) => {
|
|
|
1666
1684
|
name: "caret-right",
|
|
1667
1685
|
style: {},
|
|
1668
1686
|
class: "pretextTable-icon",
|
|
1669
|
-
onClick: D((e) => S(
|
|
1687
|
+
onClick: D((e) => S(dt)([t], !0), ["stop"])
|
|
1670
1688
|
}, null, 8, ["onClick"]), [[C, !t[S(m).isCollapsed] && !t[S(m).lazyLoading]]]),
|
|
1671
1689
|
E(s(S(A), {
|
|
1672
1690
|
name: "caret-down",
|
|
1673
1691
|
style: {},
|
|
1674
1692
|
class: "pretextTable-icon",
|
|
1675
|
-
onClick: D((e) => S(
|
|
1693
|
+
onClick: D((e) => S(dt)([t], !1), ["stop"])
|
|
1676
1694
|
}, null, 8, ["onClick"]), [[C, t[S(m).isCollapsed] && !t[S(m).lazyLoading]]])
|
|
1677
1695
|
], 64)) : r("", !0)], 64))], 64)) : r("", !0), f.type == "checkbox" ? (h(), n(S(k), {
|
|
1678
1696
|
key: 1,
|
|
1679
1697
|
modelValue: !!t[f.field],
|
|
1680
1698
|
indeterminate: t[S(m).checkedIndeterminate + f.field],
|
|
1681
|
-
onChange: (e) => S(
|
|
1699
|
+
onChange: (e) => S(Ye)(t, f.field)
|
|
1682
1700
|
}, null, 8, [
|
|
1683
1701
|
"modelValue",
|
|
1684
1702
|
"indeterminate",
|
|
@@ -1687,9 +1705,9 @@ var _e = (e) => {
|
|
|
1687
1705
|
key: 0,
|
|
1688
1706
|
style: u({
|
|
1689
1707
|
marginLeft: `${(Number(t[S(m).level]) - 1) * (p.treeConfig?.indent || 20)}px`,
|
|
1690
|
-
paddingLeft: S(
|
|
1708
|
+
paddingLeft: S(W).paddingLeft
|
|
1691
1709
|
})
|
|
1692
|
-
}, null, 4)) : r("", !0), o(" " + b(t.pretextSeq), 1)], 64)) : f.type == "expand" ? (h(), i("span",
|
|
1710
|
+
}, null, 4)) : r("", !0), o(" " + b(t.pretextSeq), 1)], 64)) : f.type == "expand" ? (h(), i("span", je, [E(s(S(A), {
|
|
1693
1711
|
name: "arrow-right",
|
|
1694
1712
|
style: {},
|
|
1695
1713
|
class: "pretextTable-icon",
|
|
@@ -1701,11 +1719,11 @@ var _e = (e) => {
|
|
|
1701
1719
|
onClick: D((e) => S(Q)([t], !1), ["stop"])
|
|
1702
1720
|
}, null, 8, ["onClick"]), [[C, t[S(m).isRowExpanded]]])])) : f.slots?.defaultType == "a" ? (h(), i("span", {
|
|
1703
1721
|
key: 4,
|
|
1704
|
-
style: u({ paddingLeft: S(
|
|
1705
|
-
}, [a("a", { onClick: D((e) => f.slots?.defaultProps?.a?.onClick?.(t, g), ["stop"]) }, b(t[f.field] || ""), 9,
|
|
1722
|
+
style: u({ paddingLeft: S(W).paddingLeft })
|
|
1723
|
+
}, [a("a", { onClick: D((e) => f.slots?.defaultProps?.a?.onClick?.(t, g), ["stop"]) }, b(t[f.field] || ""), 9, Me)], 4)) : f.slots?.defaultType == "tag" ? (h(), i("span", {
|
|
1706
1724
|
key: 5,
|
|
1707
|
-
style: u({ paddingLeft: S(
|
|
1708
|
-
}, [(h(!0), i(e, null, _(f.slots?.defaultProps?.tag?.options || [], (a) => (h(), i(e, null, [a.value == t[f.field] ? (h(), n(S(
|
|
1725
|
+
style: u({ paddingLeft: S(W).paddingLeft })
|
|
1726
|
+
}, [(h(!0), i(e, null, _(f.slots?.defaultProps?.tag?.options || [], (a) => (h(), i(e, null, [a.value == t[f.field] ? (h(), n(S(oe), {
|
|
1709
1727
|
key: 0,
|
|
1710
1728
|
size: "mini",
|
|
1711
1729
|
border: !0,
|
|
@@ -1721,14 +1739,14 @@ var _e = (e) => {
|
|
|
1721
1739
|
"style"
|
|
1722
1740
|
])) : r("", !0)], 64))), 256))], 4)) : f.slots?.defaultType == "icon" ? (h(), i("span", {
|
|
1723
1741
|
key: 6,
|
|
1724
|
-
style: u({ paddingLeft: S(
|
|
1742
|
+
style: u({ paddingLeft: S(W).paddingLeft })
|
|
1725
1743
|
}, [E(s(S(A), {
|
|
1726
1744
|
name: f.slots?.defaultProps?.icon?.nameField ? t[f.slots?.defaultProps?.icon?.nameField] || "" : f.slots?.defaultProps?.icon?.name || "",
|
|
1727
1745
|
style: u(f.slots?.defaultProps?.icon?.styleField ? t[f.slots?.defaultProps?.icon?.styleField] || {} : f.slots?.defaultProps?.icon?.style || {})
|
|
1728
1746
|
}, null, 8, ["name", "style"]), [[C, t[f.field]]])], 4)) : f.slots?.defaultType == "buttons" ? (h(), i("div", {
|
|
1729
1747
|
key: 7,
|
|
1730
|
-
style: u({ paddingLeft: S(
|
|
1731
|
-
}, [f.slots?.defaultProps?.buttons?.options?.length ? (h(!0), i(e, { key: 0 }, _(f.slots?.defaultProps?.buttons?.options || [], (n) => (h(), i("div",
|
|
1748
|
+
style: u({ paddingLeft: S(W).paddingLeft })
|
|
1749
|
+
}, [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", {
|
|
1732
1750
|
key: 0,
|
|
1733
1751
|
title: n.tip || ""
|
|
1734
1752
|
}, [s(S(O), {
|
|
@@ -1750,10 +1768,10 @@ var _e = (e) => {
|
|
|
1750
1768
|
"disabled",
|
|
1751
1769
|
"loading",
|
|
1752
1770
|
"onClick"
|
|
1753
|
-
])], 8,
|
|
1771
|
+
])], 8, Pe)) : r("", !0)], 64))), 256))]))), 256)) : r("", !0)], 4)) : f.slots?.defaultType == "switch" ? (h(), i("span", {
|
|
1754
1772
|
key: 8,
|
|
1755
|
-
style: u({ paddingLeft: S(
|
|
1756
|
-
}, [!f.slots?.defaultProps?.switch?.showField || t[f.slots?.defaultProps?.switch?.showField] ? (h(), n(S(
|
|
1773
|
+
style: u({ paddingLeft: S(W).paddingLeft })
|
|
1774
|
+
}, [!f.slots?.defaultProps?.switch?.showField || t[f.slots?.defaultProps?.switch?.showField] ? (h(), n(S(ae), {
|
|
1757
1775
|
key: 0,
|
|
1758
1776
|
size: "mini",
|
|
1759
1777
|
modelValue: t[f.field],
|
|
@@ -1771,7 +1789,7 @@ var _e = (e) => {
|
|
|
1771
1789
|
"closeValue",
|
|
1772
1790
|
"disabled",
|
|
1773
1791
|
"onChange"
|
|
1774
|
-
])) : r("", !0)], 4)) : f.slots?.defaultType == "checkbox" ? (h(), i(e, { key: 9 }, [!f.slots?.defaultProps?.checkbox?.showField || t[f.slots?.defaultProps?.checkbox?.showField] ? (h(), i("span",
|
|
1792
|
+
])) : r("", !0)], 4)) : f.slots?.defaultType == "checkbox" ? (h(), i(e, { key: 9 }, [!f.slots?.defaultProps?.checkbox?.showField || t[f.slots?.defaultProps?.checkbox?.showField] ? (h(), i("span", Fe, [s(S(k), {
|
|
1775
1793
|
modelValue: f.slots?.defaultProps?.checkbox?.checkedValue ? t[f.field] == f.slots?.defaultProps?.checkbox?.checkedValue : !!t[f.field],
|
|
1776
1794
|
indeterminate: f.slots?.defaultProps?.checkbox?.checkedIndeterminateField ? t[f.slots?.defaultProps?.checkbox?.checkedIndeterminateField] : !1,
|
|
1777
1795
|
disabled: f.slots?.defaultProps?.checkbox?.disabledField && t[f.slots?.defaultProps?.checkbox?.disabledField],
|
|
@@ -1783,15 +1801,15 @@ var _e = (e) => {
|
|
|
1783
1801
|
"onChange"
|
|
1784
1802
|
])])) : r("", !0)], 64)) : (h(), i("span", {
|
|
1785
1803
|
key: 10,
|
|
1786
|
-
style: u({ paddingLeft: S(
|
|
1804
|
+
style: u({ paddingLeft: S(W).paddingLeft }),
|
|
1787
1805
|
title: p.showOverflow && t[f.field] || ""
|
|
1788
1806
|
}, [f.slots?.default ? (h(), i(e, { key: 0 }, [!p.lazyLoadSlot || t.slotShowTimestamp == S(mt) ? v(c.$slots, f.slots?.default, {
|
|
1789
1807
|
key: 0,
|
|
1790
1808
|
row: t,
|
|
1791
1809
|
column: f,
|
|
1792
1810
|
rowIndex: d
|
|
1793
|
-
}, () => [o(b(t[f.field] ?? ""), 1)]) : r("", !0)], 64)) : (h(), i(e, { key: 1 }, [o(b(t[f.field] ?? ""), 1)], 64))], 12,
|
|
1794
|
-
p.showFooter && S(
|
|
1811
|
+
}, () => [o(b(t[f.field] ?? ""), 1)]) : r("", !0)], 64)) : (h(), i(e, { key: 1 }, [o(b(t[f.field] ?? ""), 1)], 64))], 12, Ie))], 2)) : r("", !0)], 46, U))), 128))], 4))], 64))), 128))], 4),
|
|
1812
|
+
p.showFooter && S(R).length > 0 ? (h(), i("div", {
|
|
1795
1813
|
key: 1,
|
|
1796
1814
|
style: u([{
|
|
1797
1815
|
display: "grid",
|
|
@@ -1802,17 +1820,17 @@ var _e = (e) => {
|
|
|
1802
1820
|
contain: "layout paint style",
|
|
1803
1821
|
bottom: "0",
|
|
1804
1822
|
"z-index": "1"
|
|
1805
|
-
}, { gridTemplateColumns: S(
|
|
1806
|
-
}, [(h(!0), i(e, null, _(S(
|
|
1823
|
+
}, { gridTemplateColumns: S(I) }])
|
|
1824
|
+
}, [(h(!0), i(e, null, _(S(R), (t) => (h(), i(e, null, [(h(!0), i(e, null, _(t, (e, t) => (h(), i("div", {
|
|
1807
1825
|
key: "footer_" + e.field,
|
|
1808
1826
|
class: l(["pretextTable-grid-footer", "pretextTable-grid-footer" + e.field]),
|
|
1809
1827
|
style: u({
|
|
1810
|
-
fontSize: S(
|
|
1828
|
+
fontSize: S(me).fontSize,
|
|
1811
1829
|
zIndex: t == 0 ? 3 : e.fixed == "left" || e.fixed == "right" ? 2 : 1,
|
|
1812
|
-
left: e.fixed == "left" ? S(
|
|
1813
|
-
right: e.fixed == "right" ? S(
|
|
1830
|
+
left: e.fixed == "left" ? S(K)[t] : "",
|
|
1831
|
+
right: e.fixed == "right" ? S(q)[t] : "",
|
|
1814
1832
|
borderLeft: e.fixed == "right" ? "1px solid var(--pretextTable-border-color)" : "",
|
|
1815
|
-
boxShadow: e.fixed == "left" && t == S(
|
|
1833
|
+
boxShadow: e.fixed == "left" && t == S(G) ? "var(--pretextTable-shadow-color) 2px 0px 5px -1px" : e.fixed == "right" && t == S(Re) ? "var(--pretextTable-shadow-color) -2px 0px 5px -1px" : "",
|
|
1816
1834
|
height: `${e.height}px`,
|
|
1817
1835
|
maxHeight: `${e.height}px`
|
|
1818
1836
|
})
|
|
@@ -1821,7 +1839,7 @@ var _e = (e) => {
|
|
|
1821
1839
|
footerColumn: e,
|
|
1822
1840
|
footerData: e.data,
|
|
1823
1841
|
footerRowIndex: t
|
|
1824
|
-
}, () => [o(b(e.data ?? ""), 1)]) : (h(), i("span",
|
|
1842
|
+
}, () => [o(b(e.data ?? ""), 1)]) : (h(), i("span", Le, b(e.data ?? ""), 1))], 6))), 128))], 64))), 256))], 4)) : r("", !0)
|
|
1825
1843
|
], 36),
|
|
1826
1844
|
E(a("div", { style: u([{
|
|
1827
1845
|
position: "absolute",
|
|
@@ -1832,15 +1850,15 @@ var _e = (e) => {
|
|
|
1832
1850
|
"z-index": "99999",
|
|
1833
1851
|
"box-shadow": "0 0 2px rgba(64, 158, 255, 0.5)"
|
|
1834
1852
|
}, {
|
|
1835
|
-
transform: `translateX(${S(
|
|
1853
|
+
transform: `translateX(${S(lt)}px)`,
|
|
1836
1854
|
height: S($) + "px"
|
|
1837
|
-
}]) }, null, 4), [[C, S(
|
|
1855
|
+
}]) }, null, 4), [[C, S(ct)]]),
|
|
1838
1856
|
a("div", { style: u({ backgroundColor: S(ht) ? "red" : "" }) }, null, 4)
|
|
1839
1857
|
], 512));
|
|
1840
1858
|
}
|
|
1841
|
-
}),
|
|
1842
|
-
|
|
1843
|
-
e.component("HolyesTable",
|
|
1859
|
+
}), G = W;
|
|
1860
|
+
G.install = (e) => {
|
|
1861
|
+
e.component("HolyesTable", G);
|
|
1844
1862
|
};
|
|
1845
1863
|
//#endregion
|
|
1846
|
-
export {
|
|
1864
|
+
export { G as default, W as pretextTable };
|