@aplus-frontend/ui 6.26.0 → 6.26.1
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/src/ag-grid/components/empty/index.vue.d.ts +3 -0
- package/es/src/ag-grid/components/empty/index.vue.mjs +4 -0
- package/es/src/ag-grid/components/empty/index.vue2.mjs +15 -0
- package/es/src/ag-grid/index.vue.mjs +53 -53
- package/es/src/ap-grid/index.vue.mjs +196 -180
- package/es/src/ap-grid/interface.d.ts +8 -1
- package/es/src/ap-pro-card/components/card/index.vue2.mjs +70 -75
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/components/empty/index.vue.d.ts +3 -0
- package/lib/src/ag-grid/components/empty/index.vue.js +1 -0
- package/lib/src/ag-grid/components/empty/index.vue2.js +1 -0
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +8 -1
- package/lib/src/ap-pro-card/components/card/index.vue2.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
- package/theme/ag-grid/index.css +1 -1
- package/theme/ag-grid/index.less +1 -1
- package/theme/ap-grid/index.css +1 -0
- package/theme/ap-grid/index.less +1 -0
- package/theme/ap-pro-card/index.css +22 -6
- package/theme/ap-pro-card/index.less +22 -7
- package/theme/css-var.css +32 -0
- package/theme/css-var.less +34 -0
- package/theme/index.css +56 -7
- package/es/src/ap-pro-card/utils/css-var.d.ts +0 -17
- package/es/src/ap-pro-card/utils/css-var.mjs +0 -29
- package/lib/src/ap-pro-card/utils/css-var.d.ts +0 -17
- package/lib/src/ap-pro-card/utils/css-var.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as He, useSlots as Ue, getCurrentInstance as Ge, ref as I, computed as l, unref as
|
|
1
|
+
import { defineComponent as He, useSlots as Ue, getCurrentInstance as Ge, ref as I, computed as l, unref as r, toRef as Xe, nextTick as re, watch as B, createElementBlock as P, openBlock as i, normalizeStyle as V, normalizeClass as C, createCommentVNode as S, createElementVNode as R, createVNode as _, mergeProps as b, createSlots as L, withCtx as p, Fragment as ne, renderList as $, createBlock as c, resolveDynamicComponent as T, renderSlot as D, normalizeProps as Je, guardReactiveProps as Qe } from "vue";
|
|
2
2
|
import { VxeUI as le, VxeTable as Ye, VxeColumn as se } from "vxe-table";
|
|
3
3
|
import "vxe-table/es/style.css";
|
|
4
|
-
import { isUndefined as x, isFunction as
|
|
4
|
+
import { isUndefined as x, isFunction as O, isArray as Ze, omit as et } from "lodash-unified";
|
|
5
5
|
import { ApForm as tt } from "../ap-form/index.mjs";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
7
|
import { noRenderAsFormItemValueList as ot } from "../ap-table/constants.mjs";
|
|
@@ -116,84 +116,84 @@ const Yt = /* @__PURE__ */ He({
|
|
|
116
116
|
onReady: {}
|
|
117
117
|
},
|
|
118
118
|
setup(ce, { expose: fe }) {
|
|
119
|
-
var
|
|
120
|
-
const v = Ue(), o = ce, k = (
|
|
119
|
+
var oe;
|
|
120
|
+
const v = Ue(), o = ce, k = (oe = Ge()) == null ? void 0 : oe.appContext.app;
|
|
121
121
|
k && !k.__VXE_PC_UI_INSTALLED__ && (k.use(le), k.__VXE_PC_UI_INSTALLED__ = !0);
|
|
122
|
-
const { e: F, b:
|
|
122
|
+
const { e: F, b: f, be: pe } = bt("ap-grid"), me = xt("valueTypeMap"), d = I([]), W = I([]), s = I(), E = I(o.size), ge = Rt(), [, he] = vt(), { t: Ce } = kt();
|
|
123
123
|
le.setConfig({
|
|
124
124
|
i18n: (e, t) => Ce(`ap.${e}`, t)
|
|
125
125
|
});
|
|
126
|
-
const { renderConfig: ye, updateSignal: ve } = yt(
|
|
127
|
-
let
|
|
126
|
+
const { renderConfig: ye, updateSignal: ve } = yt(d);
|
|
127
|
+
let M = 0;
|
|
128
128
|
const we = l(() => {
|
|
129
129
|
if (s.value)
|
|
130
130
|
return s.value.$el.querySelector(
|
|
131
131
|
".vxe-table--header-inner-wrapper"
|
|
132
132
|
);
|
|
133
|
-
}),
|
|
133
|
+
}), j = l(() => {
|
|
134
134
|
var e, t, n;
|
|
135
|
-
return
|
|
136
|
-
(
|
|
137
|
-
)) == null ? void 0 : t.sort((
|
|
138
|
-
let
|
|
139
|
-
return ie(u.order) -
|
|
140
|
-
})) == null ? void 0 : n.map((
|
|
135
|
+
return M++, ((n = (t = (e = o.columns) == null ? void 0 : e.filter(
|
|
136
|
+
(a) => !a.hideInSearch && a.dataIndex && (a.valueType || a.customRenderFormItem) && !ot.includes(a.valueType)
|
|
137
|
+
)) == null ? void 0 : t.sort((a, u) => {
|
|
138
|
+
let h = ie(a.order);
|
|
139
|
+
return ie(u.order) - h;
|
|
140
|
+
})) == null ? void 0 : n.map((a) => {
|
|
141
141
|
const u = at(
|
|
142
|
-
|
|
143
|
-
rt(
|
|
144
|
-
),
|
|
145
|
-
...
|
|
142
|
+
a,
|
|
143
|
+
rt(a.fieldProps, {})
|
|
144
|
+
), h = {
|
|
145
|
+
...a,
|
|
146
146
|
fieldProps: {
|
|
147
|
-
label:
|
|
148
|
-
name:
|
|
147
|
+
label: a.title,
|
|
148
|
+
name: a.dataIndex,
|
|
149
149
|
// tips: 在表格中的查询表单项默认是带边框的
|
|
150
150
|
bordered: !0,
|
|
151
151
|
...u || {},
|
|
152
|
-
_signal:
|
|
152
|
+
_signal: M
|
|
153
153
|
},
|
|
154
154
|
renderNode: void 0
|
|
155
155
|
};
|
|
156
|
-
return
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
),
|
|
156
|
+
return h.renderNode = nt(
|
|
157
|
+
h,
|
|
158
|
+
r(me)
|
|
159
|
+
), h;
|
|
160
160
|
})) || [];
|
|
161
161
|
}), Se = l(() => {
|
|
162
162
|
var t;
|
|
163
163
|
return wt(o.manual) ? o.manual : St(((t = v.searchFormExtra) == null ? void 0 : t.call(v)) || []).some((n) => {
|
|
164
|
-
var
|
|
165
|
-
return ((
|
|
164
|
+
var a;
|
|
165
|
+
return ((a = n.type) == null ? void 0 : a.name) === "ApView";
|
|
166
166
|
});
|
|
167
167
|
}), Re = l(() => [
|
|
168
|
-
|
|
169
|
-
o.card ? null :
|
|
170
|
-
o.adaptive ?
|
|
171
|
-
o.sticky ?
|
|
172
|
-
].filter(Boolean)),
|
|
168
|
+
f(),
|
|
169
|
+
o.card ? null : f("wrapper"),
|
|
170
|
+
o.adaptive ? f("adaptive") : null,
|
|
171
|
+
o.sticky ? f("sticky") : null
|
|
172
|
+
].filter(Boolean)), q = l(() => de(r(d), (e) => {
|
|
173
173
|
if (e.sorter === !0)
|
|
174
174
|
return e.key || e.dataIndex;
|
|
175
|
-
}).filter(Boolean)),
|
|
175
|
+
}).filter(Boolean)), H = l(() => de(r(d), (e) => {
|
|
176
176
|
if (e.filters && !e.onFilter)
|
|
177
177
|
return e.key || e.dataIndex;
|
|
178
178
|
}).filter(Boolean)), {
|
|
179
179
|
formRef: y,
|
|
180
|
-
submit:
|
|
181
|
-
reset:
|
|
182
|
-
refresh:
|
|
183
|
-
data:
|
|
184
|
-
tableProps:
|
|
180
|
+
submit: N,
|
|
181
|
+
reset: z,
|
|
182
|
+
refresh: U,
|
|
183
|
+
data: m,
|
|
184
|
+
tableProps: G,
|
|
185
185
|
setDataSource: be,
|
|
186
186
|
handleTableChangeOptional: xe,
|
|
187
187
|
getPaging: ke,
|
|
188
188
|
setPaging: Fe,
|
|
189
|
-
submitWith:
|
|
189
|
+
submitWith: X
|
|
190
190
|
} = lt({
|
|
191
191
|
async request(e) {
|
|
192
192
|
var n;
|
|
193
|
-
if (!
|
|
194
|
-
const
|
|
193
|
+
if (!g.value.preserveSelectedRowKeys && x(o.dataSource) && K(), !x(o.dataSource)) {
|
|
194
|
+
const a = e.pageSize * (e.current - 1);
|
|
195
195
|
return {
|
|
196
|
-
data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(
|
|
196
|
+
data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(a, a + e.pageSize)) || [],
|
|
197
197
|
total: o.dataSource.length || 0
|
|
198
198
|
};
|
|
199
199
|
}
|
|
@@ -204,23 +204,23 @@ const Yt = /* @__PURE__ */ He({
|
|
|
204
204
|
};
|
|
205
205
|
},
|
|
206
206
|
namespace: "ap-grid",
|
|
207
|
-
filterFields:
|
|
208
|
-
sortFields:
|
|
207
|
+
filterFields: H,
|
|
208
|
+
sortFields: q,
|
|
209
209
|
params: Xe(o, "params"),
|
|
210
210
|
defaultData: o.defaultData,
|
|
211
|
-
manual:
|
|
211
|
+
manual: r(Se),
|
|
212
212
|
formatParams: o.beforeSearchSubmit,
|
|
213
213
|
pagination: o.pagination,
|
|
214
214
|
onClickReset: Oe,
|
|
215
215
|
onAfterRequest: We
|
|
216
216
|
}), { sortChangeEvent: Ee, filterChangeEvent: Ie, paginationChangeEvent: Be } = dt(xe);
|
|
217
217
|
mt({
|
|
218
|
-
columns: l(() =>
|
|
219
|
-
columnsBackup: l(() =>
|
|
218
|
+
columns: l(() => d.value),
|
|
219
|
+
columnsBackup: l(() => W.value),
|
|
220
220
|
size: l(() => ht[E.value]),
|
|
221
221
|
updateColumns(e) {
|
|
222
222
|
var t;
|
|
223
|
-
|
|
223
|
+
d.value = e, (t = o.onShownColumnsChange) == null || t.call(o, e);
|
|
224
224
|
},
|
|
225
225
|
updateSize(e) {
|
|
226
226
|
E.value = gt[e];
|
|
@@ -229,26 +229,26 @@ const Yt = /* @__PURE__ */ He({
|
|
|
229
229
|
className: pe("table-header", "title"),
|
|
230
230
|
color: he.value.colorTextTertiary
|
|
231
231
|
})),
|
|
232
|
-
dataSource: l(() =>
|
|
233
|
-
getSearchFormValues:
|
|
234
|
-
setSearchFormValues:
|
|
235
|
-
submit:
|
|
236
|
-
submitWith:
|
|
237
|
-
reset:
|
|
238
|
-
refresh:
|
|
239
|
-
getSearchFormSorterItems:
|
|
240
|
-
setSearchFormSorterItems:
|
|
241
|
-
resetSearchFormSorterItems:
|
|
232
|
+
dataSource: l(() => r(m).records),
|
|
233
|
+
getSearchFormValues: Q,
|
|
234
|
+
setSearchFormValues: J,
|
|
235
|
+
submit: N,
|
|
236
|
+
submitWith: X,
|
|
237
|
+
reset: z,
|
|
238
|
+
refresh: U,
|
|
239
|
+
getSearchFormSorterItems: Y,
|
|
240
|
+
setSearchFormSorterItems: Z,
|
|
241
|
+
resetSearchFormSorterItems: ee
|
|
242
242
|
});
|
|
243
243
|
const Pe = l(
|
|
244
|
-
() =>
|
|
244
|
+
() => d.value.some(
|
|
245
245
|
(e) => e.fixed === "left" || e.fixed === !0
|
|
246
246
|
) ? "left" : void 0
|
|
247
247
|
), Te = l(
|
|
248
|
-
() => x(o.loading) ?
|
|
248
|
+
() => x(o.loading) ? m.loading : o.loading
|
|
249
249
|
), Ne = l(
|
|
250
|
-
() => x(o.dataSource) ?
|
|
251
|
-
), { selectedRows:
|
|
250
|
+
() => x(o.dataSource) ? m.records : o.dataSource
|
|
251
|
+
), { selectedRows: A, rowSelection: g, ...w } = pt({
|
|
252
252
|
...o.rowSelection === !0 ? {} : o.rowSelection,
|
|
253
253
|
dataSource: Ne,
|
|
254
254
|
rowKey: o.rowKey
|
|
@@ -269,101 +269,101 @@ const Yt = /* @__PURE__ */ He({
|
|
|
269
269
|
...t.getCheckboxReserveRecords(),
|
|
270
270
|
...t.getCheckboxRecords()
|
|
271
271
|
]);
|
|
272
|
-
},
|
|
272
|
+
}, Ke = () => {
|
|
273
273
|
const e = s.value;
|
|
274
274
|
e && w.selectRangeChange(e.getCheckboxRecords(), [
|
|
275
275
|
...e.getCheckboxReserveRecords(),
|
|
276
276
|
...e.getCheckboxRecords()
|
|
277
277
|
]);
|
|
278
|
-
},
|
|
278
|
+
}, Ve = () => {
|
|
279
279
|
const e = s.value;
|
|
280
|
-
e && (
|
|
281
|
-
},
|
|
280
|
+
e && (A.value = [e.getRadioRecord()]);
|
|
281
|
+
}, _e = ({
|
|
282
282
|
row: e
|
|
283
283
|
}) => {
|
|
284
284
|
const t = o.rowHighlightable;
|
|
285
|
-
|
|
285
|
+
O(t) && t(e);
|
|
286
286
|
};
|
|
287
287
|
function Le() {
|
|
288
288
|
var e;
|
|
289
289
|
return ((e = o.columns) == null ? void 0 : e.filter((t) => !t.hideInTable)) || [];
|
|
290
290
|
}
|
|
291
|
-
function
|
|
292
|
-
var t, n,
|
|
293
|
-
(
|
|
291
|
+
function J(e) {
|
|
292
|
+
var t, n, a;
|
|
293
|
+
(a = (n = (t = y.value) == null ? void 0 : t.apForm) == null ? void 0 : n.setFieldsValue) == null || a.call(n, e);
|
|
294
294
|
}
|
|
295
|
-
function
|
|
296
|
-
var n,
|
|
295
|
+
function Q(e = !1) {
|
|
296
|
+
var n, a, u;
|
|
297
297
|
const t = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
298
|
-
return (u = (
|
|
298
|
+
return (u = (a = (n = y.value) == null ? void 0 : n.apForm) == null ? void 0 : a[t]) == null ? void 0 : u.call(a, !0);
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function Y() {
|
|
301
301
|
var e;
|
|
302
302
|
return ((e = y.value) == null ? void 0 : e.getSorterItems()) || [];
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function Z(e) {
|
|
305
305
|
var t;
|
|
306
306
|
(t = y.value) == null || t.setSorterItems(e);
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function ee() {
|
|
309
309
|
var e;
|
|
310
310
|
(e = y.value) == null || e.resetSorterItems();
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function K() {
|
|
313
313
|
w.clearAll();
|
|
314
314
|
const e = s.value;
|
|
315
|
-
e && (
|
|
316
|
-
}
|
|
317
|
-
function De(e) {
|
|
318
|
-
$(o.rowKey) || (w.selectMultiByKeys(e), ee());
|
|
315
|
+
e && (g.value.type === "radio" ? (e.clearRadioRow(), e.clearRadioReserve()) : (e.clearCheckboxRow(), e.clearCheckboxReserve()));
|
|
319
316
|
}
|
|
320
317
|
function $e(e) {
|
|
318
|
+
O(o.rowKey) || (w.selectMultiByKeys(e), te());
|
|
319
|
+
}
|
|
320
|
+
function De(e) {
|
|
321
321
|
const t = s.value;
|
|
322
322
|
if (!t)
|
|
323
323
|
return;
|
|
324
|
-
const n = String(e[o.rowKey]),
|
|
325
|
-
t.setCurrentRow(
|
|
324
|
+
const n = String(e[o.rowKey]), a = t.getRowById(n);
|
|
325
|
+
t.setCurrentRow(a);
|
|
326
326
|
}
|
|
327
327
|
function Oe() {
|
|
328
328
|
const e = s.value;
|
|
329
329
|
e && (e.clearSort(), e.clearFilter());
|
|
330
330
|
}
|
|
331
|
-
function
|
|
332
|
-
|
|
331
|
+
function te() {
|
|
332
|
+
re(() => {
|
|
333
333
|
var e, t;
|
|
334
|
-
|
|
335
|
-
|
|
334
|
+
g.value.type === "radio" ? (e = s.value) == null || e.setRadioRowKey(g.value.selectedRowKeys[0]) : (t = s.value) == null || t.setCheckboxRowKey(
|
|
335
|
+
g.value.selectedRowKeys,
|
|
336
336
|
!0
|
|
337
337
|
);
|
|
338
338
|
});
|
|
339
339
|
}
|
|
340
340
|
function We(e) {
|
|
341
|
-
|
|
341
|
+
te(), o.onReady && re(() => {
|
|
342
342
|
o.onReady(e);
|
|
343
343
|
});
|
|
344
344
|
}
|
|
345
345
|
async function Me(e, t) {
|
|
346
|
-
var
|
|
347
|
-
const n =
|
|
346
|
+
var a;
|
|
347
|
+
const n = m.records[e];
|
|
348
348
|
if (n)
|
|
349
|
-
return (
|
|
349
|
+
return (a = s.value) == null ? void 0 : a.scrollToRow(n, t);
|
|
350
350
|
}
|
|
351
|
-
const je = (e) =>
|
|
351
|
+
const je = (e) => O(o.rowKey) ? o.rowKey(e) : e[o.rowKey];
|
|
352
352
|
async function qe(e, t = !0) {
|
|
353
353
|
const n = s.value;
|
|
354
354
|
if (!n)
|
|
355
355
|
return;
|
|
356
|
-
const
|
|
357
|
-
(
|
|
356
|
+
const a = Ze(e) ? e : [e], h = (n.getData() || []).filter(
|
|
357
|
+
(ae) => a.includes(je(ae))
|
|
358
358
|
);
|
|
359
|
-
n.setRowExpand(
|
|
359
|
+
n.setRowExpand(h, t);
|
|
360
360
|
}
|
|
361
361
|
return B(
|
|
362
362
|
() => [o.columnResizable, o.columns],
|
|
363
363
|
() => {
|
|
364
364
|
var t;
|
|
365
365
|
const e = Le();
|
|
366
|
-
|
|
366
|
+
d.value = e, (t = o.onShownColumnsChange) == null || t.call(o, e), W.value = e;
|
|
367
367
|
},
|
|
368
368
|
{
|
|
369
369
|
deep: !0,
|
|
@@ -376,7 +376,7 @@ const Yt = /* @__PURE__ */ He({
|
|
|
376
376
|
},
|
|
377
377
|
{ immediate: !0, deep: !0 }
|
|
378
378
|
), B(
|
|
379
|
-
() =>
|
|
379
|
+
() => r(m).loading,
|
|
380
380
|
(e) => {
|
|
381
381
|
var t;
|
|
382
382
|
(t = o.onLoadingChange) == null || t.call(o, e);
|
|
@@ -387,46 +387,46 @@ const Yt = /* @__PURE__ */ He({
|
|
|
387
387
|
E.value = e;
|
|
388
388
|
}
|
|
389
389
|
), fe({
|
|
390
|
-
submit:
|
|
391
|
-
reset:
|
|
392
|
-
refresh:
|
|
393
|
-
submitWith:
|
|
394
|
-
setSearchFormValues:
|
|
395
|
-
getSearchFormValues:
|
|
396
|
-
getShowColumns: () =>
|
|
390
|
+
submit: N,
|
|
391
|
+
reset: z,
|
|
392
|
+
refresh: U,
|
|
393
|
+
submitWith: X,
|
|
394
|
+
setSearchFormValues: J,
|
|
395
|
+
getSearchFormValues: Q,
|
|
396
|
+
getShowColumns: () => r(d),
|
|
397
397
|
rowSelection: {
|
|
398
|
-
selectedRows: l(() =>
|
|
399
|
-
setSelectedRowKeys:
|
|
400
|
-
clearAll:
|
|
398
|
+
selectedRows: l(() => A.value),
|
|
399
|
+
setSelectedRowKeys: $e,
|
|
400
|
+
clearAll: K
|
|
401
401
|
},
|
|
402
402
|
scrollToRow: Me,
|
|
403
|
-
getDataSource: () =>
|
|
404
|
-
setCurrentRow:
|
|
403
|
+
getDataSource: () => r(m.records),
|
|
404
|
+
setCurrentRow: De,
|
|
405
405
|
getPaging: ke,
|
|
406
406
|
setPaging: Fe,
|
|
407
|
-
getSearchFormSorterItems:
|
|
408
|
-
setSearchFormSorterItems:
|
|
409
|
-
resetSearchFormSorterItems:
|
|
407
|
+
getSearchFormSorterItems: Y,
|
|
408
|
+
setSearchFormSorterItems: Z,
|
|
409
|
+
resetSearchFormSorterItems: ee,
|
|
410
410
|
setRowExpand: qe
|
|
411
|
-
}), (e, t) => (
|
|
412
|
-
class:
|
|
413
|
-
style:
|
|
411
|
+
}), (e, t) => (i(), P("div", {
|
|
412
|
+
class: C(Re.value),
|
|
413
|
+
style: V(e.wrapperStyle)
|
|
414
414
|
}, [
|
|
415
|
-
|
|
415
|
+
r(x)(e.dataSource) && e.searchForm !== !1 && j.value.length > 0 ? (i(), P("div", {
|
|
416
416
|
key: 0,
|
|
417
|
-
class:
|
|
418
|
-
style:
|
|
417
|
+
class: C(e.card ? r(F)("search-wrapper") : null),
|
|
418
|
+
style: V(e.searchFormWrapperStyle)
|
|
419
419
|
}, [
|
|
420
|
-
|
|
420
|
+
_(r(tt).SearchForm, b(e.searchForm || {}, {
|
|
421
421
|
ref_key: "formRef",
|
|
422
422
|
ref: y,
|
|
423
423
|
"custom-reset": "",
|
|
424
|
-
"submit-loading":
|
|
425
|
-
onSubmit:
|
|
426
|
-
onReset:
|
|
427
|
-
}),
|
|
428
|
-
default:
|
|
429
|
-
(
|
|
424
|
+
"submit-loading": r(G).loading,
|
|
425
|
+
onSubmit: r(N),
|
|
426
|
+
onReset: r(z)
|
|
427
|
+
}), L({
|
|
428
|
+
default: p(() => [
|
|
429
|
+
(i(!0), P(ne, null, $(j.value, (n) => (i(), c(T(n.renderNode), {
|
|
430
430
|
key: n.dataIndex
|
|
431
431
|
}))), 128))
|
|
432
432
|
]),
|
|
@@ -434,7 +434,7 @@ const Yt = /* @__PURE__ */ He({
|
|
|
434
434
|
}, [
|
|
435
435
|
v.searchFormExtra ? {
|
|
436
436
|
name: "extra",
|
|
437
|
-
fn:
|
|
437
|
+
fn: p(() => [
|
|
438
438
|
D(e.$slots, "searchFormExtra")
|
|
439
439
|
]),
|
|
440
440
|
key: "0"
|
|
@@ -442,90 +442,106 @@ const Yt = /* @__PURE__ */ He({
|
|
|
442
442
|
]), 1040, ["submit-loading", "onSubmit", "onReset"])
|
|
443
443
|
], 6)) : S("", !0),
|
|
444
444
|
R("div", {
|
|
445
|
-
class:
|
|
446
|
-
style:
|
|
445
|
+
class: C([r(F)("table-wrapper"), e.card ? r(F)("table-wrapper-card") : null]),
|
|
446
|
+
style: V(e.tableWrapperStyle)
|
|
447
447
|
}, [
|
|
448
448
|
R("div", {
|
|
449
|
-
class:
|
|
449
|
+
class: C(r(f)("header-wrapper"))
|
|
450
450
|
}, [
|
|
451
451
|
D(e.$slots, "title", {
|
|
452
|
-
selectedRows:
|
|
453
|
-
selectedRowKeys:
|
|
454
|
-
shownColumns:
|
|
455
|
-
clearAll:
|
|
452
|
+
selectedRows: r(A),
|
|
453
|
+
selectedRowKeys: r(g).selectedRowKeys,
|
|
454
|
+
shownColumns: d.value,
|
|
455
|
+
clearAll: K
|
|
456
456
|
})
|
|
457
457
|
], 2),
|
|
458
458
|
R("div", {
|
|
459
|
-
class:
|
|
459
|
+
class: C(r(f)("vxe-wrapper"))
|
|
460
460
|
}, [
|
|
461
|
-
(
|
|
461
|
+
(i(), c(r(Ye), b(r(ut)(o), {
|
|
462
462
|
ref_key: "tableRef",
|
|
463
463
|
ref: s,
|
|
464
|
-
key:
|
|
465
|
-
data:
|
|
464
|
+
key: r(ve),
|
|
465
|
+
data: r(m).records,
|
|
466
466
|
"sort-config": {
|
|
467
|
-
remote:
|
|
467
|
+
remote: q.value.length > 0,
|
|
468
468
|
trigger: "cell"
|
|
469
469
|
},
|
|
470
470
|
"filter-config": {
|
|
471
|
-
remote:
|
|
471
|
+
remote: H.value.length > 0
|
|
472
472
|
},
|
|
473
473
|
loading: Te.value,
|
|
474
|
-
style:
|
|
474
|
+
style: r(ge),
|
|
475
475
|
size: E.value,
|
|
476
|
-
onSortChange:
|
|
477
|
-
onFilterChange:
|
|
476
|
+
onSortChange: r(Ee),
|
|
477
|
+
onFilterChange: r(Ie),
|
|
478
478
|
onCheckboxChange: ze,
|
|
479
|
-
onCheckboxRangeChange:
|
|
479
|
+
onCheckboxRangeChange: Ke,
|
|
480
480
|
onCheckboxAll: Ae,
|
|
481
|
-
onRadioChange:
|
|
482
|
-
onCurrentRowChange:
|
|
483
|
-
}),
|
|
484
|
-
empty:
|
|
485
|
-
|
|
486
|
-
image:
|
|
481
|
+
onRadioChange: Ve,
|
|
482
|
+
onCurrentRowChange: _e
|
|
483
|
+
}), L({
|
|
484
|
+
empty: p(() => [
|
|
485
|
+
_(r(ue), {
|
|
486
|
+
image: r(ue).PRESENTED_IMAGE_SIMPLE
|
|
487
487
|
}, null, 8, ["image"])
|
|
488
488
|
]),
|
|
489
|
-
loading:
|
|
489
|
+
loading: p(() => [
|
|
490
490
|
R("div", {
|
|
491
|
-
class:
|
|
491
|
+
class: C(r(F)("table-loading-wrapper"))
|
|
492
492
|
}, [
|
|
493
|
-
|
|
493
|
+
_(r(st))
|
|
494
494
|
], 2)
|
|
495
495
|
]),
|
|
496
|
-
default:
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
496
|
+
default: p(() => {
|
|
497
|
+
var n;
|
|
498
|
+
return [
|
|
499
|
+
o.expandable && d.value.length ? (i(), c(r(se), b({ key: 0 }, r(ct)(e.expandable), { fixed: Pe.value }), L({
|
|
500
|
+
content: p((a) => [
|
|
501
|
+
(i(), c(T(o.expandable.renderContent(a))))
|
|
502
|
+
]),
|
|
503
|
+
_: 2
|
|
504
|
+
}, [
|
|
505
|
+
(n = e.expandable) != null && n.renderCell ? {
|
|
506
|
+
name: "default",
|
|
507
|
+
fn: p((a) => [
|
|
508
|
+
(i(), c(T(
|
|
509
|
+
e.expandable.renderCell(
|
|
510
|
+
a.$table.isRowExpandByRow(a.row),
|
|
511
|
+
a.row
|
|
512
|
+
)
|
|
513
|
+
)))
|
|
514
|
+
]),
|
|
515
|
+
key: "0"
|
|
516
|
+
} : void 0
|
|
517
|
+
]), 1040, ["fixed"])) : S("", !0),
|
|
518
|
+
o.rowSelection && d.value.length ? (i(), c(r(se), b(
|
|
519
|
+
{ key: 1 },
|
|
520
|
+
r(ft)(r(g), d.value, o.size),
|
|
521
|
+
{
|
|
522
|
+
resizable: !1,
|
|
523
|
+
field: r(Ct)
|
|
524
|
+
}
|
|
525
|
+
), null, 16, ["field"])) : S("", !0),
|
|
526
|
+
(i(!0), P(ne, null, $(r(ye), (a) => (i(), c(T(a), {
|
|
527
|
+
key: a.props.colId
|
|
528
|
+
}))), 128))
|
|
529
|
+
];
|
|
530
|
+
}),
|
|
515
531
|
_: 2
|
|
516
532
|
}, [
|
|
517
|
-
|
|
518
|
-
name:
|
|
519
|
-
fn:
|
|
520
|
-
D(e.$slots,
|
|
533
|
+
$(r(et)(v, ["searchFormExtra"]), (n, a) => ({
|
|
534
|
+
name: a,
|
|
535
|
+
fn: p((u) => [
|
|
536
|
+
D(e.$slots, a, Je(Qe(u || {})))
|
|
521
537
|
])
|
|
522
538
|
}))
|
|
523
539
|
]), 1040, ["data", "sort-config", "filter-config", "loading", "style", "size", "onSortChange", "onFilterChange"]))
|
|
524
540
|
], 2),
|
|
525
541
|
R("div", {
|
|
526
|
-
class:
|
|
542
|
+
class: C(r(f)("pagination-wrapper"))
|
|
527
543
|
}, [
|
|
528
|
-
e.sticky ? (
|
|
544
|
+
e.sticky ? (i(), c(r(Ft), {
|
|
529
545
|
key: 0,
|
|
530
546
|
direction: "horizontal",
|
|
531
547
|
"scroll-container": we.value,
|
|
@@ -533,10 +549,10 @@ const Yt = /* @__PURE__ */ He({
|
|
|
533
549
|
"bar-color": "var(--ap-scrollbar-thumb-color-base)",
|
|
534
550
|
"track-color": "var(--ap-table-header-bg, #f2f6f9)"
|
|
535
551
|
}, null, 8, ["scroll-container"])) : S("", !0),
|
|
536
|
-
e.pagination !== !1 ? (
|
|
552
|
+
e.pagination !== !1 ? (i(), c(r(it), b({
|
|
537
553
|
key: 1,
|
|
538
|
-
class:
|
|
539
|
-
},
|
|
554
|
+
class: r(f)("pagination")
|
|
555
|
+
}, r(G).pagination, { onChange: r(Be) }), null, 16, ["class", "onChange"])) : S("", !0)
|
|
540
556
|
], 2)
|
|
541
557
|
], 6)
|
|
542
558
|
], 6));
|
|
@@ -232,7 +232,7 @@ export type ApGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<Re
|
|
|
232
232
|
*/
|
|
233
233
|
expandable?: VxeTablePropTypes.ExpandConfig<RecordType> & {
|
|
234
234
|
/**
|
|
235
|
-
*
|
|
235
|
+
* 自定义渲染展开后内容
|
|
236
236
|
*/
|
|
237
237
|
renderContent: NonNullable<VxeColumnSlots<RecordType>['content']>;
|
|
238
238
|
/**
|
|
@@ -243,6 +243,13 @@ export type ApGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<Re
|
|
|
243
243
|
* 展开列的title
|
|
244
244
|
*/
|
|
245
245
|
title?: string;
|
|
246
|
+
/**
|
|
247
|
+
* 自定义渲染单元格
|
|
248
|
+
* @param expanded 当前的展开状态
|
|
249
|
+
* @param row 当前的行数据
|
|
250
|
+
* @returns
|
|
251
|
+
*/
|
|
252
|
+
renderCell?: (expanded: boolean, row: RecordType) => any;
|
|
246
253
|
};
|
|
247
254
|
/**
|
|
248
255
|
* 作为表单项时内部传递,请勿使用
|