@aplus-frontend/ui 0.5.28 → 0.5.29
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/es/index.mjs +84 -82
- package/es/src/ap-grid/index.vue.mjs +87 -80
- package/es/src/ap-grid/interface.d.ts +4 -0
- package/es/src/ap-grid/utils/col.mjs +48 -48
- package/es/src/ap-grid/utils/table.mjs +2 -2
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +52 -52
- package/es/src/business/hooks/index.d.ts +1 -0
- package/es/src/business/hooks/index.mjs +6 -4
- package/es/src/business/hooks/useGridRefresh.d.ts +17 -0
- package/es/src/business/hooks/useGridRefresh.mjs +17 -0
- package/es/src/full-screen/index.vue.mjs +17 -16
- package/es/src/full-screen/interface.d.ts +2 -1
- package/es/src/index.mjs +73 -71
- package/lib/index.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +4 -0
- package/lib/src/ap-grid/utils/col.js +1 -1
- package/lib/src/ap-grid/utils/table.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/business/hooks/index.d.ts +1 -0
- package/lib/src/business/hooks/index.js +1 -1
- package/lib/src/business/hooks/useGridRefresh.d.ts +17 -0
- package/lib/src/business/hooks/useGridRefresh.js +1 -0
- package/lib/src/full-screen/index.vue.js +1 -1
- package/lib/src/full-screen/interface.d.ts +2 -1
- package/lib/src/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as Fe, useSlots as Be, getCurrentInstance as Ie, ref as k, computed as n, unref as o, watch as
|
|
1
|
+
import { defineComponent as Fe, useSlots as Be, getCurrentInstance as Ie, ref as k, computed as n, unref as o, watch as F, createElementBlock as B, openBlock as s, normalizeStyle as z, normalizeClass as f, createCommentVNode as b, createElementVNode as I, createVNode as U, mergeProps as g, createSlots as G, withCtx as v, Fragment as X, renderList as A, createBlock as p, resolveDynamicComponent as _, renderSlot as V, normalizeProps as J, guardReactiveProps as Pe } from "vue";
|
|
2
2
|
import { VxeTable as Ee, VxeColumn as Q } from "vxe-table";
|
|
3
3
|
import "vxe-table/es/style.css";
|
|
4
4
|
import "vxe-pc-ui/es/style.css";
|
|
5
5
|
import { VxeUI as Y } from "vxe-pc-ui";
|
|
6
|
-
import { isUndefined as
|
|
6
|
+
import { isUndefined as w, omit as Ne } from "lodash-unified";
|
|
7
7
|
import { ApForm as Te } from "../ap-form/index.mjs";
|
|
8
8
|
import "../config-provider/index.mjs";
|
|
9
9
|
import { noRenderAsFormItemValueList as ze } from "../ap-table/constants.mjs";
|
|
@@ -111,17 +111,17 @@ const ko = /* @__PURE__ */ Fe({
|
|
|
111
111
|
},
|
|
112
112
|
setup(ae, { expose: re }) {
|
|
113
113
|
var q;
|
|
114
|
-
const L = Be(), a = ae,
|
|
115
|
-
|
|
116
|
-
const { e:
|
|
114
|
+
const L = Be(), a = ae, S = (q = Ie()) == null ? void 0 : q.appContext.app;
|
|
115
|
+
S && !S.__VXE_PC_UI_INSTALLED__ && (S.use(Y), S.__VXE_PC_UI_INSTALLED__ = !0);
|
|
116
|
+
const { e: P, b: d, be: te } = Xe("ap-grid"), le = Je("valueTypeMap"), i = k([]), D = k([]), m = k(), h = k(a.size), [, c] = Ge(), { t: ne } = Qe();
|
|
117
117
|
Y.setConfig({
|
|
118
118
|
i18n: (e, l) => ne(`ap.${e}`, l)
|
|
119
119
|
});
|
|
120
120
|
const { renderConfig: se, updateSignal: ie } = Ue(i);
|
|
121
121
|
let O = 0;
|
|
122
122
|
const de = n(() => {
|
|
123
|
-
if (
|
|
124
|
-
return
|
|
123
|
+
if (m.value)
|
|
124
|
+
return m.value.$el.querySelector(
|
|
125
125
|
".vxe-table--header-inner-wrapper"
|
|
126
126
|
);
|
|
127
127
|
}), K = n(() => {
|
|
@@ -129,13 +129,13 @@ const ko = /* @__PURE__ */ Fe({
|
|
|
129
129
|
return O++, ((t = (l = (e = a.columns) == null ? void 0 : e.filter(
|
|
130
130
|
(r) => !r.hideInSearch && r.dataIndex && (r.valueType || r.customRenderFormItem) && !ze.includes(r.valueType)
|
|
131
131
|
)) == null ? void 0 : l.sort((r, u) => {
|
|
132
|
-
let
|
|
133
|
-
return Z(u.order) -
|
|
132
|
+
let y = Z(r.order);
|
|
133
|
+
return Z(u.order) - y;
|
|
134
134
|
})) == null ? void 0 : t.map((r) => {
|
|
135
135
|
const u = Ae(
|
|
136
136
|
r,
|
|
137
137
|
_e(r.fieldProps, {})
|
|
138
|
-
),
|
|
138
|
+
), y = {
|
|
139
139
|
...r,
|
|
140
140
|
fieldProps: {
|
|
141
141
|
label: r.title,
|
|
@@ -145,12 +145,12 @@ const ko = /* @__PURE__ */ Fe({
|
|
|
145
145
|
},
|
|
146
146
|
renderNode: void 0
|
|
147
147
|
};
|
|
148
|
-
return
|
|
149
|
-
|
|
148
|
+
return y.renderNode = Ve(
|
|
149
|
+
y,
|
|
150
150
|
o(le)
|
|
151
|
-
),
|
|
151
|
+
), y;
|
|
152
152
|
})) || [];
|
|
153
|
-
}),
|
|
153
|
+
}), ce = n(() => [
|
|
154
154
|
d(),
|
|
155
155
|
a.card ? null : d("wrapper"),
|
|
156
156
|
a.adaptive ? d("adaptive") : null,
|
|
@@ -162,18 +162,18 @@ const ko = /* @__PURE__ */ Fe({
|
|
|
162
162
|
if (e.filters && !e.onFilter)
|
|
163
163
|
return e.key || e.dataIndex;
|
|
164
164
|
}).filter(Boolean)), {
|
|
165
|
-
formRef:
|
|
165
|
+
formRef: E,
|
|
166
166
|
submit: j,
|
|
167
167
|
reset: W,
|
|
168
|
-
refresh:
|
|
169
|
-
data:
|
|
168
|
+
refresh: ue,
|
|
169
|
+
data: C,
|
|
170
170
|
tableProps: M,
|
|
171
171
|
setDataSource: pe,
|
|
172
172
|
handleTableChange: me
|
|
173
173
|
} = Le({
|
|
174
174
|
async request(e) {
|
|
175
175
|
var t;
|
|
176
|
-
if (!R.value.preserveSelectedRowKeys &&
|
|
176
|
+
if (!R.value.preserveSelectedRowKeys && w(a.dataSource) && T(), !w(a.dataSource)) {
|
|
177
177
|
const r = e.pageSize * (e.current - 1);
|
|
178
178
|
return {
|
|
179
179
|
data: (a.pagination === !1 ? a.dataSource : a.dataSource.slice(r, r + e.pageSize)) || [],
|
|
@@ -194,42 +194,42 @@ const ko = /* @__PURE__ */ Fe({
|
|
|
194
194
|
manual: a.manual,
|
|
195
195
|
formatParams: a.beforeSearchSubmit,
|
|
196
196
|
pagination: a.pagination
|
|
197
|
-
}), { sortChangeEvent: fe, filterChangeEvent: ge, paginationChangeEvent:
|
|
197
|
+
}), { sortChangeEvent: fe, filterChangeEvent: ge, paginationChangeEvent: ve } = Oe(me);
|
|
198
198
|
We({
|
|
199
199
|
columns: n(() => i.value),
|
|
200
200
|
columnsBackup: n(() => D.value),
|
|
201
|
-
size: n(() =>
|
|
201
|
+
size: n(() => h.value ? qe[h.value] : "middle"),
|
|
202
202
|
updateColumns(e) {
|
|
203
203
|
i.value = e;
|
|
204
204
|
},
|
|
205
205
|
updateSize(e) {
|
|
206
|
-
|
|
206
|
+
h.value = Me[e];
|
|
207
207
|
},
|
|
208
208
|
renderConfig: n(() => ({
|
|
209
209
|
className: te("table-header", "title"),
|
|
210
|
-
color:
|
|
210
|
+
color: c.value.colorPrimary
|
|
211
211
|
}))
|
|
212
212
|
});
|
|
213
|
-
const
|
|
213
|
+
const he = n(
|
|
214
214
|
() => i.value.some(
|
|
215
215
|
(e) => e.fixed === "left" || e.fixed === !0
|
|
216
216
|
) ? "left" : void 0
|
|
217
217
|
), Ce = n(
|
|
218
|
-
() =>
|
|
218
|
+
() => w(a.loading) ? C.loading : a.loading
|
|
219
219
|
), ye = n(
|
|
220
|
-
() =>
|
|
220
|
+
() => w(a.dataSource) ? C.records : a.dataSource
|
|
221
221
|
), { selectedRows: x, rowSelection: R, ...be } = je({
|
|
222
222
|
...a.rowSelection === !0 ? {} : a.rowSelection,
|
|
223
223
|
dataSource: ye,
|
|
224
224
|
rowKey: a.rowKey
|
|
225
|
-
}),
|
|
226
|
-
const e =
|
|
225
|
+
}), N = () => {
|
|
226
|
+
const e = m.value;
|
|
227
227
|
e && (x.value = [
|
|
228
228
|
...e.getCheckboxReserveRecords(),
|
|
229
229
|
...e.getCheckboxRecords()
|
|
230
230
|
]);
|
|
231
231
|
}, we = () => {
|
|
232
|
-
const e =
|
|
232
|
+
const e = m.value;
|
|
233
233
|
e && (x.value = [e.getRadioRecord()]);
|
|
234
234
|
};
|
|
235
235
|
function Se() {
|
|
@@ -238,25 +238,25 @@ const ko = /* @__PURE__ */ Fe({
|
|
|
238
238
|
}
|
|
239
239
|
function xe(e) {
|
|
240
240
|
var l, t, r;
|
|
241
|
-
(r = (t = (l =
|
|
241
|
+
(r = (t = (l = E.value) == null ? void 0 : l.apForm) == null ? void 0 : t.setFieldsValue) == null || r.call(t, e);
|
|
242
242
|
}
|
|
243
243
|
function Re(e = !1) {
|
|
244
244
|
var t, r, u;
|
|
245
245
|
const l = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
246
|
-
return (u = (r = (t =
|
|
246
|
+
return (u = (r = (t = E.value) == null ? void 0 : t.apForm) == null ? void 0 : r[l]) == null ? void 0 : u.call(r, !0);
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function T() {
|
|
249
249
|
be.clearAll();
|
|
250
|
-
const e =
|
|
250
|
+
const e = m.value;
|
|
251
251
|
e && (R.value.type === "radio" ? (e.clearRadioRow(), e.clearRadioReserve()) : (e.clearCheckboxRow(), e.clearCheckboxReserve()));
|
|
252
252
|
}
|
|
253
253
|
async function ke(e, l) {
|
|
254
254
|
var r;
|
|
255
|
-
const t =
|
|
255
|
+
const t = C.records[e];
|
|
256
256
|
if (t)
|
|
257
|
-
return (r =
|
|
257
|
+
return (r = m.value) == null ? void 0 : r.scrollToRow(t, l);
|
|
258
258
|
}
|
|
259
|
-
return
|
|
259
|
+
return F(
|
|
260
260
|
() => [a.columnResizable, a.columns],
|
|
261
261
|
() => {
|
|
262
262
|
const e = Se();
|
|
@@ -266,49 +266,54 @@ const ko = /* @__PURE__ */ Fe({
|
|
|
266
266
|
deep: !0,
|
|
267
267
|
immediate: !0
|
|
268
268
|
}
|
|
269
|
-
),
|
|
269
|
+
), F(
|
|
270
270
|
() => a.dataSource,
|
|
271
271
|
(e) => {
|
|
272
272
|
pe(e);
|
|
273
273
|
},
|
|
274
274
|
{ immediate: !0, deep: !0 }
|
|
275
|
-
),
|
|
276
|
-
() => o(
|
|
275
|
+
), F(
|
|
276
|
+
() => o(C).loading,
|
|
277
277
|
(e) => {
|
|
278
278
|
var l;
|
|
279
279
|
(l = a.onLoadingChange) == null || l.call(a, e);
|
|
280
280
|
}
|
|
281
|
+
), F(
|
|
282
|
+
() => a.size,
|
|
283
|
+
(e) => {
|
|
284
|
+
h.value = e;
|
|
285
|
+
}
|
|
281
286
|
), re({
|
|
282
287
|
submit: j,
|
|
283
288
|
reset: W,
|
|
284
|
-
refresh:
|
|
289
|
+
refresh: ue,
|
|
285
290
|
setSearchFormValues: xe,
|
|
286
291
|
getSearchFormValues: Re,
|
|
287
292
|
getShowColumns: () => o(i),
|
|
288
293
|
rowSelection: {
|
|
289
294
|
selectedRows: n(() => x.value),
|
|
290
|
-
clearAll:
|
|
295
|
+
clearAll: T
|
|
291
296
|
},
|
|
292
297
|
scrollToRow: ke
|
|
293
|
-
}), (e, l) => (s(),
|
|
294
|
-
class: f(
|
|
298
|
+
}), (e, l) => (s(), B("div", {
|
|
299
|
+
class: f(ce.value),
|
|
295
300
|
style: z(e.wrapperStyle)
|
|
296
301
|
}, [
|
|
297
|
-
o(
|
|
302
|
+
o(w)(e.dataSource) && e.searchForm !== !1 && K.value.length > 0 ? (s(), B("div", {
|
|
298
303
|
key: 0,
|
|
299
|
-
class: f(e.card ? o(
|
|
304
|
+
class: f(e.card ? o(P)("search-wrapper") : null),
|
|
300
305
|
style: z(e.searchFormWrapperStyle)
|
|
301
306
|
}, [
|
|
302
307
|
U(o(Te).SearchForm, g(e.searchForm || {}, {
|
|
303
308
|
ref_key: "formRef",
|
|
304
|
-
ref:
|
|
309
|
+
ref: E,
|
|
305
310
|
"custom-reset": "",
|
|
306
311
|
"submit-loading": o(M).loading,
|
|
307
312
|
onSubmit: o(j),
|
|
308
313
|
onReset: o(W)
|
|
309
314
|
}), G({
|
|
310
|
-
default:
|
|
311
|
-
(s(!0),
|
|
315
|
+
default: v(() => [
|
|
316
|
+
(s(!0), B(X, null, A(K.value, (t) => (s(), p(_(t.renderNode.Comp), g({
|
|
312
317
|
key: t.dataIndex,
|
|
313
318
|
item: t,
|
|
314
319
|
ref_for: !0
|
|
@@ -321,35 +326,35 @@ const ko = /* @__PURE__ */ Fe({
|
|
|
321
326
|
}, [
|
|
322
327
|
L.searchFormExtra ? {
|
|
323
328
|
name: "extra",
|
|
324
|
-
fn:
|
|
329
|
+
fn: v(() => [
|
|
325
330
|
V(e.$slots, "searchFormExtra")
|
|
326
331
|
]),
|
|
327
332
|
key: "0"
|
|
328
333
|
} : void 0
|
|
329
334
|
]), 1040, ["submit-loading", "onSubmit", "onReset"])
|
|
330
|
-
], 6)) :
|
|
331
|
-
|
|
332
|
-
class: f([o(
|
|
335
|
+
], 6)) : b("", !0),
|
|
336
|
+
I("div", {
|
|
337
|
+
class: f([o(P)("table-wrapper"), e.card ? o(P)("table-wrapper-card") : null]),
|
|
333
338
|
style: z(e.tableWrapperStyle)
|
|
334
339
|
}, [
|
|
335
|
-
|
|
340
|
+
I("div", {
|
|
336
341
|
class: f(o(d)("header-wrapper"))
|
|
337
342
|
}, [
|
|
338
343
|
V(e.$slots, "title", {
|
|
339
344
|
selectedRows: o(x),
|
|
340
345
|
selectedRowKeys: o(R).selectedRowKeys,
|
|
341
346
|
shownColumns: i.value,
|
|
342
|
-
clearAll:
|
|
347
|
+
clearAll: T
|
|
343
348
|
})
|
|
344
349
|
], 2),
|
|
345
|
-
|
|
350
|
+
I("div", {
|
|
346
351
|
class: f(o(d)("vxe-wrapper"))
|
|
347
352
|
}, [
|
|
348
|
-
(s(),
|
|
353
|
+
(s(), p(o(Ee), g(o(Ke)(a), {
|
|
349
354
|
ref_key: "tableRef",
|
|
350
|
-
ref:
|
|
355
|
+
ref: m,
|
|
351
356
|
key: o(ie),
|
|
352
|
-
data: o(
|
|
357
|
+
data: o(C).records,
|
|
353
358
|
"sort-config": { remote: $.value.length > 0 },
|
|
354
359
|
"filter-config": { remote: H.value.length > 0 },
|
|
355
360
|
loading: Ce.value,
|
|
@@ -358,37 +363,39 @@ const ko = /* @__PURE__ */ Fe({
|
|
|
358
363
|
keyField: a.rowKey
|
|
359
364
|
},
|
|
360
365
|
style: {
|
|
361
|
-
"--vxe-ui-table-row-checkbox-checked-background-color": o(
|
|
362
|
-
"--vxe-ui-table-row-hover-checkbox-checked-background-color": o(
|
|
363
|
-
"--vxe-ui-font-primary-color": o(
|
|
366
|
+
"--vxe-ui-table-row-checkbox-checked-background-color": o(c).controlItemBgActive,
|
|
367
|
+
"--vxe-ui-table-row-hover-checkbox-checked-background-color": o(c).controlItemBgActiveHover,
|
|
368
|
+
"--vxe-ui-font-primary-color": o(c).colorPrimary,
|
|
364
369
|
"--vxe-ui-table-header-background-color": "var(--ap-table-header-bg)",
|
|
365
370
|
"--vxe-ui-table-cell-padding-default": "12px",
|
|
366
371
|
"--vxe-ui-table-cell-padding-medium": "9px",
|
|
367
|
-
"--vxe-ui-table-row-radio-checked-background-color": o(
|
|
368
|
-
"--vxe-ui-table-row-hover-radio-checked-background-color": o(
|
|
372
|
+
"--vxe-ui-table-row-radio-checked-background-color": o(c).controlItemBgActive,
|
|
373
|
+
"--vxe-ui-table-row-hover-radio-checked-background-color": o(c).controlItemBgActiveHover,
|
|
374
|
+
"--vxe-ui-font-color": o(c).colorTextBase,
|
|
375
|
+
"--vxe-ui-table-border-color": o(c).colorBorderSecondary
|
|
369
376
|
},
|
|
370
|
-
size:
|
|
377
|
+
size: h.value,
|
|
371
378
|
onSortChange: o(fe),
|
|
372
379
|
onFilterChange: o(ge),
|
|
373
|
-
onCheckboxChange:
|
|
374
|
-
onCheckboxRangeChange:
|
|
375
|
-
onCheckboxAll:
|
|
380
|
+
onCheckboxChange: N,
|
|
381
|
+
onCheckboxRangeChange: N,
|
|
382
|
+
onCheckboxAll: N,
|
|
376
383
|
onRadioChange: we
|
|
377
384
|
}), G({
|
|
378
|
-
empty:
|
|
385
|
+
empty: v(() => [
|
|
379
386
|
U(o(oe), {
|
|
380
387
|
image: o(oe).PRESENTED_IMAGE_SIMPLE
|
|
381
388
|
}, null, 8, ["image"])
|
|
382
389
|
]),
|
|
383
|
-
default:
|
|
384
|
-
a.expandable ? (s(),
|
|
385
|
-
content:
|
|
386
|
-
(s(),
|
|
390
|
+
default: v(() => [
|
|
391
|
+
a.expandable ? (s(), p(o(Q), g({ key: 0 }, o($e)(e.expandable), { fixed: he.value }), {
|
|
392
|
+
content: v((t) => [
|
|
393
|
+
(s(), p(_(a.expandable.renderContent(t))))
|
|
387
394
|
]),
|
|
388
395
|
_: 1
|
|
389
|
-
}, 16, ["fixed"])) :
|
|
390
|
-
a.rowSelection ? (s(),
|
|
391
|
-
(s(!0),
|
|
396
|
+
}, 16, ["fixed"])) : b("", !0),
|
|
397
|
+
a.rowSelection ? (s(), p(o(Q), J(g({ key: 1 }, o(He)(o(R), i.value))), null, 16)) : b("", !0),
|
|
398
|
+
(s(!0), B(X, null, A(o(se), (t) => (s(), p(_(t), {
|
|
392
399
|
key: t.props.colId
|
|
393
400
|
}))), 128))
|
|
394
401
|
]),
|
|
@@ -396,24 +403,24 @@ const ko = /* @__PURE__ */ Fe({
|
|
|
396
403
|
}, [
|
|
397
404
|
A(o(Ne)(L, ["searchFormExtra"]), (t, r) => ({
|
|
398
405
|
name: r,
|
|
399
|
-
fn:
|
|
406
|
+
fn: v((u) => [
|
|
400
407
|
V(e.$slots, r, J(Pe(u || {})))
|
|
401
408
|
])
|
|
402
409
|
}))
|
|
403
410
|
]), 1040, ["data", "sort-config", "filter-config", "loading", "row-config", "style", "size", "onSortChange", "onFilterChange"]))
|
|
404
411
|
], 2),
|
|
405
|
-
|
|
412
|
+
I("div", {
|
|
406
413
|
class: f(o(d)("pagination-wrapper"))
|
|
407
414
|
}, [
|
|
408
|
-
e.sticky ? (s(),
|
|
415
|
+
e.sticky ? (s(), p(o(Ye), {
|
|
409
416
|
key: 0,
|
|
410
417
|
direction: "horizontal",
|
|
411
418
|
"scroll-container": de.value
|
|
412
|
-
}, null, 8, ["scroll-container"])) :
|
|
413
|
-
e.pagination !== !1 ? (s(),
|
|
419
|
+
}, null, 8, ["scroll-container"])) : b("", !0),
|
|
420
|
+
e.pagination !== !1 ? (s(), p(o(De), g({
|
|
414
421
|
key: 1,
|
|
415
422
|
class: o(d)("pagination")
|
|
416
|
-
}, o(M).pagination, { onChange: o(
|
|
423
|
+
}, o(M).pagination, { onChange: o(ve) }), null, 16, ["class", "onChange"])) : b("", !0)
|
|
417
424
|
], 2)
|
|
418
425
|
], 6)
|
|
419
426
|
], 6));
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { createVNode as v, Fragment as S } from "vue";
|
|
2
|
-
import { isUndefined as $, isArray as M, isString as x, isBoolean as
|
|
3
|
-
import { valueEnumToArray as j, objectToString as B, getTableTitle as
|
|
2
|
+
import { isUndefined as $, isArray as M, isString as x, isBoolean as A, isNumber as V, pick as R } from "lodash-unified";
|
|
3
|
+
import { valueEnumToArray as j, objectToString as B, getTableTitle as c, getTableRenderType as N, getTableRenderProps as W, getTableCellRenderNode as _ } from "../../ap-table/utils.mjs";
|
|
4
4
|
import { noRenderAsFormItemValueList as k } from "../../ap-table/constants.mjs";
|
|
5
5
|
import "../../ap-table/components/paragraph-ellipsis/index.vue.mjs";
|
|
6
6
|
import z from "../../ap-table/components/paragraph-ellipsis/index.vue2.mjs";
|
|
7
7
|
function b(e) {
|
|
8
8
|
if (!$(e))
|
|
9
|
-
return M(e) ? e.reduce((r,
|
|
9
|
+
return M(e) ? e.reduce((r, i) => x(i) ? `${r}.${i}` : `${r}[${i}]`, "") : String(e);
|
|
10
10
|
}
|
|
11
11
|
function w(e) {
|
|
12
12
|
if (e)
|
|
13
13
|
return e === !0 ? "left" : e;
|
|
14
14
|
}
|
|
15
15
|
function G(e) {
|
|
16
|
-
return
|
|
16
|
+
return A(e) ? {
|
|
17
17
|
sortable: e
|
|
18
18
|
} : e ? {
|
|
19
19
|
sortable: !0,
|
|
@@ -25,9 +25,9 @@ function G(e) {
|
|
|
25
25
|
}
|
|
26
26
|
function I(e) {
|
|
27
27
|
let r;
|
|
28
|
-
return
|
|
29
|
-
label: x(
|
|
30
|
-
value:
|
|
28
|
+
return A(e.filters) && e.valueEnum ? r = j(e.valueEnum) : r = e.filters, r == null ? void 0 : r.map((i) => ({
|
|
29
|
+
label: x(i.text) ? i.text : "",
|
|
30
|
+
value: i.value
|
|
31
31
|
}));
|
|
32
32
|
}
|
|
33
33
|
function L(e) {
|
|
@@ -47,88 +47,88 @@ function U(e, r) {
|
|
|
47
47
|
htmlTitle: e === "title" ? r : ""
|
|
48
48
|
} : !1;
|
|
49
49
|
}
|
|
50
|
-
function q(e, r,
|
|
50
|
+
function q(e, r, i) {
|
|
51
51
|
if (k.includes(e.valueType))
|
|
52
|
-
return
|
|
52
|
+
return i;
|
|
53
53
|
if (e.copyable || e.ellipsis) {
|
|
54
|
-
const
|
|
54
|
+
const l = U(e.ellipsis, r), t = B(r);
|
|
55
55
|
return v(z, {
|
|
56
|
-
rawValue:
|
|
56
|
+
rawValue: t,
|
|
57
57
|
copyable: e.copyable,
|
|
58
|
-
ellipsis:
|
|
59
|
-
content:
|
|
58
|
+
ellipsis: l,
|
|
59
|
+
content: i
|
|
60
60
|
}, null);
|
|
61
61
|
}
|
|
62
|
-
return
|
|
62
|
+
return i;
|
|
63
63
|
}
|
|
64
|
-
function y(e, r,
|
|
65
|
-
const
|
|
66
|
-
return
|
|
67
|
-
header: () =>
|
|
68
|
-
},
|
|
64
|
+
function y(e, r, i) {
|
|
65
|
+
const l = R(e, ["width", "minWidth", "align"]);
|
|
66
|
+
return l.field = b(e.dataIndex), l.fixed = w(e.fixed), l.slots = {
|
|
67
|
+
header: () => c(e, i, void 0, r)
|
|
68
|
+
}, l.headerAlign = e.align, l.showOverflow = !1, l.showFooterOverflow = !1, l;
|
|
69
69
|
}
|
|
70
|
-
function F(e, r,
|
|
71
|
-
const
|
|
72
|
-
|
|
70
|
+
function F(e, r, i, l) {
|
|
71
|
+
const t = R(e, ["width", "minWidth", "align", "resizable"]);
|
|
72
|
+
t.field = b(e.dataIndex), t.fixed = w(e.fixed), t.headerAlign = e.align, t.footerAlign = e.align, t.showOverflow = !1, t.showFooterOverflow = !1, Object.assign(t, G(e.sorter)), t.filters = I(e), t.filterMultiple = e.filterMultiple, t.filterMethod = L(e.onFilter);
|
|
73
73
|
const a = ({
|
|
74
74
|
value: d,
|
|
75
|
-
...
|
|
75
|
+
...n
|
|
76
76
|
}) => {
|
|
77
|
-
var
|
|
77
|
+
var o, T;
|
|
78
78
|
const f = N(e), u = W({
|
|
79
79
|
...e,
|
|
80
80
|
valueType: f
|
|
81
81
|
}, {
|
|
82
82
|
value: d,
|
|
83
|
-
...
|
|
84
|
-
}), E = _(f, u,
|
|
83
|
+
...n
|
|
84
|
+
}), E = _(f, u, n.record, l), h = ((o = e.renderText) == null ? void 0 : o.call(e, {
|
|
85
85
|
value: d,
|
|
86
|
-
...
|
|
87
|
-
})) || d, O = e.renderText ? v(S, null, [(
|
|
86
|
+
...n
|
|
87
|
+
})) || d, O = e.renderText ? v(S, null, [(T = e.renderText) == null ? void 0 : T.call(e, {
|
|
88
88
|
value: d,
|
|
89
|
-
...
|
|
89
|
+
...n
|
|
90
90
|
})]) : E;
|
|
91
91
|
let p = q(e, h, O);
|
|
92
92
|
return e.customRender && (p = e.customRender({
|
|
93
93
|
value: d,
|
|
94
|
-
...
|
|
94
|
+
...n,
|
|
95
95
|
column: e,
|
|
96
96
|
originalNode: p,
|
|
97
97
|
originalText: h
|
|
98
98
|
})), p;
|
|
99
99
|
}, s = ({
|
|
100
100
|
row: d,
|
|
101
|
-
rowIndex:
|
|
101
|
+
rowIndex: n
|
|
102
102
|
}) => a({
|
|
103
|
-
value: d[
|
|
104
|
-
text: d[
|
|
103
|
+
value: d[t.field],
|
|
104
|
+
text: d[t.field],
|
|
105
105
|
record: d,
|
|
106
|
-
index:
|
|
107
|
-
renderIndex:
|
|
106
|
+
index: n,
|
|
107
|
+
renderIndex: n,
|
|
108
108
|
column: e
|
|
109
109
|
});
|
|
110
|
-
return
|
|
111
|
-
header: () =>
|
|
110
|
+
return t.slots = {
|
|
111
|
+
header: () => c(e, i, void 0, r),
|
|
112
112
|
default: s,
|
|
113
113
|
footer: s
|
|
114
|
-
},
|
|
114
|
+
}, e.html && (delete t.slots.default, delete t.slots.footer, t.type = "html"), t;
|
|
115
115
|
}
|
|
116
|
-
function Y(e, r,
|
|
116
|
+
function Y(e, r, i, l) {
|
|
117
117
|
var s;
|
|
118
118
|
if (!((s = e.children) != null && s.length))
|
|
119
|
-
return F(e, r,
|
|
120
|
-
function
|
|
121
|
-
return d.map((
|
|
119
|
+
return F(e, r, i, l);
|
|
120
|
+
function t(d) {
|
|
121
|
+
return d.map((n) => {
|
|
122
122
|
var f;
|
|
123
|
-
if ((f =
|
|
124
|
-
const u = y(
|
|
125
|
-
return u.children =
|
|
123
|
+
if ((f = n.children) != null && f.length) {
|
|
124
|
+
const u = y(n, r, i);
|
|
125
|
+
return u.children = t(n.children), u;
|
|
126
126
|
}
|
|
127
|
-
return F(
|
|
127
|
+
return F(n, r, i, l);
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
-
const a = y(e, r,
|
|
131
|
-
return a.children =
|
|
130
|
+
const a = y(e, r, i);
|
|
131
|
+
return a.children = t(e.children), a;
|
|
132
132
|
}
|
|
133
133
|
export {
|
|
134
134
|
Y as transformCol,
|
|
@@ -39,7 +39,7 @@ function m(e) {
|
|
|
39
39
|
range: o.range || !1
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
return t.border = e.bordered, e.expandable && (t.expandConfig = l(e.expandable, [
|
|
42
|
+
return t.border = e.bordered === !1 ? "inner" : !0, e.expandable && (t.expandConfig = l(e.expandable, [
|
|
43
43
|
"renderContent",
|
|
44
44
|
"width",
|
|
45
45
|
"title"
|
|
@@ -47,7 +47,7 @@ function m(e) {
|
|
|
47
47
|
enabled: !1
|
|
48
48
|
}, t.virtualYConfig = {
|
|
49
49
|
enabled: !1
|
|
50
|
-
}) : (a(t, "X", e.virtual), a(t, "Y", e.virtual)), t;
|
|
50
|
+
}) : (a(t, "X", e.virtual), a(t, "Y", e.virtual)), t.round = !0, t;
|
|
51
51
|
}
|
|
52
52
|
function a(e, t, i) {
|
|
53
53
|
const o = t === "X", r = o ? "x" : "y", n = o ? "virtualXConfig" : "virtualYConfig", s = i == null ? void 0 : i[r], f = s !== !1, d = o ? w : x, c = b(s) && s >= 0 ? s : d;
|