holyes-table 1.0.10 → 1.0.12
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 +8 -2
- package/dist/index.mjs +728 -623
- package/dist/lib/pretextTable/config.d.ts +12 -0
- package/dist/lib/pretextTable/hook/useCheckbox.d.ts +12 -5
- package/dist/lib/pretextTable/hook/useExpand.d.ts +1 -2
- package/dist/lib/pretextTable/hook/useFilter.d.ts +1 -3
- package/dist/lib/pretextTable/hook/useSort.d.ts +1 -2
- package/dist/lib/pretextTable/hook/useTree.d.ts +2 -14
- package/dist/lib/pretextTable/pretextTable.vue.d.ts +1 -1
- package/dist/lib/pretextTable/type.d.ts +15 -3
- package/dist/lib/pretextTable/useHolyesTable.d.ts +6 -17
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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
|
|
2
|
-
import { VxeButton as
|
|
3
|
-
import
|
|
1
|
+
import { Fragment as e, Teleport as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, normalizeClass as l, normalizeStyle as u, onActivated as d, onDeactivated as f, onMounted as p, onUnmounted as m, openBlock as h, ref as g, renderList as _, renderSlot as v, shallowRef as y, toDisplayString as b, toRaw as x, unref as S, vShow as C, watch as w, withCtx as T, withDirectives as E, withKeys as ee, withModifiers as D } from "vue";
|
|
2
|
+
import { VxeButton as O, VxeCheckbox as k, VxeCheckboxGroup as te, VxeIcon as A, VxeInput as ne, VxeLoading as re, VxeNumberInput as ie, VxeRadioGroup as ae, VxeSwitch as oe, VxeTag as se } from "vxe-pc-ui";
|
|
3
|
+
import j, { debounce as ce, isNaN as M, orderBy as le, toArrayTree as ue } from "xe-utils";
|
|
4
4
|
//#region lib/pretextTable/worker/pretextTableGetItemHeight.ts?worker&inline
|
|
5
|
-
var
|
|
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" });
|
|
6
6
|
function de(e) {
|
|
7
7
|
let t;
|
|
8
8
|
try {
|
|
@@ -12,7 +12,7 @@ function de(e) {
|
|
|
12
12
|
(self.URL || self.webkitURL).revokeObjectURL(t);
|
|
13
13
|
}), n;
|
|
14
14
|
} catch {
|
|
15
|
-
return new Worker("data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
15
|
+
return new Worker("data:text/javascript;charset=utf-8," + encodeURIComponent(N), { name: e?.name });
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
@@ -93,109 +93,212 @@ 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
|
+
}, F = {
|
|
97
|
+
id: "pretextId",
|
|
98
|
+
seq: "pretextSeq",
|
|
99
|
+
stripe: "pretextStripe",
|
|
100
|
+
height: "pretextHeight",
|
|
101
|
+
isCollapsed: "pretextIsCollapsed",
|
|
102
|
+
level: "pretextLevel",
|
|
103
|
+
lazyLoading: "pretextLazyLoading",
|
|
104
|
+
index: "pretextIndex",
|
|
105
|
+
filterChildren: "pretextFilterChildren",
|
|
106
|
+
isRowExpanded: "pretextIsRowExpanded",
|
|
107
|
+
isExpandRow: "pretextIsExpandRow",
|
|
108
|
+
expandChildren: "pretextExpandChildren",
|
|
109
|
+
parentRow: "pretextParentRow",
|
|
110
|
+
checkedIndeterminate: "pretextCheckedIndeterminate_"
|
|
111
|
+
}, I = {
|
|
112
|
+
isOpenTree: !1,
|
|
113
|
+
transform: !0,
|
|
114
|
+
idField: "",
|
|
115
|
+
parentField: "parentId",
|
|
116
|
+
childrenField: "children",
|
|
117
|
+
indent: 20,
|
|
118
|
+
trigger: "default",
|
|
119
|
+
lazy: !1,
|
|
120
|
+
hasChildField: "hasChild",
|
|
121
|
+
showIcon: !0,
|
|
122
|
+
checkStrictly: !0
|
|
96
123
|
};
|
|
97
124
|
//#endregion
|
|
98
125
|
//#region lib/pretextTable/hook/useCheckbox.ts
|
|
99
126
|
function me(e) {
|
|
100
|
-
let { columns: t, blurAnyElement: n, nowDataSource: r, baseDataSource: i, emits: a } = e, o = "checkbox",
|
|
101
|
-
|
|
102
|
-
|
|
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 = "checkbox", f = [], p = () => {
|
|
128
|
+
f = [];
|
|
129
|
+
for (let e of t.value) e.type == "checkbox" && (f.push(e.field), d = e.field);
|
|
130
|
+
return f;
|
|
131
|
+
}, m = g({}), h = g({}), _ = (e) => {
|
|
103
132
|
switch (n(), !0) {
|
|
104
|
-
case
|
|
105
|
-
case !
|
|
106
|
-
|
|
107
|
-
for (let e of r.value) e[o] = !0;
|
|
133
|
+
case h.value[e] == 1:
|
|
134
|
+
case !m.value[e]:
|
|
135
|
+
m.value[e] = !0, h.value[e] = !1, u ? b(r.value, !0, e) : x(r.value, !0, e);
|
|
108
136
|
break;
|
|
109
137
|
default:
|
|
110
|
-
|
|
111
|
-
for (let e of r.value) e[o] = !1;
|
|
138
|
+
m.value[e] = !1, h.value[e] = !1, u ? b(r.value, !1, e) : x(r.value, !1, e);
|
|
112
139
|
break;
|
|
113
140
|
}
|
|
114
141
|
a("checkboxAll");
|
|
115
|
-
},
|
|
116
|
-
let
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
142
|
+
}, v = (e) => {
|
|
143
|
+
let t = {}, n = [];
|
|
144
|
+
if (e ? n.push(e) : n = p(), u) {
|
|
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
|
+
for (let e of n) {
|
|
147
|
+
let n = t[e + "checkedCount"] || 0, i = t[e + "indeterminateCount"] || 0;
|
|
148
|
+
switch (!0) {
|
|
149
|
+
case n == 0 && i == 0:
|
|
150
|
+
h.value[e] = !1, m.value[e] = !1;
|
|
151
|
+
break;
|
|
152
|
+
case n == r.value.length && i == 0:
|
|
153
|
+
h.value[e] = !1, m.value[e] = !0;
|
|
154
|
+
break;
|
|
155
|
+
default:
|
|
156
|
+
h.value[e] = !0, m.value[e] = !1;
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
} else {
|
|
161
|
+
let e = (n, r) => {
|
|
162
|
+
if (t[r + "allCount"] = (t[r + "allCount"] || 0) + 1, n[r] && (t[r + "checkedCount"] = (t[r + "checkedCount"] || 0) + 1), n?.[c]?.length) for (let t of n[c]) e(t, r);
|
|
163
|
+
else if (n?.[l]?.length) for (let t of n[l]) e(t, r);
|
|
164
|
+
};
|
|
165
|
+
for (let t of r.value) for (let r of n) e(t, r);
|
|
166
|
+
for (let e of n) {
|
|
167
|
+
let n = t[e + "checkedCount"] || 0, r = t[e + "allCount"] || 0;
|
|
168
|
+
switch (!0) {
|
|
169
|
+
case n == 0:
|
|
170
|
+
h.value[e] = !1, m.value[e] = !1;
|
|
171
|
+
break;
|
|
172
|
+
case n == r:
|
|
173
|
+
h.value[e] = !1, m.value[e] = !0;
|
|
174
|
+
break;
|
|
175
|
+
default:
|
|
176
|
+
h.value[e] = !0, m.value[e] = !1;
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
129
180
|
}
|
|
181
|
+
}, y = (e, t) => {
|
|
182
|
+
if (!s || !u) return;
|
|
183
|
+
let n = t ?? f[0];
|
|
184
|
+
if (!e) return;
|
|
185
|
+
let r = e?.[F.parentRow], i = [];
|
|
186
|
+
e?.[c]?.length ? i = e[c] : e?.[l]?.length && (i = e[l]);
|
|
187
|
+
let a = 0, o = 0;
|
|
188
|
+
if (i.length) {
|
|
189
|
+
for (let e of i) e[n] && a++, e[F.checkedIndeterminate + n] && o++;
|
|
190
|
+
switch (!0) {
|
|
191
|
+
case a == 0 && o == 0:
|
|
192
|
+
e[n] = !1, e[F.checkedIndeterminate + n] = !1;
|
|
193
|
+
break;
|
|
194
|
+
case a == i.length && o == 0:
|
|
195
|
+
e[n] = !0, e[F.checkedIndeterminate + n] = !1;
|
|
196
|
+
break;
|
|
197
|
+
default:
|
|
198
|
+
e[n] = !1, e[F.checkedIndeterminate + n] = !0;
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
y(r, n);
|
|
203
|
+
}, b = (e, t, n) => {
|
|
204
|
+
let r = n ?? f[0];
|
|
205
|
+
for (let n of e) n[r] = t, n[F.checkedIndeterminate + r] = !1, s && u && (n[c]?.length ? b(n[c], t, r) : n[l]?.length && b(n[l], t, r));
|
|
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));
|
|
130
209
|
};
|
|
131
210
|
return {
|
|
132
|
-
getCheckField:
|
|
133
|
-
headerChecked:
|
|
134
|
-
headerCheckedIndeterminate:
|
|
135
|
-
onHeaderChecked:
|
|
136
|
-
|
|
137
|
-
|
|
211
|
+
getCheckField: p,
|
|
212
|
+
headerChecked: m,
|
|
213
|
+
headerCheckedIndeterminate: h,
|
|
214
|
+
onHeaderChecked: _,
|
|
215
|
+
upDataHeaderChecked: v,
|
|
216
|
+
upDataAllRowCheckedDeep: () => {
|
|
217
|
+
if (u) {
|
|
218
|
+
let e = /* @__PURE__ */ new Map(), t = (n) => {
|
|
219
|
+
let r = [];
|
|
220
|
+
if (n?.[c]?.length ? r = n[c] : n?.[l]?.length && (r = n[l]), r.length) for (let e of r) t(e);
|
|
221
|
+
else {
|
|
222
|
+
let t = n?.[F.parentRow];
|
|
223
|
+
t && e.set(t[F.id], t);
|
|
224
|
+
}
|
|
225
|
+
}, n = r.value;
|
|
226
|
+
for (let e of n) t(e);
|
|
227
|
+
e.forEach((e) => {
|
|
228
|
+
for (let t of f) y(e, t);
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
v(void 0);
|
|
232
|
+
},
|
|
233
|
+
onCellChecked: (t, n) => {
|
|
234
|
+
e.blurAnyElement();
|
|
235
|
+
let r = n ?? f[0];
|
|
236
|
+
t[r] ? b([t], !1, r) : b([t], !0, r), y(t, r), v(r), a("checkboxChange", {
|
|
237
|
+
row: t,
|
|
238
|
+
checked: t[r],
|
|
239
|
+
field: r
|
|
240
|
+
});
|
|
138
241
|
},
|
|
139
242
|
getCheckboxRecords: (e) => {
|
|
140
243
|
let t = [];
|
|
141
|
-
return t = e ? i.value : r.value, t.filter((e) => e[
|
|
244
|
+
return t = e ? i.value : r.value, t.filter((e) => e[d]);
|
|
142
245
|
},
|
|
143
246
|
clearCheckboxRowInit: () => {
|
|
144
|
-
|
|
247
|
+
m.value = {}, h.value = {};
|
|
145
248
|
}
|
|
146
249
|
};
|
|
147
250
|
}
|
|
148
251
|
//#endregion
|
|
149
252
|
//#region lib/pretextTable/hook/useSort.ts
|
|
150
|
-
function
|
|
151
|
-
let {
|
|
253
|
+
function L(e) {
|
|
254
|
+
let { nowDataSource: t, getVisibleData: n, setNowDataSource: r, treeConfig: i, defaultTreeConfig: a } = e, o = g(""), s = g(null), c = (e, t) => {
|
|
152
255
|
if (t === "auto") switch (!0) {
|
|
153
|
-
case e !==
|
|
154
|
-
case
|
|
155
|
-
|
|
256
|
+
case e !== o.value:
|
|
257
|
+
case s.value === null:
|
|
258
|
+
s.value = "asc", o.value = e;
|
|
156
259
|
break;
|
|
157
|
-
case
|
|
158
|
-
|
|
260
|
+
case s.value === "asc":
|
|
261
|
+
s.value = "desc", o.value = e;
|
|
159
262
|
break;
|
|
160
|
-
case
|
|
161
|
-
|
|
263
|
+
case s.value === "desc":
|
|
264
|
+
s.value = null, o.value = "";
|
|
162
265
|
break;
|
|
163
266
|
default:
|
|
164
|
-
|
|
267
|
+
s.value = "asc", o.value = e;
|
|
165
268
|
break;
|
|
166
269
|
}
|
|
167
|
-
else t ===
|
|
168
|
-
|
|
169
|
-
},
|
|
170
|
-
let r =
|
|
171
|
-
if (
|
|
172
|
-
let e =
|
|
270
|
+
else t === s.value && e === o.value ? (s.value = null, o.value = "") : (s.value = t, o.value = e);
|
|
271
|
+
u();
|
|
272
|
+
}, l = (e, t, n) => {
|
|
273
|
+
let r = le(e, [[(e) => M(Number(e[t])) ? e[t] || "" : Number(e[t]), n]]);
|
|
274
|
+
if (i?.isOpenTree) {
|
|
275
|
+
let e = i?.childrenField || a?.childrenField;
|
|
173
276
|
for (let i of r) {
|
|
174
277
|
let r = i[e] || [];
|
|
175
|
-
r?.length && (i[e] =
|
|
278
|
+
r?.length && (i[e] = l(r, t, n));
|
|
176
279
|
}
|
|
177
280
|
}
|
|
178
281
|
return r;
|
|
179
|
-
},
|
|
180
|
-
|
|
282
|
+
}, u = () => {
|
|
283
|
+
s.value === null ? r(l(t.value, F.index, "asc")) : r(l(t.value, o.value, s.value)), n();
|
|
181
284
|
};
|
|
182
285
|
return {
|
|
183
|
-
sortField:
|
|
184
|
-
sortOrder:
|
|
185
|
-
sort:
|
|
186
|
-
handleSort:
|
|
286
|
+
sortField: o,
|
|
287
|
+
sortOrder: s,
|
|
288
|
+
sort: c,
|
|
289
|
+
handleSort: u
|
|
187
290
|
};
|
|
188
291
|
}
|
|
189
292
|
//#endregion
|
|
190
293
|
//#region lib/pretextTable/hook/useFilter.ts
|
|
191
|
-
function
|
|
192
|
-
let {
|
|
294
|
+
function he(e) {
|
|
295
|
+
let { columns: t, baseDataSource: n, setNowDataSource: r, scrollTo: i, refresh: a, afterFilter: o, treeConfig: s, defaultTreeConfig: c } = e, l = [{
|
|
193
296
|
label: "模糊搜索",
|
|
194
297
|
value: "模糊"
|
|
195
298
|
}, {
|
|
196
299
|
label: "精确搜索",
|
|
197
300
|
value: "精确"
|
|
198
|
-
}],
|
|
301
|
+
}], u = [
|
|
199
302
|
{
|
|
200
303
|
label: ">",
|
|
201
304
|
value: ">"
|
|
@@ -216,9 +319,9 @@ function ge(e) {
|
|
|
216
319
|
label: "≤",
|
|
217
320
|
value: "≤"
|
|
218
321
|
}
|
|
219
|
-
],
|
|
220
|
-
|
|
221
|
-
for (let e of
|
|
322
|
+
], d = g([]), f = /* @__PURE__ */ new Map(), p = !1, h = () => {
|
|
323
|
+
d.value = [], f.clear(), p = !1;
|
|
324
|
+
for (let e of t.value) if (e.isFilter?.type) {
|
|
222
325
|
let t = {
|
|
223
326
|
field: e.field,
|
|
224
327
|
type: e.isFilter.type,
|
|
@@ -228,7 +331,7 @@ function ge(e) {
|
|
|
228
331
|
isActive: !1,
|
|
229
332
|
value: null
|
|
230
333
|
};
|
|
231
|
-
switch (
|
|
334
|
+
switch (f.set(e.field, t), d.value.push(t), !0) {
|
|
232
335
|
case e.isFilter.type == "inputFilter":
|
|
233
336
|
t.inputFilter = { type: "模糊" };
|
|
234
337
|
break;
|
|
@@ -254,34 +357,34 @@ function ge(e) {
|
|
|
254
357
|
isActive: !1,
|
|
255
358
|
value: null
|
|
256
359
|
};
|
|
257
|
-
|
|
360
|
+
d.value.push(t);
|
|
258
361
|
}
|
|
259
|
-
document.addEventListener("click",
|
|
260
|
-
},
|
|
362
|
+
document.addEventListener("click", b);
|
|
363
|
+
}, _ = !1, v = "pretextTable-filterPopup-", y = (e) => {
|
|
261
364
|
if (!e || e == document.body) return !1;
|
|
262
|
-
if (e.id?.startsWith(
|
|
365
|
+
if (e.id?.startsWith(v)) return !0;
|
|
263
366
|
let t = e.parentElement;
|
|
264
|
-
return
|
|
265
|
-
},
|
|
266
|
-
if (!
|
|
367
|
+
return y(t);
|
|
368
|
+
}, b = (e) => {
|
|
369
|
+
if (!_) return;
|
|
267
370
|
let t = e.target;
|
|
268
|
-
|
|
371
|
+
y(t) || (_ = !1, x(-1));
|
|
269
372
|
};
|
|
270
373
|
m(() => {
|
|
271
|
-
document.removeEventListener("click",
|
|
374
|
+
document.removeEventListener("click", b);
|
|
272
375
|
});
|
|
273
|
-
let
|
|
274
|
-
for (let t = 0; t <
|
|
275
|
-
let n =
|
|
376
|
+
let x = (e) => {
|
|
377
|
+
for (let t = 0; t < d.value.length; t++) {
|
|
378
|
+
let n = d.value[t];
|
|
276
379
|
t != e && (n.isShow &&= !1);
|
|
277
380
|
}
|
|
278
|
-
},
|
|
381
|
+
}, S = (e, t) => {
|
|
279
382
|
let n = t.$event;
|
|
280
|
-
|
|
281
|
-
},
|
|
282
|
-
let n =
|
|
383
|
+
x(e), d.value[e].isShow ? d.value[e].isShow = !1 : (d.value[e].clientX = n.clientX - 250 / 2, d.value[e].clientY = n.clientY + 20, d.value[e].clientX + 250 > window.innerWidth && (d.value[e].clientX = window.innerWidth - 250 - 20), d.value[e].isShow = !0), _ = d.value[e].isShow;
|
|
384
|
+
}, C = async (e, t) => {
|
|
385
|
+
let n = f.get(e);
|
|
283
386
|
if (!n) return Promise.resolve();
|
|
284
|
-
switch (n.isShow = !1,
|
|
387
|
+
switch (n.isShow = !1, a(), !0) {
|
|
285
388
|
case n.type == "listFilter":
|
|
286
389
|
if (t !== void 0 && (Array.isArray(t) ? n.listFilter.selectedValue = t : (console.error("listFilter的筛选值,必须是数组"), n.listFilter.selectedValue = [])), n.listFilter.selectedValue.length) n.isActive = !0;
|
|
287
390
|
else {
|
|
@@ -297,87 +400,87 @@ function ge(e) {
|
|
|
297
400
|
}
|
|
298
401
|
break;
|
|
299
402
|
}
|
|
300
|
-
return
|
|
301
|
-
},
|
|
302
|
-
let
|
|
403
|
+
return E(), Promise.resolve();
|
|
404
|
+
}, w = (e, t) => {
|
|
405
|
+
let n = !0, r = e, i = [], a = e[t.field]?.toString().trim() || "", o = t.value?.toString().trim() || "", l = s.childrenField || c.childrenField;
|
|
303
406
|
switch (!0) {
|
|
304
|
-
case
|
|
305
|
-
|
|
407
|
+
case t.type == "inputFilter" && t.inputFilter?.type == "模糊":
|
|
408
|
+
a.includes(o) || (n = !1);
|
|
306
409
|
break;
|
|
307
|
-
case
|
|
308
|
-
|
|
410
|
+
case t.type == "inputFilter" && t.inputFilter?.type == "精确":
|
|
411
|
+
a != o && (n = !1);
|
|
309
412
|
break;
|
|
310
|
-
case
|
|
311
|
-
case
|
|
312
|
-
let e = Number(
|
|
313
|
-
switch (
|
|
413
|
+
case t.type == "numberFilter":
|
|
414
|
+
case t.type == "numberFilter%":
|
|
415
|
+
let e = Number(a), r = Number(o);
|
|
416
|
+
switch (t.numberFilter?.type) {
|
|
314
417
|
case "=":
|
|
315
|
-
e !=
|
|
418
|
+
e != r && (n = !1);
|
|
316
419
|
break;
|
|
317
420
|
case ">":
|
|
318
|
-
e <=
|
|
421
|
+
e <= r && (n = !1);
|
|
319
422
|
break;
|
|
320
423
|
case "<":
|
|
321
|
-
e >=
|
|
424
|
+
e >= r && (n = !1);
|
|
322
425
|
break;
|
|
323
426
|
case "≥":
|
|
324
|
-
e <
|
|
427
|
+
e < r && (n = !1);
|
|
325
428
|
break;
|
|
326
429
|
case "≤":
|
|
327
|
-
e >
|
|
430
|
+
e > r && (n = !1);
|
|
328
431
|
break;
|
|
329
432
|
default: break;
|
|
330
433
|
}
|
|
331
434
|
break;
|
|
332
|
-
case
|
|
333
|
-
let i =
|
|
334
|
-
selectedValuesFor: for (let e of i) if ((e?.toString().trim() || "") ==
|
|
335
|
-
|
|
435
|
+
case t.type == "listFilter":
|
|
436
|
+
let i = t.listFilter?.selectedValue || [], s = !1;
|
|
437
|
+
selectedValuesFor: for (let e of i) if ((e?.toString().trim() || "") == a) {
|
|
438
|
+
s = !0;
|
|
336
439
|
break selectedValuesFor;
|
|
337
440
|
}
|
|
338
|
-
|
|
441
|
+
s || (n = !1);
|
|
339
442
|
break;
|
|
340
443
|
default: break;
|
|
341
444
|
}
|
|
342
|
-
if (e[
|
|
343
|
-
let e =
|
|
344
|
-
e.isFind && (
|
|
445
|
+
if (e[l]?.length) for (let r of e[l]) {
|
|
446
|
+
let e = w(r, t);
|
|
447
|
+
e.isFind && (i.push(e.newRow), n = !0);
|
|
345
448
|
}
|
|
346
|
-
return
|
|
347
|
-
isFind:
|
|
348
|
-
newRow:
|
|
449
|
+
return r[F.filterChildren] = i, {
|
|
450
|
+
isFind: n,
|
|
451
|
+
newRow: r
|
|
349
452
|
};
|
|
350
|
-
},
|
|
351
|
-
let
|
|
352
|
-
if (e[
|
|
353
|
-
e[
|
|
354
|
-
},
|
|
453
|
+
}, T = (e) => {
|
|
454
|
+
let t = s.childrenField || c.childrenField;
|
|
455
|
+
if (e[t]?.length) for (let n of e[t]) T(n);
|
|
456
|
+
e[F.filterChildren] = [];
|
|
457
|
+
}, E = () => {
|
|
355
458
|
let e = [];
|
|
356
|
-
baseDataSourceFor: for (let t of
|
|
357
|
-
|
|
358
|
-
filterFieldsMapFor: for (let e of
|
|
459
|
+
baseDataSourceFor: for (let t of n.value) {
|
|
460
|
+
T(t);
|
|
461
|
+
filterFieldsMapFor: for (let e of f.values()) if (e.isActive && (p = !0, !w(t, e).isFind)) continue baseDataSourceFor;
|
|
359
462
|
e.push(t);
|
|
360
463
|
}
|
|
361
|
-
e.length ? (
|
|
464
|
+
e.length ? (r(e), i({ top: 0 }), o()) : (r([]), o());
|
|
362
465
|
};
|
|
363
466
|
return {
|
|
364
467
|
filterPopupWidth: 250,
|
|
365
|
-
filterPopupId:
|
|
366
|
-
inputFilterOptions:
|
|
367
|
-
numberFilterOptions:
|
|
368
|
-
filterFields:
|
|
369
|
-
getFilterFields:
|
|
370
|
-
filterClick:
|
|
371
|
-
setFilter:
|
|
468
|
+
filterPopupId: v,
|
|
469
|
+
inputFilterOptions: l,
|
|
470
|
+
numberFilterOptions: u,
|
|
471
|
+
filterFields: d,
|
|
472
|
+
getFilterFields: h,
|
|
473
|
+
filterClick: S,
|
|
474
|
+
setFilter: C,
|
|
372
475
|
clearFilter: async (e) => {
|
|
373
476
|
if (e) {
|
|
374
|
-
let t =
|
|
375
|
-
if (t && (t.value = "", t.type == "listFilter" && (t.listFilter.selectedValue = []), t.isActive = !1),
|
|
376
|
-
|
|
477
|
+
let t = f.get(e);
|
|
478
|
+
if (t && (t.value = "", t.type == "listFilter" && (t.listFilter.selectedValue = []), t.isActive = !1), a(), !p) return;
|
|
479
|
+
p = !1, E();
|
|
377
480
|
} else {
|
|
378
|
-
for (let e of
|
|
379
|
-
if (
|
|
380
|
-
|
|
481
|
+
for (let e of d.value) e.value = "", e.type == "listFilter" && (e.listFilter.selectedValue = []), e.isActive = !1;
|
|
482
|
+
if (a(), !p) return;
|
|
483
|
+
p = !1, E();
|
|
381
484
|
}
|
|
382
485
|
return Promise.resolve();
|
|
383
486
|
}
|
|
@@ -385,7 +488,7 @@ function ge(e) {
|
|
|
385
488
|
}
|
|
386
489
|
//#endregion
|
|
387
490
|
//#region lib/pretextTable/hook/useHeaderResize.ts
|
|
388
|
-
var
|
|
491
|
+
var ge = (e) => {
|
|
389
492
|
let { pretextTableRef: t, afterResize: n } = e, r = g(!1), i = 0, a = g(0), o = 0, s = 0, c = null, l = (e, n) => {
|
|
390
493
|
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));
|
|
391
494
|
}, u = null, d = (e) => {
|
|
@@ -407,7 +510,7 @@ var _e = (e) => {
|
|
|
407
510
|
dragLineLeft: a,
|
|
408
511
|
startResize: l
|
|
409
512
|
};
|
|
410
|
-
},
|
|
513
|
+
}, _e = (e) => {
|
|
411
514
|
let { showFooter: t, nowDataSource: n, columns: r } = e, i = g(0), a = g([]), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = (e) => {
|
|
412
515
|
if (s.clear(), !t) {
|
|
413
516
|
i.value = 0;
|
|
@@ -464,15 +567,15 @@ var _e = (e) => {
|
|
|
464
567
|
case i?.type === "合计":
|
|
465
568
|
let n = t[e], r = 0;
|
|
466
569
|
if (o.get(e) || []) {
|
|
467
|
-
switch (r = Number(i.data) +
|
|
570
|
+
switch (r = Number(i.data) + j.toNumber(n), i?.dataType) {
|
|
468
571
|
case "number0":
|
|
469
|
-
r =
|
|
572
|
+
r = j.toFixed(r, 0);
|
|
470
573
|
break;
|
|
471
574
|
case "number1":
|
|
472
|
-
r =
|
|
575
|
+
r = j.toFixed(r, 1);
|
|
473
576
|
break;
|
|
474
577
|
case "number2":
|
|
475
|
-
r =
|
|
578
|
+
r = j.toFixed(r, 2);
|
|
476
579
|
break;
|
|
477
580
|
default: break;
|
|
478
581
|
}
|
|
@@ -506,59 +609,54 @@ var _e = (e) => {
|
|
|
506
609
|
}
|
|
507
610
|
}
|
|
508
611
|
};
|
|
509
|
-
},
|
|
510
|
-
let { treeConfig: t,
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
idField: "",
|
|
514
|
-
parentField: "parentId",
|
|
515
|
-
childrenField: "children",
|
|
516
|
-
indent: 20,
|
|
517
|
-
trigger: "default",
|
|
518
|
-
lazy: !1,
|
|
519
|
-
hasChildField: "hasChild",
|
|
520
|
-
showIcon: !0
|
|
521
|
-
}, o = /* @__PURE__ */ new Map(), s = (e, r = !1) => {
|
|
522
|
-
let i = t?.childrenField || a.childrenField, c = t?.idField || n.id || "";
|
|
523
|
-
for (let t of e) o.get(t[c]) && (t[n.isCollapsed] = !0), r && t[i]?.length && s(t[i], !0);
|
|
612
|
+
}, ve = (e) => {
|
|
613
|
+
let { treeConfig: t, afterTreeExpand: n, insertChild: r } = e, i = t?.idField || I.idField, a = t?.parentField || I.parentField, o = t?.childrenField || I.childrenField, s = /* @__PURE__ */ new Map(), c = (e, n = !1) => {
|
|
614
|
+
let r = t?.childrenField || I.childrenField, i = t?.idField || F.id || "";
|
|
615
|
+
for (let t of e) s.get(t[i]) && (t[F.isCollapsed] = !0), n && t[r]?.length && c(t[r], !0);
|
|
524
616
|
};
|
|
525
617
|
return {
|
|
526
|
-
defaultTreeConfig:
|
|
527
|
-
treeExpandMap:
|
|
618
|
+
defaultTreeConfig: I,
|
|
619
|
+
treeExpandMap: s,
|
|
528
620
|
handleTree: (e) => {
|
|
529
|
-
if (t?.reserve ? t?.idField || (console.error("当前设置了treeConfig.reserve, 请设置idField, 用于保留展开状态"),
|
|
621
|
+
if (t?.reserve ? t?.idField || (console.error("当前设置了treeConfig.reserve, 请设置idField, 用于保留展开状态"), s.clear()) : s.clear(), !t?.isOpenTree) return e;
|
|
530
622
|
let n = e;
|
|
531
|
-
if (t?.transform) t?.reserve &&
|
|
532
|
-
else return t?.reserve &&
|
|
533
|
-
|
|
534
|
-
key:
|
|
535
|
-
parentKey:
|
|
536
|
-
children:
|
|
537
|
-
})
|
|
623
|
+
if (t?.transform) t?.reserve && c(n, !1);
|
|
624
|
+
else return t?.reserve && c(n, !0), n;
|
|
625
|
+
n = ue(n, {
|
|
626
|
+
key: i,
|
|
627
|
+
parentKey: a,
|
|
628
|
+
children: o
|
|
629
|
+
});
|
|
630
|
+
let r = (e) => {
|
|
631
|
+
let t = e?.[o] || [];
|
|
632
|
+
for (let n of t) n[F.parentRow] = e, r(n);
|
|
633
|
+
};
|
|
634
|
+
for (let e of n) r(e);
|
|
635
|
+
return n;
|
|
538
636
|
},
|
|
539
|
-
setTreeExpand: async (e,
|
|
540
|
-
let
|
|
541
|
-
for (let
|
|
542
|
-
if (
|
|
543
|
-
|
|
637
|
+
setTreeExpand: async (e, i) => {
|
|
638
|
+
let a = t?.hasChildField || I.hasChildField, o = t?.childrenField || I.childrenField, c = t?.idField || F.id;
|
|
639
|
+
for (let n of e) if (n[F.isCollapsed] = i, i) {
|
|
640
|
+
if (s.set(n[c], n), t?.lazy && n[a] && !n[o]?.length) {
|
|
641
|
+
n[F.lazyLoading] = !0;
|
|
544
642
|
try {
|
|
545
|
-
let e = await t?.loadMethod?.({ row:
|
|
546
|
-
Array.isArray(e) || (console.warn("懒加载loadMethod 返回的不是数组", e), e = []), await
|
|
643
|
+
let e = await t?.loadMethod?.({ row: n }) || [];
|
|
644
|
+
Array.isArray(e) || (console.warn("懒加载loadMethod 返回的不是数组", e), e = []), await r(e, n);
|
|
547
645
|
} catch (e) {
|
|
548
|
-
console.error("加载子节点失败",
|
|
646
|
+
console.error("加载子节点失败", n, e);
|
|
549
647
|
} finally {
|
|
550
|
-
|
|
648
|
+
n[F.lazyLoading] = !1;
|
|
551
649
|
}
|
|
552
650
|
}
|
|
553
|
-
} else
|
|
554
|
-
|
|
651
|
+
} else s.delete(n[c]);
|
|
652
|
+
n(e, i);
|
|
555
653
|
}
|
|
556
654
|
};
|
|
557
|
-
},
|
|
655
|
+
}, R = () => {
|
|
558
656
|
let e = document.activeElement;
|
|
559
657
|
e?.blur && e.blur();
|
|
560
|
-
},
|
|
561
|
-
let {
|
|
658
|
+
}, ye = (e) => {
|
|
659
|
+
let { expandConfig: t, afterRowExpand: n, insertExpandRow: r } = e, i = {
|
|
562
660
|
transform: !0,
|
|
563
661
|
parentField: "parentId",
|
|
564
662
|
childrenField: "children",
|
|
@@ -567,70 +665,57 @@ var _e = (e) => {
|
|
|
567
665
|
lazy: !1,
|
|
568
666
|
hasChildField: "hasChild",
|
|
569
667
|
showIcon: !0
|
|
570
|
-
},
|
|
668
|
+
}, a = /* @__PURE__ */ new Map();
|
|
571
669
|
return {
|
|
572
|
-
defaultExpandConfig:
|
|
670
|
+
defaultExpandConfig: i,
|
|
573
671
|
handleExpand: () => {
|
|
574
|
-
if (
|
|
575
|
-
if (!
|
|
672
|
+
if (t.isExpand) {
|
|
673
|
+
if (!t.height) {
|
|
576
674
|
console.error("开启了展开行, 高度参数expandConfig.height不能为空");
|
|
577
675
|
return;
|
|
578
676
|
}
|
|
579
|
-
|
|
677
|
+
a.clear();
|
|
580
678
|
}
|
|
581
679
|
},
|
|
582
|
-
setRowExpand: (e,
|
|
583
|
-
for (let
|
|
584
|
-
|
|
680
|
+
setRowExpand: (e, t) => {
|
|
681
|
+
for (let n of e) n[F.isRowExpanded] = t, t ? (a.set(n[F.id], n), r(n)) : a.delete(n[F.id]);
|
|
682
|
+
n(e, t);
|
|
585
683
|
}
|
|
586
684
|
};
|
|
587
|
-
},
|
|
588
|
-
let t =
|
|
589
|
-
id: "pretextId",
|
|
590
|
-
seq: "pretextSeq",
|
|
591
|
-
stripe: "pretextStripe",
|
|
592
|
-
height: "pretextHeight",
|
|
593
|
-
isCollapsed: "pretextIsCollapsed",
|
|
594
|
-
level: "pretextLevel",
|
|
595
|
-
lazyLoading: "pretextLazyLoading",
|
|
596
|
-
index: "pretextIndex",
|
|
597
|
-
filterChildren: "pretextFilterChildren",
|
|
598
|
-
isRowExpanded: "pretextIsRowExpanded",
|
|
599
|
-
isExpandRow: "pretextIsExpandRow",
|
|
600
|
-
expandChildren: "pretextExpandChildren"
|
|
601
|
-
}, n = y([]), r = y([]), i = g(), a = g(), o = g(0), s = g(0), c = g(!1);
|
|
685
|
+
}, z = (e) => {
|
|
686
|
+
let t = y([]), n = y([]), r = g(), i = g(), a = g(0), o = g(0), s = g(!1);
|
|
602
687
|
w(() => e.props.loading, (e) => {
|
|
603
|
-
|
|
688
|
+
s.value = e;
|
|
604
689
|
});
|
|
605
|
-
let
|
|
606
|
-
|
|
607
|
-
|
|
690
|
+
let c = g(!1), l = () => {
|
|
691
|
+
c.value = !0, setTimeout(() => {
|
|
692
|
+
c.value = !1;
|
|
608
693
|
}, 0);
|
|
609
|
-
},
|
|
610
|
-
|
|
611
|
-
},
|
|
612
|
-
|
|
613
|
-
let
|
|
614
|
-
if (
|
|
615
|
-
let e =
|
|
616
|
-
if (
|
|
617
|
-
let
|
|
618
|
-
for (let
|
|
694
|
+
}, u = (e) => {
|
|
695
|
+
i.value?.scrollTo(e);
|
|
696
|
+
}, m = y([]), h = y([]), _ = [], v = /* @__PURE__ */ new Map(), b = (t) => {
|
|
697
|
+
v.clear(), h.value = t, _ = [], ne();
|
|
698
|
+
let n = 1, r = !1, i = 0, a = e.props.treeConfig?.childrenField || q.childrenField, o = (t, n, r) => {
|
|
699
|
+
if (_.push(t), t[F.level] = r, e.props.treeConfig?.isOpenTree) {
|
|
700
|
+
let e = t?.[a] || [];
|
|
701
|
+
if (t?.[F.filterChildren]?.length > 0 && (e = t[F.filterChildren]), e.length > 0 && t[F.isCollapsed]) {
|
|
702
|
+
let t = 1;
|
|
703
|
+
for (let i of e) i[F.stripe] = !1, i[F.seq] = n + "." + t, t++, o(i, i[F.seq], r + 1);
|
|
619
704
|
}
|
|
620
705
|
}
|
|
621
|
-
if (e.props.expandConfig?.isExpand &&
|
|
706
|
+
if (e.props.expandConfig?.isExpand && t[F.expandChildren]?.length > 0 && t[F.isRowExpanded]) for (let e of t[F.expandChildren]) _.push(e);
|
|
622
707
|
};
|
|
623
|
-
for (let e of
|
|
624
|
-
let
|
|
625
|
-
for (let e of
|
|
626
|
-
totalHeight:
|
|
708
|
+
for (let e of h.value) e[F.seq] = n, o(e, `${n}`, 1), n++, e[F.stripe] = r, r = !r;
|
|
709
|
+
let s = 1;
|
|
710
|
+
for (let e of _) i += e[F.height] || 0, v.set(s, {
|
|
711
|
+
totalHeight: i,
|
|
627
712
|
row: e
|
|
628
|
-
}),
|
|
629
|
-
},
|
|
713
|
+
}), s++;
|
|
714
|
+
}, S = async (n, r) => {
|
|
630
715
|
let i = null;
|
|
631
|
-
i = typeof r == "string" ? Y.get(r) : r, X(
|
|
716
|
+
i = typeof r == "string" ? Y.get(r) : r, X(n);
|
|
632
717
|
let a = [];
|
|
633
|
-
for (let e of
|
|
718
|
+
for (let e of t.value) {
|
|
634
719
|
let t = x(e);
|
|
635
720
|
a.push({
|
|
636
721
|
title: t.title || "",
|
|
@@ -646,84 +731,84 @@ var _e = (e) => {
|
|
|
646
731
|
treeNode: t.treeNode || !1
|
|
647
732
|
});
|
|
648
733
|
}
|
|
649
|
-
let o = await
|
|
650
|
-
tempData:
|
|
734
|
+
let o = await N({
|
|
735
|
+
tempData: n,
|
|
651
736
|
index: 0,
|
|
652
737
|
columns: a
|
|
653
738
|
});
|
|
654
739
|
if (o) {
|
|
655
|
-
|
|
656
|
-
let
|
|
657
|
-
i[
|
|
740
|
+
P(o.heightDatas);
|
|
741
|
+
let t = e.props.treeConfig?.childrenField || q.childrenField;
|
|
742
|
+
i[t] = n;
|
|
658
743
|
}
|
|
659
|
-
},
|
|
660
|
-
let
|
|
661
|
-
if (
|
|
662
|
-
let
|
|
663
|
-
[
|
|
664
|
-
[
|
|
744
|
+
}, C = (t) => {
|
|
745
|
+
let n = null;
|
|
746
|
+
if (n = typeof t == "string" ? Y.get(t) : t, n[F.expandChildren]?.length) return;
|
|
747
|
+
let r = {
|
|
748
|
+
[F.isExpandRow]: !0,
|
|
749
|
+
[F.height]: e.props.expandConfig?.height || 0
|
|
665
750
|
};
|
|
666
|
-
X([
|
|
667
|
-
}, { headerHeight:
|
|
751
|
+
X([r]), n[F.expandChildren] = [r];
|
|
752
|
+
}, { headerHeight: T, headerStyles: E, createHeader: ee, headerRef: D, getHeaderRefHeight: O } = fe({ pretextTableRef: r }), { footerHeight: k, footerColumns: te, getFooterHeight: A, updateFooter: ne, updateFooterCellLabel: re } = _e({
|
|
668
753
|
showFooter: e.props.showFooter,
|
|
669
|
-
nowDataSource:
|
|
670
|
-
columns:
|
|
671
|
-
}),
|
|
672
|
-
e == -1 && (e = ae.value),
|
|
673
|
-
},
|
|
754
|
+
nowDataSource: h,
|
|
755
|
+
columns: t
|
|
756
|
+
}), ie = g(0), ae = g(0), oe = (e) => {
|
|
757
|
+
e == -1 && (e = ae.value), ie.value = e;
|
|
758
|
+
}, se = (e) => {
|
|
674
759
|
ae.value = e;
|
|
675
|
-
},
|
|
760
|
+
}, j = () => {
|
|
676
761
|
let e = 0;
|
|
677
|
-
for (let
|
|
678
|
-
|
|
679
|
-
},
|
|
762
|
+
for (let t of _) e += t[F.height] || 0;
|
|
763
|
+
ie.value = e;
|
|
764
|
+
}, M = {
|
|
680
765
|
fontWeight: "400",
|
|
681
766
|
fontSize: "14px"
|
|
682
|
-
}, le = !!e.props.showOverflow, ue = e.props.cellMinHeight || 22,
|
|
683
|
-
let
|
|
684
|
-
tempData:
|
|
685
|
-
index:
|
|
686
|
-
columns:
|
|
767
|
+
}, le = !!e.props.showOverflow, ue = e.props.cellMinHeight || 22, N = (t) => new Promise((n, r) => {
|
|
768
|
+
let i = new de(), a = {
|
|
769
|
+
tempData: t.tempData,
|
|
770
|
+
index: t.index,
|
|
771
|
+
columns: t.columns,
|
|
687
772
|
commonStyles: " \"Microsoft YaHei\", \"微软雅黑\", sans-serif",
|
|
688
|
-
itemStyles:
|
|
773
|
+
itemStyles: M,
|
|
689
774
|
divLineHeight: 22,
|
|
690
|
-
keyNames:
|
|
775
|
+
keyNames: F,
|
|
691
776
|
isNoAutoWrap: le,
|
|
692
777
|
cellMinHeight: ue,
|
|
693
778
|
treeConfig: {
|
|
694
779
|
...e.props.treeConfig,
|
|
695
780
|
loadMethod: void 0
|
|
696
781
|
},
|
|
697
|
-
defaultTreeConfig: { ...
|
|
782
|
+
defaultTreeConfig: { ...q }
|
|
698
783
|
};
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
},
|
|
702
|
-
|
|
784
|
+
i.postMessage(a), i.onmessage = (e) => {
|
|
785
|
+
n(e.data), i.terminate();
|
|
786
|
+
}, i.onerror = (e) => {
|
|
787
|
+
r(e), i.terminate();
|
|
703
788
|
};
|
|
704
|
-
}),
|
|
705
|
-
for (let
|
|
706
|
-
let e = Y.get(
|
|
707
|
-
e && (e[
|
|
789
|
+
}), P = (e) => {
|
|
790
|
+
for (let t of e) {
|
|
791
|
+
let e = Y.get(t.id);
|
|
792
|
+
e && (e[F.height] = t.pretextHeight);
|
|
708
793
|
}
|
|
709
|
-
},
|
|
710
|
-
if (
|
|
711
|
-
if (
|
|
794
|
+
}, I = 0, z = !1, be = async (e) => {
|
|
795
|
+
if (t.value?.length === 0) {
|
|
796
|
+
if (I++, I > 50) {
|
|
712
797
|
console.error("表格没有设置 columns.value");
|
|
713
798
|
return;
|
|
714
799
|
}
|
|
715
800
|
setTimeout(() => {
|
|
716
|
-
|
|
801
|
+
be(e);
|
|
717
802
|
}, 100);
|
|
718
803
|
return;
|
|
719
804
|
}
|
|
720
|
-
let
|
|
805
|
+
let n = 0;
|
|
721
806
|
if (e.length === 0) {
|
|
722
|
-
|
|
807
|
+
b(e), j(), De.value = [];
|
|
723
808
|
return;
|
|
724
809
|
}
|
|
725
810
|
let r = [];
|
|
726
|
-
for (let e of
|
|
811
|
+
for (let e of t.value) {
|
|
727
812
|
let t = x(e);
|
|
728
813
|
r.push({
|
|
729
814
|
title: t.title || "",
|
|
@@ -739,380 +824,377 @@ var _e = (e) => {
|
|
|
739
824
|
treeNode: t.treeNode || !1
|
|
740
825
|
});
|
|
741
826
|
}
|
|
742
|
-
if (e.length *
|
|
743
|
-
let
|
|
744
|
-
|
|
745
|
-
let i = await
|
|
827
|
+
if (e.length * xe >= Se) {
|
|
828
|
+
let t = 5e3;
|
|
829
|
+
z = !0;
|
|
830
|
+
let i = await N({
|
|
746
831
|
tempData: e.slice(0, 100),
|
|
747
832
|
index: 0,
|
|
748
833
|
columns: r
|
|
749
834
|
});
|
|
750
|
-
i && (
|
|
751
|
-
let a = [], o = Math.ceil((e.length - 100) /
|
|
752
|
-
for (let
|
|
835
|
+
i && (n += i.tempItemHeights, P(i.heightDatas), b(e), j(), H());
|
|
836
|
+
let a = [], o = Math.ceil((e.length - 100) / t / 2), s = o * 2, c = 0, l = 100;
|
|
837
|
+
for (let n = 1; n <= o; n++) for (let n = 0; n < 2; n++) a[n] || (a[n] = []), a[n].push({
|
|
753
838
|
tempI: l,
|
|
754
|
-
tempData: e.slice(l, l +
|
|
755
|
-
}), l +=
|
|
839
|
+
tempData: e.slice(l, l + t)
|
|
840
|
+
}), l += t;
|
|
756
841
|
{
|
|
757
|
-
let
|
|
758
|
-
for (let i of
|
|
842
|
+
let t = async (t) => {
|
|
843
|
+
for (let i of t) {
|
|
759
844
|
if (i.tempData?.length === 0) {
|
|
760
845
|
c++;
|
|
761
846
|
continue;
|
|
762
847
|
}
|
|
763
|
-
let
|
|
848
|
+
let t = await N({
|
|
764
849
|
tempData: i.tempData,
|
|
765
850
|
index: i.tempI,
|
|
766
851
|
columns: r
|
|
767
852
|
});
|
|
768
|
-
|
|
853
|
+
t && (n += t.tempItemHeights, se(n), oe(n), c++, P(t.heightDatas), c == s && (b(e), j(), z = !1));
|
|
769
854
|
}
|
|
770
855
|
};
|
|
771
|
-
for (let e of a)
|
|
856
|
+
for (let e of a) t(e);
|
|
772
857
|
}
|
|
773
858
|
} else {
|
|
774
|
-
|
|
775
|
-
let t = await
|
|
859
|
+
z = !0;
|
|
860
|
+
let t = await N({
|
|
776
861
|
tempData: e,
|
|
777
862
|
index: 0,
|
|
778
863
|
columns: r
|
|
779
864
|
});
|
|
780
|
-
|
|
865
|
+
z = !1, t && (P(t.heightDatas), b(e), j(), H());
|
|
781
866
|
}
|
|
782
|
-
},
|
|
783
|
-
if (
|
|
784
|
-
|
|
785
|
-
|
|
867
|
+
}, xe = 0, Se = 1e4, B = 0, Ce = 0, we = g(0), V = !1, Te = (e) => {
|
|
868
|
+
if (Ce = i.value?.scrollLeft || 0, B == i.value?.scrollTop) {
|
|
869
|
+
V ||= (window.requestAnimationFrame(() => {
|
|
870
|
+
Me(), V = !1;
|
|
786
871
|
}), !0);
|
|
787
872
|
return;
|
|
788
873
|
}
|
|
789
|
-
|
|
790
|
-
|
|
874
|
+
B = i.value?.scrollTop || 0, e.preventDefault(), V ||= (window.requestAnimationFrame(() => {
|
|
875
|
+
H(), V = !1;
|
|
791
876
|
}), !0);
|
|
792
|
-
},
|
|
877
|
+
}, Ee = (e) => {
|
|
793
878
|
if (e.shiftKey) {
|
|
794
|
-
e.preventDefault(), e.stopPropagation(), e.deltaY > 0 || e.deltaX > 0 ?
|
|
879
|
+
e.preventDefault(), e.stopPropagation(), e.deltaY > 0 || e.deltaX > 0 ? i.value?.scrollBy({ left: 100 }) : i.value?.scrollBy({ left: -100 });
|
|
795
880
|
return;
|
|
796
881
|
}
|
|
797
|
-
e.preventDefault(), e.stopPropagation(), e.deltaY > 0 ?
|
|
798
|
-
},
|
|
882
|
+
e.preventDefault(), e.stopPropagation(), e.deltaY > 0 ? i.value?.scrollBy({ top: 150 }) : i.value?.scrollBy({ top: -150 });
|
|
883
|
+
}, De = g([]), Oe = g(0), ke = ce((e, t) => {
|
|
799
884
|
setTimeout(() => {
|
|
800
|
-
|
|
885
|
+
Oe.value = t, e.forEach((e) => {
|
|
801
886
|
e.slotShowTimestamp = t;
|
|
802
|
-
}),
|
|
887
|
+
}), l();
|
|
803
888
|
}, 0);
|
|
804
|
-
}, 100),
|
|
805
|
-
if (!
|
|
806
|
-
let e =
|
|
889
|
+
}, 100), H = () => {
|
|
890
|
+
if (!i.value) return;
|
|
891
|
+
let e = i.value.scrollTop, t = a.value, n = 0, r = 0, o = [], s = "遍历";
|
|
807
892
|
switch (!0) {
|
|
808
|
-
case e > 500 &&
|
|
809
|
-
|
|
893
|
+
case e > 500 && _.length > 10:
|
|
894
|
+
s = "二分查找";
|
|
810
895
|
break;
|
|
811
896
|
default: break;
|
|
812
897
|
}
|
|
813
|
-
let
|
|
814
|
-
if (
|
|
815
|
-
let
|
|
898
|
+
let c = !1;
|
|
899
|
+
if (s == "二分查找") {
|
|
900
|
+
let i = 0, a = _.length - 1, s = {
|
|
816
901
|
totalHeight: 0,
|
|
817
902
|
row: {}
|
|
818
|
-
},
|
|
819
|
-
BinarySearchWhile: for (;
|
|
820
|
-
if (
|
|
821
|
-
|
|
903
|
+
}, l = 0;
|
|
904
|
+
BinarySearchWhile: for (; i <= a && a != -1;) {
|
|
905
|
+
if (l++, l > 25) {
|
|
906
|
+
c = !0;
|
|
822
907
|
break BinarySearchWhile;
|
|
823
908
|
}
|
|
824
|
-
let t = Math.floor((
|
|
825
|
-
!n || n <= 1 || (n <= e ?
|
|
909
|
+
let t = Math.floor((i + a) / 2), n = v.get(t + 1)?.totalHeight || 0;
|
|
910
|
+
!n || n <= 1 || (n <= e ? i = t + 1 : a = t - 1);
|
|
826
911
|
}
|
|
827
|
-
|
|
912
|
+
s = v.get(i) || {
|
|
828
913
|
totalHeight: 0,
|
|
829
914
|
row: {}
|
|
830
|
-
},
|
|
831
|
-
getHeightFor: for (let e =
|
|
832
|
-
let
|
|
833
|
-
if (
|
|
915
|
+
}, r = s.totalHeight, we.value = r - s.row[F.height], o.push(s.row), n = e + t;
|
|
916
|
+
getHeightFor: for (let e = i; e < _.length; e++) {
|
|
917
|
+
let t = _[e];
|
|
918
|
+
if (r += t[F.height], n) if (r <= n) o.push(t);
|
|
834
919
|
else break getHeightFor;
|
|
835
920
|
}
|
|
836
921
|
}
|
|
837
|
-
if (
|
|
838
|
-
let
|
|
839
|
-
if (
|
|
840
|
-
if (
|
|
841
|
-
|
|
922
|
+
if (s == "遍历" || c) getHeightFor: for (let i = 0; i < _.length; i++) {
|
|
923
|
+
let a = _[i];
|
|
924
|
+
if (a) {
|
|
925
|
+
if (r += a[F.height], e <= r && n == 0) {
|
|
926
|
+
we.value = r - a[F.height], o.push(a), n = e + t;
|
|
842
927
|
continue;
|
|
843
928
|
}
|
|
844
|
-
if (
|
|
929
|
+
if (n) if (r <= n) o.push(a);
|
|
845
930
|
else break getHeightFor;
|
|
846
931
|
}
|
|
847
932
|
}
|
|
848
|
-
|
|
849
|
-
},
|
|
850
|
-
if (!
|
|
851
|
-
let e =
|
|
852
|
-
for (let e of
|
|
853
|
-
let r = 0,
|
|
854
|
-
for (let
|
|
855
|
-
let c =
|
|
933
|
+
De.value = o, Me(), ke(o, Math.floor(performance.now()));
|
|
934
|
+
}, Ae = g(0), je = g(0), Me = () => {
|
|
935
|
+
if (!i.value) return;
|
|
936
|
+
let e = i.value.scrollLeft, n = i.value.clientWidth;
|
|
937
|
+
for (let e of t.value) (e.fixed == "left" || e.fixed == "right") && (n -= e.width || e.minWidth || 0);
|
|
938
|
+
let r = 0, a = t.value.length - 1, o = !1, s = 0;
|
|
939
|
+
for (let i = 0; i < t.value.length; i++) {
|
|
940
|
+
let c = t.value[i];
|
|
856
941
|
if (!(c.fixed == "left" || c.fixed == "right")) {
|
|
857
942
|
if (s += c.width || c.minWidth || 0, !o && e <= s) {
|
|
858
|
-
r =
|
|
943
|
+
r = i, o = !0;
|
|
859
944
|
continue;
|
|
860
945
|
}
|
|
861
|
-
if (e +
|
|
862
|
-
|
|
946
|
+
if (e + n < s) {
|
|
947
|
+
a = i;
|
|
863
948
|
break;
|
|
864
949
|
}
|
|
865
950
|
}
|
|
866
951
|
}
|
|
867
|
-
r <
|
|
868
|
-
},
|
|
869
|
-
if (e.props.rowConfig?.isCurrent && W.value !=
|
|
870
|
-
newValue:
|
|
871
|
-
column:
|
|
952
|
+
r < a && (Ae.value = r, je.value = a);
|
|
953
|
+
}, Ne = ce(H, 200), { fixedColumnsLeft: Pe, fixedColumnsRight: Fe, fixedLeftIndex: Ie, fixedRightIndex: Le, reflashGridTemplateColumns: Re, gridTemplateColumns: ze, getGridStyles: U } = pe({ columns: t }), W = y({}), G = (t, n) => {
|
|
954
|
+
if (e.props.rowConfig?.isCurrent && W.value != t && (W.value = t, e.emits("currentChange", {
|
|
955
|
+
newValue: t,
|
|
956
|
+
column: n
|
|
872
957
|
})), e.props.treeConfig?.isOpenTree) {
|
|
873
|
-
let
|
|
958
|
+
let r = e.props.treeConfig.childrenField || q.childrenField;
|
|
874
959
|
switch (!0) {
|
|
875
|
-
case
|
|
876
|
-
case e.props.treeConfig?.trigger == "cell" &&
|
|
960
|
+
case t?.[r]?.length == 0: break;
|
|
961
|
+
case e.props.treeConfig?.trigger == "cell" && n.treeNode:
|
|
877
962
|
case e.props.treeConfig?.trigger == "row":
|
|
878
|
-
at([
|
|
963
|
+
at([t], !t[F.isCollapsed]);
|
|
879
964
|
break;
|
|
880
965
|
default: break;
|
|
881
966
|
}
|
|
882
967
|
}
|
|
883
968
|
if (e.props.expandConfig?.isExpand) switch (!0) {
|
|
884
|
-
case e.props.expandConfig?.trigger == "cell" &&
|
|
969
|
+
case e.props.expandConfig?.trigger == "cell" && n.type == "expand":
|
|
885
970
|
case e.props.expandConfig?.trigger == "row":
|
|
886
|
-
|
|
971
|
+
st([t], !t[F.isRowExpanded]);
|
|
887
972
|
break;
|
|
888
973
|
default: break;
|
|
889
974
|
}
|
|
890
975
|
e.emits && e.emits("cellClick", {
|
|
891
|
-
row:
|
|
892
|
-
column:
|
|
976
|
+
row: t,
|
|
977
|
+
column: n
|
|
893
978
|
});
|
|
894
|
-
},
|
|
895
|
-
e.emits && e.emits("headerCellClick", { column: t }), e.props.sortConfig?.trigger == "cell" && t.sortable &&
|
|
896
|
-
},
|
|
897
|
-
e.props.rowConfig?.isHover && (
|
|
898
|
-
}, { getCheckField:
|
|
899
|
-
pretextId:
|
|
900
|
-
columns:
|
|
901
|
-
blurAnyElement:
|
|
902
|
-
nowDataSource:
|
|
903
|
-
baseDataSource:
|
|
904
|
-
emits: e.emits
|
|
905
|
-
|
|
979
|
+
}, Be = (t) => {
|
|
980
|
+
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 });
|
|
981
|
+
}, K = y({}), Ve = (t) => {
|
|
982
|
+
e.props.rowConfig?.isHover && (K.value = t);
|
|
983
|
+
}, { getCheckField: He, headerChecked: Ue, headerCheckedIndeterminate: We, onHeaderChecked: Ge, upDataHeaderChecked: Ke, upDataAllRowCheckedDeep: qe, onCellChecked: Je, getCheckboxRecords: Ye, clearCheckboxRowInit: Xe } = me({
|
|
984
|
+
pretextId: F.id,
|
|
985
|
+
columns: t,
|
|
986
|
+
blurAnyElement: R,
|
|
987
|
+
nowDataSource: h,
|
|
988
|
+
baseDataSource: m,
|
|
989
|
+
emits: e.emits,
|
|
990
|
+
treeConfig: e.props.treeConfig
|
|
991
|
+
}), Ze = (e) => {
|
|
906
992
|
Xe();
|
|
907
|
-
let
|
|
908
|
-
if (e) for (let
|
|
909
|
-
}, { isDragging: Qe, dragLineLeft: $e, startResize: et } =
|
|
910
|
-
pretextTableRef:
|
|
993
|
+
let t = [];
|
|
994
|
+
if (t = e ? [e] : He(), t) for (let e of h.value) for (let n of t) e[n] = !1;
|
|
995
|
+
}, { isDragging: Qe, dragLineLeft: $e, startResize: et } = ge({
|
|
996
|
+
pretextTableRef: r,
|
|
911
997
|
afterResize: (t) => {
|
|
912
|
-
|
|
998
|
+
Re(), e.emits("resizableChange", {
|
|
913
999
|
column: { ...t.column },
|
|
914
1000
|
resizeWidth: t.column.width
|
|
915
1001
|
});
|
|
916
1002
|
}
|
|
917
1003
|
}), tt = () => {
|
|
918
|
-
|
|
1004
|
+
b(h.value), j(), H();
|
|
919
1005
|
}, nt = (t) => {
|
|
920
1006
|
if (t) {
|
|
921
|
-
let t = e.props.treeConfig?.childrenField ||
|
|
1007
|
+
let t = e.props.treeConfig?.childrenField || q.childrenField, n = [], r = (e) => {
|
|
922
1008
|
if (e[t]?.length) {
|
|
923
1009
|
n.push(e);
|
|
924
1010
|
for (let n of e[t]) r(n);
|
|
925
1011
|
}
|
|
926
1012
|
};
|
|
927
|
-
for (let e of
|
|
1013
|
+
for (let e of h.value) r(e);
|
|
928
1014
|
at(n, !0);
|
|
929
1015
|
} else rt();
|
|
930
1016
|
}, rt = () => {
|
|
931
|
-
|
|
932
|
-
e[
|
|
933
|
-
}),
|
|
934
|
-
}, { defaultTreeConfig:
|
|
1017
|
+
J.forEach((e) => {
|
|
1018
|
+
e[F.isCollapsed] = !1;
|
|
1019
|
+
}), J.clear(), b(h.value), j(), H();
|
|
1020
|
+
}, { defaultTreeConfig: q, treeExpandMap: J, handleTree: it, setTreeExpand: at } = ve({
|
|
935
1021
|
treeConfig: e.props.treeConfig,
|
|
936
|
-
keyNames: t,
|
|
937
1022
|
afterTreeExpand: tt,
|
|
938
|
-
insertChild:
|
|
939
|
-
}), { handleExpand: ot, setRowExpand:
|
|
940
|
-
keyNames: t,
|
|
1023
|
+
insertChild: S
|
|
1024
|
+
}), { handleExpand: ot, setRowExpand: st } = ye({
|
|
941
1025
|
expandConfig: e.props.expandConfig,
|
|
942
1026
|
afterRowExpand: (t, n) => {
|
|
943
|
-
|
|
1027
|
+
b(h.value), j(), H(), e.emits("toggleRowExpand", {
|
|
944
1028
|
expanded: n,
|
|
945
1029
|
rows: t
|
|
946
1030
|
});
|
|
947
1031
|
},
|
|
948
|
-
insertExpandRow:
|
|
949
|
-
}),
|
|
950
|
-
|
|
951
|
-
}, Y = /* @__PURE__ */ new Map(), X = (
|
|
952
|
-
let
|
|
953
|
-
for (let
|
|
954
|
-
|
|
955
|
-
let
|
|
956
|
-
e.props.treeConfig?.isOpenTree &&
|
|
1032
|
+
insertExpandRow: C
|
|
1033
|
+
}), ct = 0, lt = () => {
|
|
1034
|
+
m.value = [], b([]), Y.clear(), W.value = {}, K.value = {}, Xe(), Q.value = "", pt.value = null, Ct(), ct = 0, I = 0;
|
|
1035
|
+
}, Y = /* @__PURE__ */ new Map(), X = (t) => {
|
|
1036
|
+
let n = ct;
|
|
1037
|
+
for (let r of t) {
|
|
1038
|
+
r[F.id] = Math.random().toString(36).substring(2), r[F.index] = n, n++, ct++, Y.set(r[F.id], r);
|
|
1039
|
+
let t = e.props.treeConfig?.childrenField || q.childrenField;
|
|
1040
|
+
e.props.treeConfig?.isOpenTree && r?.[t]?.length > 0 && X(r[t]);
|
|
957
1041
|
}
|
|
958
|
-
},
|
|
959
|
-
|
|
960
|
-
n >= 50 ||
|
|
961
|
-
}, 100) :
|
|
1042
|
+
}, Z = (e, t, n = 0) => {
|
|
1043
|
+
z ? setTimeout(() => {
|
|
1044
|
+
n >= 50 || Z(e, t, n + 1);
|
|
1045
|
+
}, 100) : u({
|
|
962
1046
|
top: e,
|
|
963
1047
|
left: t
|
|
964
1048
|
});
|
|
965
|
-
}, lt = async (e) => {
|
|
966
|
-
let t = L, n = R;
|
|
967
|
-
await ut(e), ct(t, n);
|
|
968
1049
|
}, ut = async (e) => {
|
|
1050
|
+
let t = B, n = Ce;
|
|
1051
|
+
await dt(e), Z(t, n);
|
|
1052
|
+
}, dt = async (e) => {
|
|
969
1053
|
try {
|
|
970
|
-
|
|
971
|
-
let t =
|
|
972
|
-
X(t || []),
|
|
1054
|
+
u({ top: 0 }), lt();
|
|
1055
|
+
let t = it(e || []);
|
|
1056
|
+
X(t || []), m.value = t || [], be(m.value);
|
|
973
1057
|
} catch (e) {
|
|
974
1058
|
console.error(e);
|
|
975
1059
|
}
|
|
976
|
-
},
|
|
977
|
-
let e =
|
|
1060
|
+
}, ft = () => {
|
|
1061
|
+
let e = _.filter((e) => !e[F.isExpandRow]);
|
|
978
1062
|
return {
|
|
979
|
-
fullData:
|
|
1063
|
+
fullData: m.value,
|
|
980
1064
|
visibleData: e
|
|
981
1065
|
};
|
|
982
|
-
}, { sortField:
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
setNowDataSource: S,
|
|
1066
|
+
}, { sortField: Q, sortOrder: pt, sort: mt, handleSort: $ } = L({
|
|
1067
|
+
nowDataSource: h,
|
|
1068
|
+
getVisibleData: H,
|
|
1069
|
+
setNowDataSource: b,
|
|
987
1070
|
treeConfig: e.props.treeConfig,
|
|
988
|
-
defaultTreeConfig:
|
|
989
|
-
}), { filterPopupWidth:
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
refresh: u,
|
|
1071
|
+
defaultTreeConfig: q
|
|
1072
|
+
}), { filterPopupWidth: ht, filterPopupId: gt, inputFilterOptions: _t, numberFilterOptions: vt, filterFields: yt, getFilterFields: bt, filterClick: xt, setFilter: St, clearFilter: Ct } = he({
|
|
1073
|
+
columns: t,
|
|
1074
|
+
baseDataSource: m,
|
|
1075
|
+
setNowDataSource: b,
|
|
1076
|
+
scrollTo: u,
|
|
1077
|
+
refresh: l,
|
|
996
1078
|
afterFilter: () => {
|
|
997
|
-
|
|
1079
|
+
j(), $(), qe();
|
|
998
1080
|
},
|
|
999
1081
|
treeConfig: e.props.treeConfig,
|
|
1000
|
-
defaultTreeConfig:
|
|
1001
|
-
}),
|
|
1002
|
-
|
|
1003
|
-
},
|
|
1004
|
-
if (!
|
|
1082
|
+
defaultTreeConfig: q
|
|
1083
|
+
}), wt = (e) => {
|
|
1084
|
+
R(), e.listFilter.selectedValue.length == e.listFilter.listOptions.length ? e.listFilter.selectedValue = [] : e.listFilter.selectedValue = e.listFilter.listOptions.map((e) => e.value);
|
|
1085
|
+
}, Tt = (i) => {
|
|
1086
|
+
if (!r.value) {
|
|
1005
1087
|
setTimeout(() => {
|
|
1006
|
-
|
|
1088
|
+
Tt(i);
|
|
1007
1089
|
}, 100);
|
|
1008
1090
|
return;
|
|
1009
1091
|
}
|
|
1010
|
-
let a =
|
|
1011
|
-
a.finalColumns.length == 0 || a.realColumns.length == 0 || (ot(),
|
|
1012
|
-
|
|
1013
|
-
}, 0),
|
|
1092
|
+
let a = ee(i) || [];
|
|
1093
|
+
a.finalColumns.length == 0 || a.realColumns.length == 0 || (ot(), xe = a.finalColumns.length, j(), t.value = a.finalColumns, n.value = a.realColumns, setTimeout(() => {
|
|
1094
|
+
O();
|
|
1095
|
+
}, 0), A(e.props.footerProps), He(), U(), bt(), l());
|
|
1014
1096
|
};
|
|
1015
1097
|
w(() => e.props.columns, (e) => {
|
|
1016
|
-
|
|
1098
|
+
Tt(e);
|
|
1017
1099
|
}, { immediate: !0 }), w(() => e.props.footerProps, (e) => {
|
|
1018
|
-
|
|
1100
|
+
A(e);
|
|
1019
1101
|
}), w(() => e.props.height, (e) => {
|
|
1020
|
-
|
|
1102
|
+
a.value = e, Ne();
|
|
1021
1103
|
}, { immediate: !0 });
|
|
1022
|
-
let
|
|
1023
|
-
|
|
1024
|
-
},
|
|
1025
|
-
if (!
|
|
1104
|
+
let Et = () => {
|
|
1105
|
+
r.value && (o.value = r.value.clientWidth);
|
|
1106
|
+
}, Dt = ce(Et, 100), Ot = () => {
|
|
1107
|
+
if (!r.value) {
|
|
1026
1108
|
setTimeout(() => {
|
|
1027
|
-
|
|
1109
|
+
Ot();
|
|
1028
1110
|
}, 100);
|
|
1029
1111
|
return;
|
|
1030
1112
|
}
|
|
1031
|
-
window.addEventListener("resize",
|
|
1113
|
+
window.addEventListener("resize", Dt), Et();
|
|
1032
1114
|
};
|
|
1033
1115
|
return p(() => {
|
|
1034
|
-
|
|
1116
|
+
Ot();
|
|
1035
1117
|
}), d(() => {
|
|
1036
|
-
|
|
1037
|
-
top:
|
|
1038
|
-
left:
|
|
1039
|
-
}),
|
|
1118
|
+
u({
|
|
1119
|
+
top: B,
|
|
1120
|
+
left: Ce
|
|
1121
|
+
}), H();
|
|
1040
1122
|
}), f(() => {}), {
|
|
1041
|
-
keyNames:
|
|
1042
|
-
nowDataSource:
|
|
1043
|
-
pretextTableRef:
|
|
1044
|
-
tableRef:
|
|
1045
|
-
isLoading:
|
|
1046
|
-
visibleData:
|
|
1047
|
-
visibleWidthStartColumnIndex:
|
|
1048
|
-
visibleWidthEndColumnIndex:
|
|
1123
|
+
keyNames: F,
|
|
1124
|
+
nowDataSource: h,
|
|
1125
|
+
pretextTableRef: r,
|
|
1126
|
+
tableRef: i,
|
|
1127
|
+
isLoading: s,
|
|
1128
|
+
visibleData: De,
|
|
1129
|
+
visibleWidthStartColumnIndex: Ae,
|
|
1130
|
+
visibleWidthEndColumnIndex: je,
|
|
1049
1131
|
gridTemplateColumns: ze,
|
|
1050
|
-
blurAnyElement:
|
|
1051
|
-
columns:
|
|
1052
|
-
onScroll:
|
|
1053
|
-
onWheel:
|
|
1054
|
-
topEmptyHeight:
|
|
1055
|
-
scrollbarHeight:
|
|
1056
|
-
headerHeight:
|
|
1057
|
-
headerStyles:
|
|
1058
|
-
realColumns:
|
|
1059
|
-
headerRef:
|
|
1060
|
-
updateFooter:
|
|
1061
|
-
updateFooterCellLabel:
|
|
1062
|
-
footerHeight:
|
|
1063
|
-
footerColumns:
|
|
1064
|
-
getFooterHeight:
|
|
1065
|
-
itemStyles:
|
|
1066
|
-
fixedLeftIndex:
|
|
1067
|
-
fixedRightIndex:
|
|
1068
|
-
fixedColumnsLeft:
|
|
1069
|
-
fixedColumnsRight:
|
|
1132
|
+
blurAnyElement: R,
|
|
1133
|
+
columns: t,
|
|
1134
|
+
onScroll: Te,
|
|
1135
|
+
onWheel: Ee,
|
|
1136
|
+
topEmptyHeight: we,
|
|
1137
|
+
scrollbarHeight: ie,
|
|
1138
|
+
headerHeight: T,
|
|
1139
|
+
headerStyles: E,
|
|
1140
|
+
realColumns: n,
|
|
1141
|
+
headerRef: D,
|
|
1142
|
+
updateFooter: ne,
|
|
1143
|
+
updateFooterCellLabel: re,
|
|
1144
|
+
footerHeight: k,
|
|
1145
|
+
footerColumns: te,
|
|
1146
|
+
getFooterHeight: A,
|
|
1147
|
+
itemStyles: M,
|
|
1148
|
+
fixedLeftIndex: Ie,
|
|
1149
|
+
fixedRightIndex: Le,
|
|
1150
|
+
fixedColumnsLeft: Pe,
|
|
1151
|
+
fixedColumnsRight: Fe,
|
|
1070
1152
|
getGridStyles: U,
|
|
1071
1153
|
divLineHeightOffset: 20,
|
|
1072
1154
|
currentRow: W,
|
|
1073
|
-
cellClick:
|
|
1074
|
-
headerClick:
|
|
1075
|
-
hoverRow:
|
|
1076
|
-
cellMousemove:
|
|
1077
|
-
headerChecked:
|
|
1078
|
-
headerCheckedIndeterminate:
|
|
1079
|
-
onHeaderChecked:
|
|
1155
|
+
cellClick: G,
|
|
1156
|
+
headerClick: Be,
|
|
1157
|
+
hoverRow: K,
|
|
1158
|
+
cellMousemove: Ve,
|
|
1159
|
+
headerChecked: Ue,
|
|
1160
|
+
headerCheckedIndeterminate: We,
|
|
1161
|
+
onHeaderChecked: Ge,
|
|
1080
1162
|
onCellChecked: Je,
|
|
1081
1163
|
getCheckboxRecords: Ye,
|
|
1082
1164
|
clearCheckboxRow: Ze,
|
|
1083
|
-
sortField:
|
|
1084
|
-
sortOrder:
|
|
1085
|
-
sort:
|
|
1086
|
-
filterPopupWidth:
|
|
1087
|
-
filterPopupId:
|
|
1088
|
-
inputFilterOptions:
|
|
1089
|
-
numberFilterOptions:
|
|
1090
|
-
filterFields:
|
|
1091
|
-
getFilterFields:
|
|
1092
|
-
filterClick:
|
|
1093
|
-
setFilter:
|
|
1094
|
-
clearFilter:
|
|
1095
|
-
setListFilterAll:
|
|
1165
|
+
sortField: Q,
|
|
1166
|
+
sortOrder: pt,
|
|
1167
|
+
sort: mt,
|
|
1168
|
+
filterPopupWidth: ht,
|
|
1169
|
+
filterPopupId: gt,
|
|
1170
|
+
inputFilterOptions: _t,
|
|
1171
|
+
numberFilterOptions: vt,
|
|
1172
|
+
filterFields: yt,
|
|
1173
|
+
getFilterFields: bt,
|
|
1174
|
+
filterClick: xt,
|
|
1175
|
+
setFilter: St,
|
|
1176
|
+
clearFilter: Ct,
|
|
1177
|
+
setListFilterAll: wt,
|
|
1096
1178
|
isDragging: Qe,
|
|
1097
1179
|
dragLineLeft: $e,
|
|
1098
1180
|
startResize: et,
|
|
1099
1181
|
setTreeExpand: at,
|
|
1100
1182
|
setAllTreeExpand: nt,
|
|
1101
1183
|
clearTreeExpand: rt,
|
|
1102
|
-
defaultTreeConfig:
|
|
1103
|
-
setRowExpand:
|
|
1104
|
-
slotShowTimestamp:
|
|
1105
|
-
isRefresh:
|
|
1106
|
-
realTableHeight:
|
|
1107
|
-
realTableWidth:
|
|
1108
|
-
loadData:
|
|
1109
|
-
reloadData:
|
|
1110
|
-
getTableData:
|
|
1184
|
+
defaultTreeConfig: q,
|
|
1185
|
+
setRowExpand: st,
|
|
1186
|
+
slotShowTimestamp: Oe,
|
|
1187
|
+
isRefresh: c,
|
|
1188
|
+
realTableHeight: a,
|
|
1189
|
+
realTableWidth: o,
|
|
1190
|
+
loadData: ut,
|
|
1191
|
+
reloadData: dt,
|
|
1192
|
+
getTableData: ft
|
|
1111
1193
|
};
|
|
1112
|
-
},
|
|
1194
|
+
}, be = ["onClick"], xe = { key: 0 }, Se = { key: 1 }, B = { key: 2 }, Ce = {
|
|
1113
1195
|
key: 3,
|
|
1114
1196
|
style: { "text-align": "center" }
|
|
1115
|
-
},
|
|
1197
|
+
}, we = {
|
|
1116
1198
|
key: 0,
|
|
1117
1199
|
style: {
|
|
1118
1200
|
display: "inline-flex",
|
|
@@ -1123,7 +1205,7 @@ var _e = (e) => {
|
|
|
1123
1205
|
padding: "0px",
|
|
1124
1206
|
width: "14px"
|
|
1125
1207
|
}
|
|
1126
|
-
},
|
|
1208
|
+
}, V = { key: 1 }, Te = ["id"], Ee = { style: {
|
|
1127
1209
|
"text-align": "center",
|
|
1128
1210
|
"font-weight": "bold"
|
|
1129
1211
|
} }, De = { style: {
|
|
@@ -1134,19 +1216,25 @@ var _e = (e) => {
|
|
|
1134
1216
|
display: "flex",
|
|
1135
1217
|
"justify-content": "center",
|
|
1136
1218
|
"margin-top": "5px"
|
|
1137
|
-
} }, ke = { style: { margin: "0 0 4px" } },
|
|
1219
|
+
} }, ke = { style: { margin: "0 0 4px" } }, H = { style: {
|
|
1138
1220
|
display: "flex",
|
|
1139
1221
|
"justify-content": "center",
|
|
1140
1222
|
"margin-top": "5px",
|
|
1141
1223
|
padding: "5px 0",
|
|
1142
1224
|
"border-top": "1px solid #e0e0e0"
|
|
1143
|
-
} },
|
|
1225
|
+
} }, Ae = ["onMousedown"], je = ["onClick", "onMouseenter"], Me = {
|
|
1144
1226
|
key: 3,
|
|
1145
1227
|
style: { "margin-left": "6px" }
|
|
1146
1228
|
}, Ne = { key: 4 }, Pe = { key: 5 }, Fe = { style: {
|
|
1147
1229
|
display: "flex",
|
|
1148
1230
|
gap: "4px"
|
|
1149
|
-
} }, Ie = ["title"], Le =
|
|
1231
|
+
} }, Ie = ["title"], Le = {
|
|
1232
|
+
key: 9,
|
|
1233
|
+
style: {
|
|
1234
|
+
width: "100%",
|
|
1235
|
+
"text-align": "center"
|
|
1236
|
+
}
|
|
1237
|
+
}, Re = ["title"], ze = { key: 1 }, U = /* @__PURE__ */ c({
|
|
1150
1238
|
inheritAttrs: !1,
|
|
1151
1239
|
name: "pretextTable",
|
|
1152
1240
|
props: {
|
|
@@ -1214,20 +1302,20 @@ var _e = (e) => {
|
|
|
1214
1302
|
"toggleRowExpand"
|
|
1215
1303
|
],
|
|
1216
1304
|
setup(c, { expose: d, emit: f }) {
|
|
1217
|
-
let p = c, { keyNames: m, pretextTableRef: g, nowDataSource: y, tableRef: x, isLoading: w, headerHeight:
|
|
1305
|
+
let p = c, { keyNames: m, pretextTableRef: g, nowDataSource: y, tableRef: x, isLoading: w, headerHeight: j, topEmptyHeight: ce, visibleData: M, visibleWidthStartColumnIndex: le, visibleWidthEndColumnIndex: ue, columns: N, realColumns: P, headerRef: de, onScroll: fe, onWheel: pe, gridTemplateColumns: F, blurAnyElement: I, scrollbarHeight: me, headerStyles: L, divLineHeightOffset: he, updateFooter: ge, updateFooterCellLabel: _e, footerHeight: ve, footerColumns: R, getFooterHeight: ye, itemStyles: U, fixedLeftIndex: W, fixedRightIndex: G, fixedColumnsLeft: Be, fixedColumnsRight: K, currentRow: Ve, cellClick: He, headerClick: Ue, hoverRow: We, cellMousemove: 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: q, filterFields: J, getFilterFields: it, filterClick: at, setFilter: ot, clearFilter: st, 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 } = z({
|
|
1218
1306
|
props: p,
|
|
1219
1307
|
emits: f
|
|
1220
1308
|
});
|
|
1221
1309
|
return d({
|
|
1222
|
-
loadData:
|
|
1223
|
-
reloadData:
|
|
1224
|
-
getCheckboxRecords:
|
|
1225
|
-
clearCheckboxRow:
|
|
1226
|
-
updateFooter:
|
|
1227
|
-
updateFooterCellLabel:
|
|
1228
|
-
getFooterHeight:
|
|
1229
|
-
getTableData:
|
|
1230
|
-
setTreeExpand:
|
|
1310
|
+
loadData: gt,
|
|
1311
|
+
reloadData: _t,
|
|
1312
|
+
getCheckboxRecords: Xe,
|
|
1313
|
+
clearCheckboxRow: Ze,
|
|
1314
|
+
updateFooter: ge,
|
|
1315
|
+
updateFooterCellLabel: _e,
|
|
1316
|
+
getFooterHeight: ye,
|
|
1317
|
+
getTableData: vt,
|
|
1318
|
+
setTreeExpand: Z,
|
|
1231
1319
|
setAllTreeExpand: ut,
|
|
1232
1320
|
clearTreeExpand: dt,
|
|
1233
1321
|
setRowExpand: Q
|
|
@@ -1251,8 +1339,8 @@ var _e = (e) => {
|
|
|
1251
1339
|
}, { height: `${S($)}px` }]),
|
|
1252
1340
|
ref_key: "tableRef",
|
|
1253
1341
|
ref: x,
|
|
1254
|
-
onScroll: d[
|
|
1255
|
-
onWheel: d[
|
|
1342
|
+
onScroll: d[1] ||= (...e) => S(fe) && S(fe)(...e),
|
|
1343
|
+
onWheel: d[2] ||= (...e) => S(pe) && S(pe)(...e)
|
|
1256
1344
|
}, [
|
|
1257
1345
|
a("div", {
|
|
1258
1346
|
ref_key: "headerRef",
|
|
@@ -1267,61 +1355,65 @@ var _e = (e) => {
|
|
|
1267
1355
|
top: "0",
|
|
1268
1356
|
left: "0",
|
|
1269
1357
|
"z-index": "1"
|
|
1270
|
-
}, { gridTemplateColumns: S(
|
|
1358
|
+
}, { gridTemplateColumns: S(F) }])
|
|
1271
1359
|
}, [(h(!0), i(e, null, _(S(P), (f, p) => (h(), i(e, { key: "headerRow_" + p }, [(h(!0), i(e, null, _(f, (f, m) => (h(), i("div", {
|
|
1272
1360
|
key: "header_" + (f?.field || "null") + "_" + m,
|
|
1273
1361
|
class: "pretextTable-grid-header",
|
|
1274
1362
|
style: u(f ? {
|
|
1275
|
-
fontWeight: S(
|
|
1276
|
-
fontSize: S(
|
|
1363
|
+
fontWeight: S(L).fontWeight,
|
|
1364
|
+
fontSize: S(L).fontSize,
|
|
1277
1365
|
gridRow: f?.style?.gridRow || "",
|
|
1278
1366
|
gridColumn: f?.style?.gridColumn || "",
|
|
1279
1367
|
zIndex: m == 0 ? 3 : f.fixed == "left" || f.fixed == "right" ? 2 : 1,
|
|
1280
1368
|
left: f.fixed == "left" ? S(Be)[m] : "",
|
|
1281
|
-
right: f.fixed == "right" ? S(
|
|
1369
|
+
right: f.fixed == "right" ? S(K)[m] : "",
|
|
1282
1370
|
borderLeft: f.fixed == "right" ? "1px solid var(--pretextTable-border-color)" : "",
|
|
1283
|
-
boxShadow: f.fixed == "left" && m == S(
|
|
1371
|
+
boxShadow: f.fixed == "left" && m == S(W) ? "var(--pretextTable-shadow-color) 2px 0px 5px -1px" : f.fixed == "right" && m == S(G) ? "var(--pretextTable-shadow-color) -2px 0px 5px -1px" : "",
|
|
1284
1372
|
borderBottom: f ? "1px solid var(--pretextTable-border-color)" : "",
|
|
1285
1373
|
minHeight: "30px"
|
|
1286
1374
|
} : {}),
|
|
1287
|
-
onClick: (e) => S(
|
|
1288
|
-
}, [f ? f.type == "checkbox" && p == 0 ? (h(), i("span",
|
|
1289
|
-
modelValue: S(
|
|
1290
|
-
indeterminate: S(
|
|
1375
|
+
onClick: (e) => S(Ue)(f)
|
|
1376
|
+
}, [f ? f.type == "checkbox" && p == 0 ? (h(), i("span", Se, [s(S(k), {
|
|
1377
|
+
modelValue: S(Ke)[f.field],
|
|
1378
|
+
indeterminate: S(qe)[f.field],
|
|
1291
1379
|
content: "",
|
|
1292
|
-
onChange:
|
|
1293
|
-
}, null, 8, [
|
|
1380
|
+
onChange: (e) => S(Je)(f.field)
|
|
1381
|
+
}, null, 8, [
|
|
1382
|
+
"modelValue",
|
|
1383
|
+
"indeterminate",
|
|
1384
|
+
"onChange"
|
|
1385
|
+
])])) : f?.type == "seq" && p == 0 ? (h(), i("div", B, b(f.title || "序号"), 1)) : (h(), i("span", Ce, [
|
|
1294
1386
|
a("span", null, [f.slots?.header ? v(c.$slots, f.slots?.header, {
|
|
1295
1387
|
key: 0,
|
|
1296
1388
|
column: f,
|
|
1297
1389
|
text: f.title
|
|
1298
1390
|
}, () => [o(b(f.title), 1)]) : (h(), i(e, { key: 1 }, [o(b(f.title), 1)], 64))]),
|
|
1299
|
-
f.sortable && !f.children?.length ? (h(), i("span",
|
|
1391
|
+
f.sortable && !f.children?.length ? (h(), i("span", we, [s(S(A), {
|
|
1300
1392
|
name: "caret-up",
|
|
1301
1393
|
style: {
|
|
1302
1394
|
position: "absolute",
|
|
1303
1395
|
top: "-0.8em"
|
|
1304
1396
|
},
|
|
1305
|
-
class: l(["pretextTable-sort-icon", { "pretextTable-sort-icon-active": S(
|
|
1306
|
-
onClick:
|
|
1397
|
+
class: l(["pretextTable-sort-icon", { "pretextTable-sort-icon-active": S(Qe) == f.field && S($e) == "asc" }]),
|
|
1398
|
+
onClick: D((e) => S(et)(f.field, "asc"), ["stop"])
|
|
1307
1399
|
}, null, 8, ["class", "onClick"]), s(S(A), {
|
|
1308
1400
|
name: "caret-down",
|
|
1309
1401
|
style: {
|
|
1310
1402
|
position: "absolute",
|
|
1311
1403
|
top: "-0.2em"
|
|
1312
1404
|
},
|
|
1313
|
-
class: l(["pretextTable-sort-icon", { "pretextTable-sort-icon-active": S(
|
|
1314
|
-
onClick:
|
|
1405
|
+
class: l(["pretextTable-sort-icon", { "pretextTable-sort-icon-active": S(Qe) == f.field && S($e) == "desc" }]),
|
|
1406
|
+
onClick: D((e) => S(et)(f.field, "desc"), ["stop"])
|
|
1315
1407
|
}, null, 8, ["class", "onClick"])])) : r("", !0),
|
|
1316
|
-
S(
|
|
1408
|
+
S(J)[m]?.type && !f.children?.length ? (h(), i("span", V, [s(S(A), {
|
|
1317
1409
|
name: "funnel",
|
|
1318
|
-
class: l(["pretextTable-filter-icon", { "pretextTable-filter-icon-active": S(
|
|
1319
|
-
onClick:
|
|
1320
|
-
}, null, 8, ["class", "onClick"]), S(
|
|
1410
|
+
class: l(["pretextTable-filter-icon", { "pretextTable-filter-icon-active": S(J)[m].isActive }]),
|
|
1411
|
+
onClick: D((e) => S(at)(m, e), ["stop"])
|
|
1412
|
+
}, null, 8, ["class", "onClick"]), S(J)[m].isShow ? (h(), n(t, {
|
|
1321
1413
|
key: 0,
|
|
1322
1414
|
to: "body"
|
|
1323
1415
|
}, [a("div", {
|
|
1324
|
-
id: S(
|
|
1416
|
+
id: S(nt) + f.field,
|
|
1325
1417
|
class: "pretextTable-filter-popup",
|
|
1326
1418
|
style: u([{
|
|
1327
1419
|
"background-color": "#fff",
|
|
@@ -1331,114 +1423,114 @@ var _e = (e) => {
|
|
|
1331
1423
|
"z-index": "99999"
|
|
1332
1424
|
}, {
|
|
1333
1425
|
position: "absolute",
|
|
1334
|
-
top: S(
|
|
1335
|
-
left: S(
|
|
1426
|
+
top: S(J)[m].clientY + "px",
|
|
1427
|
+
left: S(J)[m].clientX + "px"
|
|
1336
1428
|
}])
|
|
1337
1429
|
}, [
|
|
1338
|
-
a("div",
|
|
1339
|
-
S(
|
|
1430
|
+
a("div", Ee, b(f.title), 1),
|
|
1431
|
+
S(J)[m].type == "inputFilter" ? (h(), i("div", {
|
|
1340
1432
|
key: 0,
|
|
1341
|
-
style: u({ width: S(
|
|
1433
|
+
style: u({ width: S(tt) + "px" })
|
|
1342
1434
|
}, [a("div", null, [s(S(ne), {
|
|
1343
|
-
modelValue: S(
|
|
1344
|
-
"onUpdate:modelValue": (e) => S(
|
|
1435
|
+
modelValue: S(J)[m].value,
|
|
1436
|
+
"onUpdate:modelValue": (e) => S(J)[m].value = e,
|
|
1345
1437
|
placeholder: "按回车筛选",
|
|
1346
1438
|
trim: !0,
|
|
1347
1439
|
style: { width: "100%" },
|
|
1348
|
-
onKeyup:
|
|
1440
|
+
onKeyup: ee((e) => S(ot)(f.field), ["enter"])
|
|
1349
1441
|
}, null, 8, [
|
|
1350
1442
|
"modelValue",
|
|
1351
1443
|
"onUpdate:modelValue",
|
|
1352
1444
|
"onKeyup"
|
|
1353
|
-
])]), a("div", De, [s(S(
|
|
1354
|
-
modelValue: S(
|
|
1355
|
-
"onUpdate:modelValue": (e) => S(
|
|
1356
|
-
options: S(
|
|
1445
|
+
])]), a("div", De, [s(S(ae), {
|
|
1446
|
+
modelValue: S(J)[m].inputFilter.type,
|
|
1447
|
+
"onUpdate:modelValue": (e) => S(J)[m].inputFilter.type = e,
|
|
1448
|
+
options: S(rt)
|
|
1357
1449
|
}, null, 8, [
|
|
1358
1450
|
"modelValue",
|
|
1359
1451
|
"onUpdate:modelValue",
|
|
1360
1452
|
"options"
|
|
1361
1453
|
])])], 4)) : r("", !0),
|
|
1362
|
-
S(
|
|
1454
|
+
S(J)[m].type == "numberFilter" || S(J)[m].type == "numberFilter%" ? (h(), i("div", {
|
|
1363
1455
|
key: 1,
|
|
1364
|
-
style: u({ width: S(
|
|
1365
|
-
}, [a("div", Oe, [s(S(
|
|
1366
|
-
modelValue: S(
|
|
1367
|
-
"onUpdate:modelValue": (e) => S(
|
|
1368
|
-
options: S(
|
|
1456
|
+
style: u({ width: S(tt) + "px" })
|
|
1457
|
+
}, [a("div", Oe, [s(S(ae), {
|
|
1458
|
+
modelValue: S(J)[m].numberFilter.type,
|
|
1459
|
+
"onUpdate:modelValue": (e) => S(J)[m].numberFilter.type = e,
|
|
1460
|
+
options: S(q)
|
|
1369
1461
|
}, null, 8, [
|
|
1370
1462
|
"modelValue",
|
|
1371
1463
|
"onUpdate:modelValue",
|
|
1372
1464
|
"options"
|
|
1373
1465
|
])]), a("div", null, [s(S(ie), {
|
|
1374
|
-
modelValue: S(
|
|
1375
|
-
"onUpdate:modelValue": (e) => S(
|
|
1466
|
+
modelValue: S(J)[m].value,
|
|
1467
|
+
"onUpdate:modelValue": (e) => S(J)[m].value = e,
|
|
1376
1468
|
placeholder: "按回车筛选",
|
|
1377
1469
|
controlConfig: { showButton: !1 },
|
|
1378
1470
|
style: { width: "100%" },
|
|
1379
|
-
onKeyup:
|
|
1471
|
+
onKeyup: ee((e) => S(ot)(f.field), ["enter"])
|
|
1380
1472
|
}, {
|
|
1381
|
-
suffix: T(() => [...d[
|
|
1473
|
+
suffix: T(() => [...d[3] ||= [o("%", -1)]]),
|
|
1382
1474
|
_: 1
|
|
1383
1475
|
}, 8, [
|
|
1384
1476
|
"modelValue",
|
|
1385
1477
|
"onUpdate:modelValue",
|
|
1386
1478
|
"onKeyup"
|
|
1387
1479
|
])])], 4)) : r("", !0),
|
|
1388
|
-
S(
|
|
1480
|
+
S(J)[m].type == "listFilter" ? (h(), i("div", {
|
|
1389
1481
|
key: 2,
|
|
1390
|
-
style: u({ maxWidth: S(
|
|
1391
|
-
}, [a("div", ke, [s(S(
|
|
1392
|
-
modelValue: S(
|
|
1393
|
-
indeterminate: S(
|
|
1482
|
+
style: u({ maxWidth: S(tt) + "px" })
|
|
1483
|
+
}, [a("div", ke, [s(S(k), {
|
|
1484
|
+
modelValue: S(J)[m].listFilter.selectedValue.length == S(J)[m].listFilter.listOptions.length,
|
|
1485
|
+
indeterminate: S(J)[m].listFilter.selectedValue.length > 0 && S(J)[m].listFilter.selectedValue.length < S(J)[m].listFilter.listOptions.length,
|
|
1394
1486
|
content: "全部",
|
|
1395
|
-
onChange: (e) => S(
|
|
1487
|
+
onChange: (e) => S(ct)(S(J)[m])
|
|
1396
1488
|
}, null, 8, [
|
|
1397
1489
|
"modelValue",
|
|
1398
1490
|
"indeterminate",
|
|
1399
1491
|
"onChange"
|
|
1400
1492
|
])]), s(S(te), {
|
|
1401
|
-
modelValue: S(
|
|
1402
|
-
"onUpdate:modelValue": (e) => S(
|
|
1403
|
-
options: S(
|
|
1404
|
-
onChange: S(
|
|
1493
|
+
modelValue: S(J)[m].listFilter.selectedValue,
|
|
1494
|
+
"onUpdate:modelValue": (e) => S(J)[m].listFilter.selectedValue = e,
|
|
1495
|
+
options: S(J)[m].listFilter.listOptions,
|
|
1496
|
+
onChange: S(I)
|
|
1405
1497
|
}, null, 8, [
|
|
1406
1498
|
"modelValue",
|
|
1407
1499
|
"onUpdate:modelValue",
|
|
1408
1500
|
"options",
|
|
1409
1501
|
"onChange"
|
|
1410
1502
|
])], 4)) : r("", !0),
|
|
1411
|
-
a("div",
|
|
1412
|
-
s(S(
|
|
1503
|
+
a("div", H, [
|
|
1504
|
+
s(S(O), {
|
|
1413
1505
|
type: "primary",
|
|
1414
1506
|
size: "small",
|
|
1415
1507
|
mode: "text",
|
|
1416
|
-
onClick: (e) => S(
|
|
1508
|
+
onClick: (e) => S(ot)(f.field)
|
|
1417
1509
|
}, {
|
|
1418
|
-
default: T(() => [...d[
|
|
1510
|
+
default: T(() => [...d[4] ||= [o(" 筛选 ", -1)]]),
|
|
1419
1511
|
_: 1
|
|
1420
1512
|
}, 8, ["onClick"]),
|
|
1421
|
-
s(S(
|
|
1513
|
+
s(S(O), {
|
|
1422
1514
|
type: "primary",
|
|
1423
1515
|
size: "small",
|
|
1424
1516
|
mode: "text",
|
|
1425
|
-
onClick: (e) => S(
|
|
1517
|
+
onClick: (e) => S(st)(f.field)
|
|
1426
1518
|
}, {
|
|
1427
|
-
default: T(() => [...d[
|
|
1519
|
+
default: T(() => [...d[5] ||= [o(" 重置 ", -1)]]),
|
|
1428
1520
|
_: 1
|
|
1429
1521
|
}, 8, ["onClick"]),
|
|
1430
|
-
s(S(
|
|
1522
|
+
s(S(O), {
|
|
1431
1523
|
type: "primary",
|
|
1432
1524
|
size: "small",
|
|
1433
1525
|
mode: "text",
|
|
1434
|
-
onClick: d[
|
|
1526
|
+
onClick: d[0] ||= (e) => S(st)()
|
|
1435
1527
|
}, {
|
|
1436
|
-
default: T(() => [...d[
|
|
1528
|
+
default: T(() => [...d[6] ||= [o(" 重置所有 ", -1)]]),
|
|
1437
1529
|
_: 1
|
|
1438
1530
|
})
|
|
1439
1531
|
])
|
|
1440
|
-
], 12,
|
|
1441
|
-
])) : (h(), i("span",
|
|
1532
|
+
], 12, Te)])) : r("", !0)])) : r("", !0)
|
|
1533
|
+
])) : (h(), i("span", xe)), f?.resizable && !f.children?.length ? (h(), i("div", {
|
|
1442
1534
|
key: 4,
|
|
1443
1535
|
style: {
|
|
1444
1536
|
position: "absolute",
|
|
@@ -1448,16 +1540,16 @@ var _e = (e) => {
|
|
|
1448
1540
|
height: "100%",
|
|
1449
1541
|
cursor: "col-resize"
|
|
1450
1542
|
},
|
|
1451
|
-
onMousedown:
|
|
1452
|
-
}, null, 40,
|
|
1453
|
-
S(
|
|
1543
|
+
onMousedown: D((e) => S(X)(e, f), ["prevent", "stop"])
|
|
1544
|
+
}, null, 40, Ae)) : r("", !0)], 12, be))), 128))], 64))), 128))], 4),
|
|
1545
|
+
S(M).length == 0 ? (h(), i("div", {
|
|
1454
1546
|
key: 0,
|
|
1455
1547
|
style: u([{
|
|
1456
1548
|
display: "flex",
|
|
1457
1549
|
"align-items": "center",
|
|
1458
1550
|
position: "absolute",
|
|
1459
1551
|
left: "calc(50% - 35px)"
|
|
1460
|
-
}, { minHeight: `${S($) - S(
|
|
1552
|
+
}, { minHeight: `${S($) - S(j) - S(ve) - 30}px` }])
|
|
1461
1553
|
}, " 暂无数据 ", 4)) : r("", !0),
|
|
1462
1554
|
a("div", {
|
|
1463
1555
|
class: "pretextTable-grid",
|
|
@@ -1468,13 +1560,13 @@ var _e = (e) => {
|
|
|
1468
1560
|
contain: "layout paint style",
|
|
1469
1561
|
position: "relative"
|
|
1470
1562
|
}, {
|
|
1471
|
-
minHeight: `${S($) - S(
|
|
1472
|
-
height: `${S(
|
|
1563
|
+
minHeight: `${S($) - S(j) - S(ve) - S(he)}px`,
|
|
1564
|
+
height: `${S(me)}px`
|
|
1473
1565
|
}])
|
|
1474
1566
|
}, [a("div", {
|
|
1475
1567
|
class: "pretextTable-grid-empty",
|
|
1476
|
-
style: u({ height: `${S(
|
|
1477
|
-
}, null, 4), (h(!0), i(e, null, _(S(
|
|
1568
|
+
style: u({ height: `${S(ce)}px` })
|
|
1569
|
+
}, null, 4), (h(!0), i(e, null, _(S(M), (t, d) => (h(), i(e, { key: t[S(m).id] }, [p.expandConfig?.isExpand && t[S(m).isExpandRow] ? (h(), i("div", {
|
|
1478
1570
|
key: 0,
|
|
1479
1571
|
class: "pretextTable-grid-item",
|
|
1480
1572
|
style: u([{
|
|
@@ -1484,7 +1576,7 @@ var _e = (e) => {
|
|
|
1484
1576
|
}, [a("div", { style: u({
|
|
1485
1577
|
position: "sticky",
|
|
1486
1578
|
left: p.expandConfig?.mode == "inside" ? "0px" : void 0,
|
|
1487
|
-
width: p.expandConfig?.mode == "inside" ? `${S(
|
|
1579
|
+
width: p.expandConfig?.mode == "inside" ? `${S(ht) - 15}px` : "100%"
|
|
1488
1580
|
}) }, [v(c.$slots, p.expandConfig?.slotName, {
|
|
1489
1581
|
row: t,
|
|
1490
1582
|
rowIndex: d
|
|
@@ -1496,29 +1588,29 @@ var _e = (e) => {
|
|
|
1496
1588
|
"min-width": "100%",
|
|
1497
1589
|
"align-content": "start",
|
|
1498
1590
|
contain: "layout style paint"
|
|
1499
|
-
}, { gridTemplateColumns: S(
|
|
1500
|
-
}, [(h(!0), i(e, null, _(S(
|
|
1591
|
+
}, { gridTemplateColumns: S(F) }])
|
|
1592
|
+
}, [(h(!0), i(e, null, _(S(N), (f, g) => (h(), i("div", {
|
|
1501
1593
|
key: "item_" + f.field,
|
|
1502
1594
|
class: l(["pretextTable-grid-item pretextTable-flex-align-items-center", {
|
|
1503
|
-
"pretextTable-grid-item-hover": p.rowConfig?.isHover && S(
|
|
1504
|
-
"pretextTable-grid-item-current": p.rowConfig?.isCurrent && S(
|
|
1595
|
+
"pretextTable-grid-item-hover": p.rowConfig?.isHover && S(We)[S(m).id] == t[S(m).id],
|
|
1596
|
+
"pretextTable-grid-item-current": p.rowConfig?.isCurrent && S(Ve)[S(m).id] == t[S(m).id],
|
|
1505
1597
|
"pretextTable-grid-item-stripe": p.stripe && t[S(m).stripe]
|
|
1506
1598
|
}]),
|
|
1507
1599
|
style: u({
|
|
1508
|
-
fontWeight: S(
|
|
1509
|
-
fontSize: S(
|
|
1600
|
+
fontWeight: S(U).fontWeight,
|
|
1601
|
+
fontSize: S(U).fontSize,
|
|
1510
1602
|
zIndex: +(f.fixed == "left" || f.fixed == "right"),
|
|
1511
1603
|
position: f.fixed == "left" || f.fixed == "right" ? "sticky" : "static",
|
|
1512
1604
|
left: f.fixed == "left" ? S(Be)[g] : "",
|
|
1513
|
-
right: f.fixed == "right" ? S(
|
|
1605
|
+
right: f.fixed == "right" ? S(K)[g] : "",
|
|
1514
1606
|
borderLeft: f.fixed == "right" ? "1px solid var(--pretextTable-border-color)" : "",
|
|
1515
|
-
boxShadow: f.fixed == "left" && g == S(
|
|
1607
|
+
boxShadow: f.fixed == "left" && g == S(W) ? "var(--pretextTable-shadow-color) 2px 0px 5px -1px" : f.fixed == "right" && g == S(G) ? "var(--pretextTable-shadow-color) -2px 0px 5px -1px" : "",
|
|
1516
1608
|
height: `${t[S(m).height]}px`,
|
|
1517
1609
|
justifyContent: f.type == "checkbox" ? "center" : ""
|
|
1518
1610
|
}),
|
|
1519
|
-
onClick: (e) => S(
|
|
1520
|
-
onMouseenter: (e) => S(
|
|
1521
|
-
}, [f.fixed == "left" || f.fixed == "right" || g >= S(
|
|
1611
|
+
onClick: (e) => S(He)(t, f),
|
|
1612
|
+
onMouseenter: (e) => S(Ge)(t)
|
|
1613
|
+
}, [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 }, [
|
|
1522
1614
|
E(s(S(A), {
|
|
1523
1615
|
name: "spinner",
|
|
1524
1616
|
roll: ""
|
|
@@ -1527,32 +1619,37 @@ var _e = (e) => {
|
|
|
1527
1619
|
name: "caret-right",
|
|
1528
1620
|
style: {},
|
|
1529
1621
|
class: "pretextTable-icon",
|
|
1530
|
-
onClick:
|
|
1622
|
+
onClick: D((e) => S(Z)([t], !0), ["stop"])
|
|
1531
1623
|
}, null, 8, ["onClick"]), [[C, !t[S(m).isCollapsed] && !t[S(m).lazyLoading]]]),
|
|
1532
1624
|
E(s(S(A), {
|
|
1533
1625
|
name: "caret-down",
|
|
1534
1626
|
style: {},
|
|
1535
1627
|
class: "pretextTable-icon",
|
|
1536
|
-
onClick:
|
|
1628
|
+
onClick: D((e) => S(Z)([t], !1), ["stop"])
|
|
1537
1629
|
}, null, 8, ["onClick"]), [[C, t[S(m).isCollapsed] && !t[S(m).lazyLoading]]])
|
|
1538
|
-
], 64)) : r("", !0)], 64))], 64)) : r("", !0), f.type == "checkbox" ? (h(), n(S(
|
|
1630
|
+
], 64)) : r("", !0)], 64))], 64)) : r("", !0), f.type == "checkbox" ? (h(), n(S(k), {
|
|
1539
1631
|
key: 1,
|
|
1540
1632
|
modelValue: t[f.field],
|
|
1541
|
-
|
|
1542
|
-
|
|
1633
|
+
indeterminate: t[S(m).checkedIndeterminate + f.field],
|
|
1634
|
+
onChange: (e) => S(Ye)(t, f.field)
|
|
1635
|
+
}, null, 8, [
|
|
1636
|
+
"modelValue",
|
|
1637
|
+
"indeterminate",
|
|
1638
|
+
"onChange"
|
|
1639
|
+
])) : f.type == "seq" ? (h(), i(e, { key: 2 }, [p.treeConfig?.isOpenTree ? (h(), i("span", {
|
|
1543
1640
|
key: 0,
|
|
1544
1641
|
style: u({ marginLeft: `${(Number(t[S(m).level]) - 1) * (p.treeConfig?.indent || 20)}px` })
|
|
1545
1642
|
}, null, 4)) : r("", !0), o(" " + b(t.pretextSeq), 1)], 64)) : f.type == "expand" ? (h(), i("span", Me, [E(s(S(A), {
|
|
1546
1643
|
name: "arrow-right",
|
|
1547
1644
|
style: {},
|
|
1548
1645
|
class: "pretextTable-icon",
|
|
1549
|
-
onClick:
|
|
1646
|
+
onClick: D((e) => S(Q)([t], !0), ["stop"])
|
|
1550
1647
|
}, null, 8, ["onClick"]), [[C, !t[S(m).isRowExpanded]]]), E(s(S(A), {
|
|
1551
1648
|
name: "arrow-down",
|
|
1552
1649
|
style: {},
|
|
1553
1650
|
class: "pretextTable-icon",
|
|
1554
|
-
onClick:
|
|
1555
|
-
}, 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(
|
|
1651
|
+
onClick: D((e) => S(Q)([t], !1), ["stop"])
|
|
1652
|
+
}, 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), {
|
|
1556
1653
|
key: 0,
|
|
1557
1654
|
size: "mini",
|
|
1558
1655
|
border: !0,
|
|
@@ -1573,7 +1670,7 @@ var _e = (e) => {
|
|
|
1573
1670
|
}, 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", {
|
|
1574
1671
|
key: 0,
|
|
1575
1672
|
title: n.tip || ""
|
|
1576
|
-
}, [s(S(
|
|
1673
|
+
}, [s(S(O), {
|
|
1577
1674
|
size: n.size || "mini",
|
|
1578
1675
|
status: n.type == "primary" ? "success" : n.type == "danger" ? "error" : void 0,
|
|
1579
1676
|
mode: n.mode || "button",
|
|
@@ -1592,7 +1689,7 @@ var _e = (e) => {
|
|
|
1592
1689
|
"disabled",
|
|
1593
1690
|
"loading",
|
|
1594
1691
|
"onClick"
|
|
1595
|
-
])], 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(
|
|
1692
|
+
])], 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), {
|
|
1596
1693
|
key: 0,
|
|
1597
1694
|
size: "mini",
|
|
1598
1695
|
modelValue: t[f.field],
|
|
@@ -1612,17 +1709,25 @@ var _e = (e) => {
|
|
|
1612
1709
|
"disabled",
|
|
1613
1710
|
"loading",
|
|
1614
1711
|
"onChange"
|
|
1615
|
-
])) : r("", !0)], 64)) : (h(), i("span", {
|
|
1616
|
-
|
|
1712
|
+
])) : r("", !0)], 64)) : f.slots?.defaultType == "checkbox" ? (h(), i("span", Le, [s(S(k), {
|
|
1713
|
+
modelValue: t[f.field],
|
|
1714
|
+
indeterminate: f.slots?.defaultProps?.checkbox?.checkedIndeterminateField ? t[f.slots?.defaultProps?.checkbox?.checkedIndeterminateField] : !1,
|
|
1715
|
+
onChange: (e) => f.slots?.defaultProps?.checkbox?.onChange?.(t, g)
|
|
1716
|
+
}, null, 8, [
|
|
1717
|
+
"modelValue",
|
|
1718
|
+
"indeterminate",
|
|
1719
|
+
"onChange"
|
|
1720
|
+
])])) : (h(), i("span", {
|
|
1721
|
+
key: 10,
|
|
1617
1722
|
class: l({ "pretextTable-text-ellipsis": !!p.showOverflow }),
|
|
1618
1723
|
title: p.showOverflow && t[f.field] || ""
|
|
1619
|
-
}, [f.slots?.default ? (h(), i(e, { key: 0 }, [!p.lazyLoadSlot || t.slotShowTimestamp == S(
|
|
1724
|
+
}, [f.slots?.default ? (h(), i(e, { key: 0 }, [!p.lazyLoadSlot || t.slotShowTimestamp == S(pt) ? v(c.$slots, f.slots?.default, {
|
|
1620
1725
|
key: 0,
|
|
1621
1726
|
row: t,
|
|
1622
1727
|
column: f,
|
|
1623
1728
|
rowIndex: d
|
|
1624
|
-
}, () => [o(b(t[f.field] ?? ""), 1)]) : r("", !0)], 64)) : (h(), i(e, { key: 1 }, [o(b(t[f.field] ?? ""), 1)], 64))], 10,
|
|
1625
|
-
p.showFooter && S(
|
|
1729
|
+
}, () => [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),
|
|
1730
|
+
p.showFooter && S(R).length > 0 ? (h(), i("div", {
|
|
1626
1731
|
key: 1,
|
|
1627
1732
|
style: u([{
|
|
1628
1733
|
display: "grid",
|
|
@@ -1633,17 +1738,17 @@ var _e = (e) => {
|
|
|
1633
1738
|
contain: "layout paint style",
|
|
1634
1739
|
bottom: "0",
|
|
1635
1740
|
"z-index": "1"
|
|
1636
|
-
}, { gridTemplateColumns: S(
|
|
1637
|
-
}, [(h(!0), i(e, null, _(S(
|
|
1741
|
+
}, { gridTemplateColumns: S(F) }])
|
|
1742
|
+
}, [(h(!0), i(e, null, _(S(R), (t) => (h(), i(e, null, [(h(!0), i(e, null, _(t, (e, t) => (h(), i("div", {
|
|
1638
1743
|
key: "footer_" + e.field,
|
|
1639
1744
|
class: "pretextTable-grid-footer",
|
|
1640
1745
|
style: u({
|
|
1641
|
-
fontSize: S(
|
|
1746
|
+
fontSize: S(L).fontSize,
|
|
1642
1747
|
zIndex: t == 0 ? 3 : e.fixed == "left" || e.fixed == "right" ? 2 : 1,
|
|
1643
1748
|
left: e.fixed == "left" ? S(Be)[t] : "",
|
|
1644
|
-
right: e.fixed == "right" ? S(
|
|
1749
|
+
right: e.fixed == "right" ? S(K)[t] : "",
|
|
1645
1750
|
borderLeft: e.fixed == "right" ? "1px solid var(--pretextTable-border-color)" : "",
|
|
1646
|
-
boxShadow: e.fixed == "left" && t == S(
|
|
1751
|
+
boxShadow: e.fixed == "left" && t == S(W) ? "var(--pretextTable-shadow-color) 2px 0px 5px -1px" : e.fixed == "right" && t == S(G) ? "var(--pretextTable-shadow-color) -2px 0px 5px -1px" : "",
|
|
1647
1752
|
height: `${e.height}px`,
|
|
1648
1753
|
maxHeight: `${e.height}px`
|
|
1649
1754
|
})
|
|
@@ -1652,7 +1757,7 @@ var _e = (e) => {
|
|
|
1652
1757
|
footerColumn: e,
|
|
1653
1758
|
footerData: e.data,
|
|
1654
1759
|
footerRowIndex: t
|
|
1655
|
-
}, () => [o(b(e.data ?? ""), 1)]) : (h(), i("span",
|
|
1760
|
+
}, () => [o(b(e.data ?? ""), 1)]) : (h(), i("span", ze, b(e.data ?? ""), 1))], 4))), 128))], 64))), 256))], 4)) : r("", !0)
|
|
1656
1761
|
], 36),
|
|
1657
1762
|
E(a("div", { style: u([{
|
|
1658
1763
|
position: "absolute",
|
|
@@ -1663,15 +1768,15 @@ var _e = (e) => {
|
|
|
1663
1768
|
"z-index": "99999",
|
|
1664
1769
|
"box-shadow": "0 0 2px rgba(64, 158, 255, 0.5)"
|
|
1665
1770
|
}, {
|
|
1666
|
-
transform: `translateX(${S(
|
|
1771
|
+
transform: `translateX(${S(Y)}px)`,
|
|
1667
1772
|
height: S($) + "px"
|
|
1668
|
-
}]) }, null, 4), [[C, S(
|
|
1669
|
-
a("div", { style: u({ backgroundColor: S(
|
|
1773
|
+
}]) }, null, 4), [[C, S(lt)]]),
|
|
1774
|
+
a("div", { style: u({ backgroundColor: S(mt) ? "red" : "" }) }, null, 4)
|
|
1670
1775
|
], 512));
|
|
1671
1776
|
}
|
|
1672
|
-
}),
|
|
1673
|
-
|
|
1674
|
-
e.component("HolyesTable",
|
|
1777
|
+
}), W = U;
|
|
1778
|
+
W.install = (e) => {
|
|
1779
|
+
e.component("HolyesTable", W);
|
|
1675
1780
|
};
|
|
1676
1781
|
//#endregion
|
|
1677
|
-
export {
|
|
1782
|
+
export { W as default, U as pretextTable };
|