@aplus-frontend/ui 6.13.1 → 6.13.3
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/ap-grid/index.vue.mjs +137 -134
- package/es/src/ap-grid/interface.d.ts +6 -0
- package/es/src/ap-table/ap-table.vue.d.ts +1 -0
- package/es/src/ap-table/ap-table.vue2.mjs +189 -186
- package/es/src/ap-table/context.d.ts +1 -0
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -0
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +78 -75
- package/es/src/business/ap-table-modal/index.d.ts +1 -0
- package/es/src/business/ap-table-modal/table-modal.vue.d.ts +1 -0
- package/es/src/business/ap-view/ap-view.vue2.mjs +68 -68
- package/es/src/business/ap-view/interface.d.ts +1 -1
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +6 -0
- package/lib/src/ap-table/ap-table.vue.d.ts +1 -0
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/context.d.ts +1 -0
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -0
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/business/ap-table-modal/index.d.ts +1 -0
- package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +1 -0
- package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
- package/lib/src/business/ap-view/interface.d.ts +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineComponent as je, useSlots as
|
|
2
|
-
import { Divider as
|
|
3
|
-
import { useToken as
|
|
4
|
-
import { ApForm as
|
|
5
|
-
import { noRenderAsFormItemValueList as
|
|
1
|
+
import { defineComponent as je, useSlots as He, ref as v, computed as s, unref as l, toRef as _e, createVNode as y, Fragment as ne, watch as k, createElementBlock as B, openBlock as g, normalizeStyle as K, normalizeClass as b, createCommentVNode as se, createElementVNode as L, mergeProps as I, createSlots as de, withCtx as R, renderList as ue, createBlock as ie, resolveDynamicComponent as Ue, renderSlot as C, normalizeProps as qe, guardReactiveProps as Me } from "vue";
|
|
2
|
+
import { Divider as Ge, Table as Je } from "@aplus-frontend/antdv";
|
|
3
|
+
import { useToken as Qe } from "@aplus-frontend/antdv/es/theme/internal";
|
|
4
|
+
import { ApForm as Xe } from "../ap-form/index.mjs";
|
|
5
|
+
import { noRenderAsFormItemValueList as ce } from "./constants.mjs";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
|
-
import { useTablePaging as
|
|
8
|
-
import { isUndefined as S, omit as
|
|
9
|
-
import { getColumnOrder as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { getScrollbarSize as
|
|
7
|
+
import { useTablePaging as Ye } from "./hooks/use-table-paging-ng.mjs";
|
|
8
|
+
import { isUndefined as S, omit as fe, isBoolean as Ze } from "lodash-unified";
|
|
9
|
+
import { getColumnOrder as pe, updateFormProps as er, getFieldProps as rr, getSearchFormItemRenderNode as tr, recursionApColumns as me, getTableTitle as or, getTableRenderType as ar, getTableRenderProps as lr, getTableCellRenderNode as nr, apColumnToColumn as sr, falseToUndefined as dr, objectToString as ur } from "./utils.mjs";
|
|
10
|
+
import ir from "./hooks/use-table-content-height.mjs";
|
|
11
|
+
import cr from "./hooks/use-table-row-selection.mjs";
|
|
12
|
+
import { getScrollbarSize as fr, isDef as ye } from "../utils/index.mjs";
|
|
13
13
|
import "./components/setting/modal/index.vue.mjs";
|
|
14
14
|
import "./components/paragraph-ellipsis/index.vue.mjs";
|
|
15
|
-
import { useProvideApTable as
|
|
15
|
+
import { useProvideApTable as pr } from "./context.mjs";
|
|
16
16
|
import "../scroll-bar/index.mjs";
|
|
17
|
-
import { useStickyScroll as
|
|
18
|
-
import { getValidVNodeList as
|
|
19
|
-
import { useNamespace as
|
|
20
|
-
import { useGlobalConfig as
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
const
|
|
17
|
+
import { useStickyScroll as mr } from "./hooks/use-sticky-scroll.mjs";
|
|
18
|
+
import { getValidVNodeList as yr } from "../utils/slot.mjs";
|
|
19
|
+
import { useNamespace as gr } from "../config-provider/hooks/use-namespace.mjs";
|
|
20
|
+
import { useGlobalConfig as br } from "../config-provider/hooks/use-global-config.mjs";
|
|
21
|
+
import Sr from "./components/paragraph-ellipsis/index.vue2.mjs";
|
|
22
|
+
import hr from "./components/setting/modal/index.vue2.mjs";
|
|
23
|
+
import wr from "../scroll-bar/index.vue.mjs";
|
|
24
|
+
const _r = /* @__PURE__ */ je({
|
|
25
25
|
name: "ApTable",
|
|
26
26
|
__name: "ap-table",
|
|
27
27
|
props: {
|
|
@@ -145,51 +145,30 @@ const Hr = /* @__PURE__ */ je({
|
|
|
145
145
|
default: void 0
|
|
146
146
|
}
|
|
147
147
|
},
|
|
148
|
-
setup(
|
|
149
|
-
expose:
|
|
148
|
+
setup(ge, {
|
|
149
|
+
expose: be
|
|
150
150
|
}) {
|
|
151
|
-
const r =
|
|
151
|
+
const r = ge;
|
|
152
152
|
let O = 0;
|
|
153
|
-
const c =
|
|
153
|
+
const c = He(), [, Se] = Qe(), {
|
|
154
154
|
e: z,
|
|
155
155
|
b: f,
|
|
156
156
|
be: A,
|
|
157
|
-
m:
|
|
158
|
-
cssVar:
|
|
159
|
-
} =
|
|
160
|
-
height:
|
|
161
|
-
contentRef:
|
|
162
|
-
} =
|
|
163
|
-
isStickyMode:
|
|
157
|
+
m: he,
|
|
158
|
+
cssVar: we
|
|
159
|
+
} = gr("ap-table"), W = br("valueTypeMap"), {
|
|
160
|
+
height: ve,
|
|
161
|
+
contentRef: Re
|
|
162
|
+
} = ir(), $ = v(), D = v(), {
|
|
163
|
+
isStickyMode: j,
|
|
164
164
|
scrollBarRef: i
|
|
165
|
-
} =
|
|
166
|
-
|
|
167
|
-
columns:
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
},
|
|
173
|
-
updateSize(e) {
|
|
174
|
-
N.value = e;
|
|
175
|
-
},
|
|
176
|
-
dataSource: s(() => l(h).records),
|
|
177
|
-
getSearchFormValues: X,
|
|
178
|
-
setSearchFormValues: Q,
|
|
179
|
-
submit: () => P(),
|
|
180
|
-
reset: () => V(),
|
|
181
|
-
refresh: () => M(),
|
|
182
|
-
getSearchFormSorterItems: Y,
|
|
183
|
-
setSearchFormSorterItems: Z,
|
|
184
|
-
resetSearchFormSorterItems: ee
|
|
185
|
-
});
|
|
186
|
-
const U = s(() => {
|
|
187
|
-
var e, o, t;
|
|
188
|
-
return O++, ((t = (o = (e = r.columns) == null ? void 0 : e.filter((a) => !a.hideInSearch && a.dataIndex && (a.valueType || a.customRenderFormItem) && !ie.includes(a.valueType))) == null ? void 0 : o.sort((a, d) => {
|
|
189
|
-
let n = fe(a.order);
|
|
190
|
-
return fe(d.order) - n;
|
|
191
|
-
})) == null ? void 0 : t.map((a) => {
|
|
192
|
-
const d = Ze(a, er(a.fieldProps, {})), n = {
|
|
165
|
+
} = mr($), N = v(r.size), u = v([]), H = v([]), _ = fr(), U = s(() => {
|
|
166
|
+
var e, t, o;
|
|
167
|
+
return O++, ((o = (t = (e = r.columns) == null ? void 0 : e.filter((a) => !a.hideInSearch && a.dataIndex && (a.valueType || a.customRenderFormItem) && !ce.includes(a.valueType))) == null ? void 0 : t.sort((a, d) => {
|
|
168
|
+
let n = pe(a.order);
|
|
169
|
+
return pe(d.order) - n;
|
|
170
|
+
})) == null ? void 0 : o.map((a) => {
|
|
171
|
+
const d = er(a, rr(a.fieldProps, {})), n = {
|
|
193
172
|
...a,
|
|
194
173
|
fieldProps: {
|
|
195
174
|
label: a.title,
|
|
@@ -201,29 +180,29 @@ const Hr = /* @__PURE__ */ je({
|
|
|
201
180
|
},
|
|
202
181
|
renderNode: void 0
|
|
203
182
|
};
|
|
204
|
-
return n.renderNode =
|
|
183
|
+
return n.renderNode = tr(n, l(W)), n;
|
|
205
184
|
})) || [];
|
|
206
|
-
}),
|
|
185
|
+
}), Ce = s(() => me(l(u), (e) => {
|
|
207
186
|
if (e.sorter === !0)
|
|
208
187
|
return e.key || (e == null ? void 0 : e.dataIndex);
|
|
209
|
-
}).filter(Boolean)),
|
|
188
|
+
}).filter(Boolean)), Te = s(() => me(l(u), (e) => {
|
|
210
189
|
if (e.filters && !e.onFilter)
|
|
211
190
|
return e.key || (e == null ? void 0 : e.dataIndex);
|
|
212
|
-
}).filter(Boolean)),
|
|
213
|
-
var
|
|
214
|
-
return
|
|
191
|
+
}).filter(Boolean)), Fe = s(() => S(r.dataSource) ? h.records : r.dataSource), xe = s(() => {
|
|
192
|
+
var t;
|
|
193
|
+
return ye(r.manual) ? r.manual : yr(((t = c.searchFormExtra) == null ? void 0 : t.call(c)) || []).some((o) => {
|
|
215
194
|
var a;
|
|
216
|
-
return ((a =
|
|
195
|
+
return ((a = o.type) == null ? void 0 : a.name) === "ApView";
|
|
217
196
|
});
|
|
218
197
|
}), {
|
|
219
198
|
rowSelection: T,
|
|
220
199
|
selectedRows: F,
|
|
221
200
|
...x
|
|
222
|
-
} =
|
|
201
|
+
} = cr({
|
|
223
202
|
fixed: !0,
|
|
224
203
|
...r.rowSelection === !0 ? {} : r.rowSelection,
|
|
225
204
|
rowKey: r.rowKey,
|
|
226
|
-
dataSource:
|
|
205
|
+
dataSource: Fe
|
|
227
206
|
}), {
|
|
228
207
|
formRef: p,
|
|
229
208
|
submit: P,
|
|
@@ -231,63 +210,86 @@ const Hr = /* @__PURE__ */ je({
|
|
|
231
210
|
tableProps: q,
|
|
232
211
|
refresh: M,
|
|
233
212
|
data: h,
|
|
234
|
-
setDataSource:
|
|
213
|
+
setDataSource: ke,
|
|
235
214
|
getColumnSFConfig: G,
|
|
236
|
-
sortedInfo:
|
|
237
|
-
filteredInfo:
|
|
238
|
-
setPaging:
|
|
239
|
-
getPaging:
|
|
240
|
-
|
|
215
|
+
sortedInfo: Be,
|
|
216
|
+
filteredInfo: Ie,
|
|
217
|
+
setPaging: ze,
|
|
218
|
+
getPaging: Ne,
|
|
219
|
+
submitWith: J
|
|
220
|
+
} = Ye({
|
|
241
221
|
async request(e) {
|
|
242
|
-
var
|
|
222
|
+
var o, a;
|
|
243
223
|
if (!T.value.preserveSelectedRowKeys && S(r.dataSource) && x.clearAll(), !S(r.dataSource))
|
|
244
224
|
return {
|
|
245
225
|
data: r.dataSource || [],
|
|
246
226
|
total: r.dataSource.length || 0
|
|
247
227
|
};
|
|
248
|
-
const
|
|
249
|
-
return (a = r.onLoad) == null || a.call(r, (
|
|
250
|
-
data: (
|
|
251
|
-
total: (
|
|
228
|
+
const t = await ((o = r.request) == null ? void 0 : o.call(r, e));
|
|
229
|
+
return (a = r.onLoad) == null || a.call(r, (t == null ? void 0 : t.data) || []), {
|
|
230
|
+
data: (t == null ? void 0 : t.data) || [],
|
|
231
|
+
total: (t == null ? void 0 : t.total) || 0
|
|
252
232
|
};
|
|
253
233
|
},
|
|
254
|
-
filterFields:
|
|
255
|
-
sortFields:
|
|
256
|
-
params:
|
|
234
|
+
filterFields: Te,
|
|
235
|
+
sortFields: Ce,
|
|
236
|
+
params: _e(r, "params"),
|
|
257
237
|
defaultData: r.defaultData,
|
|
258
|
-
manual: l(
|
|
238
|
+
manual: l(xe),
|
|
259
239
|
formatParams: r.beforeSearchSubmit,
|
|
260
240
|
pagination: r.pagination
|
|
261
|
-
})
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
241
|
+
});
|
|
242
|
+
pr({
|
|
243
|
+
columns: s(() => u.value),
|
|
244
|
+
columnsBackup: s(() => H.value),
|
|
245
|
+
size: s(() => N.value),
|
|
246
|
+
updateColumns(e) {
|
|
247
|
+
u.value = e;
|
|
248
|
+
},
|
|
249
|
+
updateSize(e) {
|
|
250
|
+
N.value = e;
|
|
251
|
+
},
|
|
252
|
+
dataSource: s(() => l(h).records),
|
|
253
|
+
getSearchFormValues: Y,
|
|
254
|
+
setSearchFormValues: X,
|
|
255
|
+
submit: P,
|
|
256
|
+
submitWith: J,
|
|
257
|
+
reset: V,
|
|
258
|
+
refresh: M,
|
|
259
|
+
getSearchFormSorterItems: Z,
|
|
260
|
+
setSearchFormSorterItems: ee,
|
|
261
|
+
resetSearchFormSorterItems: re
|
|
262
|
+
});
|
|
263
|
+
const Pe = () => {
|
|
264
|
+
var o;
|
|
265
|
+
let e = ((o = r.columns) == null ? void 0 : o.filter((a) => !a.hideInTable)) || [];
|
|
266
|
+
function t(a, d) {
|
|
265
267
|
return a.map((n) => ({
|
|
266
|
-
resizable:
|
|
267
|
-
...
|
|
268
|
+
resizable: ye(n.resizable) ? n.resizable : r.columnResizable,
|
|
269
|
+
...fe(sr(n), ["ellipsis"]),
|
|
268
270
|
// tips: 此函数内部依赖查询&筛选的相应式值
|
|
269
271
|
...G(n),
|
|
270
272
|
fixed: d ? d.fixed : n.fixed,
|
|
271
|
-
title: or(n, A("table-header", "title"), c.headerCell, l(
|
|
273
|
+
title: or(n, A("table-header", "title"), c.headerCell, l(Se).colorTextTertiary),
|
|
272
274
|
customRender({
|
|
273
275
|
value: m,
|
|
274
276
|
...w
|
|
275
277
|
}) {
|
|
276
|
-
var
|
|
277
|
-
const
|
|
278
|
+
var ae, le;
|
|
279
|
+
const te = ar(n), We = lr({
|
|
278
280
|
...n,
|
|
279
|
-
valueType:
|
|
281
|
+
valueType: te
|
|
280
282
|
}, {
|
|
281
283
|
value: m,
|
|
282
284
|
...w
|
|
283
|
-
}), $e =
|
|
285
|
+
}), $e = nr(te, We, w.record, l(W)), oe = ((ae = n.renderText) == null ? void 0 : ae.call(n, {
|
|
284
286
|
value: m,
|
|
285
287
|
...w
|
|
286
|
-
})) || m, De = n.renderText ? y(
|
|
288
|
+
})) || m, De = n.renderText ? y(ne, null, [(le = n.renderText) == null ? void 0 : le.call(n, {
|
|
287
289
|
value: m,
|
|
288
290
|
...w
|
|
289
291
|
})]) : $e;
|
|
290
|
-
let E =
|
|
292
|
+
let E = Oe(n, oe, De);
|
|
291
293
|
return n.customRender && (E = n.customRender({
|
|
292
294
|
value: m,
|
|
293
295
|
...w,
|
|
@@ -296,121 +298,122 @@ const Hr = /* @__PURE__ */ je({
|
|
|
296
298
|
originalText: oe
|
|
297
299
|
})), E;
|
|
298
300
|
},
|
|
299
|
-
children:
|
|
301
|
+
children: t(n.children || [], d || n)
|
|
300
302
|
}));
|
|
301
303
|
}
|
|
302
|
-
return
|
|
303
|
-
},
|
|
304
|
-
function e(
|
|
305
|
-
var
|
|
306
|
-
for (const a of
|
|
307
|
-
(
|
|
304
|
+
return t(e);
|
|
305
|
+
}, Ve = () => {
|
|
306
|
+
function e(t) {
|
|
307
|
+
var o;
|
|
308
|
+
for (const a of t)
|
|
309
|
+
(o = a.children) != null && o.length ? e(a.children) : G(a, !0);
|
|
308
310
|
}
|
|
309
311
|
e(u.value);
|
|
310
312
|
};
|
|
311
313
|
k(() => [r.columns, r.columnResizable], () => {
|
|
312
|
-
const e =
|
|
314
|
+
const e = Pe();
|
|
313
315
|
u.value = e, H.value = e;
|
|
314
316
|
}, {
|
|
315
317
|
deep: !0,
|
|
316
318
|
immediate: !0
|
|
317
|
-
}), k(() => [
|
|
318
|
-
|
|
319
|
+
}), k(() => [Be.value, Ie.value], () => {
|
|
320
|
+
Ve();
|
|
319
321
|
}, {
|
|
320
322
|
deep: !0
|
|
321
323
|
});
|
|
322
|
-
const
|
|
323
|
-
var
|
|
324
|
-
if (r.adaptive && (h.total > 0 || ((
|
|
324
|
+
const Ee = s(() => {
|
|
325
|
+
var t, o;
|
|
326
|
+
if (r.adaptive && (h.total > 0 || ((t = r.dataSource) == null ? void 0 : t.length)))
|
|
325
327
|
return {
|
|
326
|
-
y: l(
|
|
327
|
-
x: ((
|
|
328
|
+
y: l(ve),
|
|
329
|
+
x: ((o = r.scroll) == null ? void 0 : o.x) || "100%"
|
|
328
330
|
};
|
|
329
331
|
if (r.scroll)
|
|
330
332
|
return r.scroll;
|
|
331
|
-
}),
|
|
333
|
+
}), Ke = s(() => {
|
|
332
334
|
var e;
|
|
333
335
|
if (r.tableLayout)
|
|
334
336
|
return r.tableLayout;
|
|
335
|
-
if ((e = r.columns) != null && e.some((
|
|
337
|
+
if ((e = r.columns) != null && e.some((t) => t.ellipsis))
|
|
336
338
|
return "fixed";
|
|
337
|
-
}),
|
|
338
|
-
var
|
|
339
|
-
const e = l(q),
|
|
339
|
+
}), Q = s(() => {
|
|
340
|
+
var o;
|
|
341
|
+
const e = l(q), t = l(T);
|
|
340
342
|
return {
|
|
341
343
|
...r,
|
|
342
344
|
...e,
|
|
343
|
-
rowSelection: r.rowSelection === !0 || ((
|
|
344
|
-
...
|
|
345
|
+
rowSelection: r.rowSelection === !0 || ((o = r.rowSelection) == null ? void 0 : o.mode) === "internal" ? {
|
|
346
|
+
...t,
|
|
345
347
|
// tips 如果是前端分页,则默认会走缓存
|
|
346
|
-
preserveSelectedRowKeys: S(r.dataSource) ?
|
|
347
|
-
} :
|
|
348
|
+
preserveSelectedRowKeys: S(r.dataSource) ? t.preserveSelectedRowKeys : !0
|
|
349
|
+
} : dr(r.rowSelection),
|
|
348
350
|
loading: S(r.loading) ? e.loading : r.loading,
|
|
349
351
|
pagination: r.pagination === !1 ? !1 : e.pagination,
|
|
350
|
-
scroll: l(
|
|
352
|
+
scroll: l(Ee)
|
|
351
353
|
};
|
|
352
|
-
}),
|
|
354
|
+
}), Le = s(() => {
|
|
353
355
|
var e;
|
|
354
|
-
return [f(), r.card ? null : f("wrapper"), r.adaptive ? f("adaptive") : null,
|
|
356
|
+
return [f(), r.card ? null : f("wrapper"), r.adaptive ? f("adaptive") : null, j.value && ((e = i.value) != null && e.visible) ? he(`sticky-${_ === 0 ? "absolute" : "relative"}`) : null].filter(Boolean);
|
|
355
357
|
});
|
|
356
|
-
function
|
|
357
|
-
if (
|
|
358
|
-
return
|
|
359
|
-
const a =
|
|
360
|
-
return e.copyable || e.ellipsis ? y(
|
|
358
|
+
function Oe(e, t, o) {
|
|
359
|
+
if (ce.includes(e.valueType))
|
|
360
|
+
return o;
|
|
361
|
+
const a = ur(t);
|
|
362
|
+
return e.copyable || e.ellipsis ? y(Sr, {
|
|
361
363
|
copyable: e.copyable,
|
|
362
364
|
rawValue: a,
|
|
363
|
-
ellipsis: e.ellipsis ?
|
|
364
|
-
tooltip:
|
|
365
|
+
ellipsis: e.ellipsis ? Ze(e.ellipsis) ? {
|
|
366
|
+
tooltip: o,
|
|
365
367
|
rows: 1
|
|
366
368
|
} : {
|
|
367
369
|
...e.ellipsis,
|
|
368
|
-
tooltip:
|
|
370
|
+
tooltip: o
|
|
369
371
|
} : !1,
|
|
370
|
-
content:
|
|
371
|
-
}, null) :
|
|
372
|
+
content: o
|
|
373
|
+
}, null) : o;
|
|
372
374
|
}
|
|
373
375
|
k(() => l(h).loading, (e) => {
|
|
374
|
-
var
|
|
375
|
-
(
|
|
376
|
+
var t;
|
|
377
|
+
(t = r.onLoadingChange) == null || t.call(r, e);
|
|
376
378
|
}), k(() => r.dataSource, (e) => {
|
|
377
|
-
|
|
379
|
+
ke(e);
|
|
378
380
|
}, {
|
|
379
381
|
immediate: !0
|
|
380
382
|
});
|
|
381
|
-
function
|
|
382
|
-
var
|
|
383
|
-
(a = (
|
|
383
|
+
function X(e) {
|
|
384
|
+
var t, o, a;
|
|
385
|
+
(a = (o = (t = p.value) == null ? void 0 : t.apForm) == null ? void 0 : o.setFieldsValue) == null || a.call(o, e);
|
|
384
386
|
}
|
|
385
|
-
function
|
|
386
|
-
var
|
|
387
|
-
const
|
|
388
|
-
return (d = (a = (
|
|
387
|
+
function Y(e = !1) {
|
|
388
|
+
var o, a, d;
|
|
389
|
+
const t = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
390
|
+
return (d = (a = (o = p.value) == null ? void 0 : o.apForm) == null ? void 0 : a[t]) == null ? void 0 : d.call(a, !0);
|
|
389
391
|
}
|
|
390
|
-
function
|
|
392
|
+
function Z() {
|
|
391
393
|
var e;
|
|
392
394
|
return ((e = p.value) == null ? void 0 : e.getSorterItems()) || [];
|
|
393
395
|
}
|
|
394
|
-
function
|
|
395
|
-
var
|
|
396
|
-
(
|
|
396
|
+
function ee(e) {
|
|
397
|
+
var t;
|
|
398
|
+
(t = p.value) == null || t.setSorterItems(e);
|
|
397
399
|
}
|
|
398
|
-
function
|
|
400
|
+
function re() {
|
|
399
401
|
var e;
|
|
400
402
|
(e = p.value) == null || e.resetSorterItems();
|
|
401
403
|
}
|
|
402
|
-
function
|
|
404
|
+
function Ae() {
|
|
403
405
|
return l(u);
|
|
404
406
|
}
|
|
405
|
-
return
|
|
407
|
+
return be({
|
|
406
408
|
submit: () => P(),
|
|
407
409
|
reset: () => V(),
|
|
408
410
|
refresh: () => M(),
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
411
|
+
submitWith: () => J(),
|
|
412
|
+
setSearchFormValues: X,
|
|
413
|
+
getSearchFormValues: Y,
|
|
414
|
+
setPaging: ze,
|
|
415
|
+
getPaging: Ne,
|
|
416
|
+
getShownColumns: Ae,
|
|
414
417
|
dataSource: s(() => l(h).records),
|
|
415
418
|
rowSelection: {
|
|
416
419
|
selectedRows: s(() => l(F)),
|
|
@@ -423,45 +426,45 @@ const Hr = /* @__PURE__ */ je({
|
|
|
423
426
|
return ((e = i == null ? void 0 : i.value) == null ? void 0 : e.currentScroll) ?? 0;
|
|
424
427
|
},
|
|
425
428
|
scroll: (e) => {
|
|
426
|
-
var
|
|
427
|
-
return (
|
|
429
|
+
var t, o;
|
|
430
|
+
return (o = (t = i == null ? void 0 : i.value) == null ? void 0 : t.scroll) == null ? void 0 : o.call(t, e);
|
|
428
431
|
}
|
|
429
432
|
},
|
|
430
433
|
y: void 0
|
|
431
434
|
},
|
|
432
|
-
getSearchFormSorterItems:
|
|
433
|
-
setSearchFormSorterItems:
|
|
434
|
-
resetSearchFormSorterItems:
|
|
435
|
-
}), (e,
|
|
435
|
+
getSearchFormSorterItems: Z,
|
|
436
|
+
setSearchFormSorterItems: ee,
|
|
437
|
+
resetSearchFormSorterItems: re
|
|
438
|
+
}), (e, t) => (g(), B("div", {
|
|
436
439
|
ref_key: "tableWrapperRef",
|
|
437
|
-
ref:
|
|
438
|
-
class: b(
|
|
439
|
-
style: K(l(
|
|
440
|
+
ref: $,
|
|
441
|
+
class: b(Le.value),
|
|
442
|
+
style: K(l(we)({
|
|
440
443
|
"scroll-bar-width": `${l(_)}px`
|
|
441
444
|
}))
|
|
442
445
|
}, [l(S)(e.dataSource) && e.searchForm !== !1 && U.value.length > 0 ? (g(), B("div", {
|
|
443
446
|
key: 0,
|
|
444
447
|
class: b(e.card ? l(z)("search-wrapper") : null),
|
|
445
448
|
style: K(e.searchFormWrapperStyle)
|
|
446
|
-
}, [y(l(
|
|
449
|
+
}, [y(l(Xe).SearchForm, I(e.searchForm || {}, {
|
|
447
450
|
ref_key: "formRef",
|
|
448
451
|
ref: p,
|
|
449
452
|
"custom-reset": "",
|
|
450
453
|
"submit-loading": l(q).loading,
|
|
451
454
|
onSubmit: l(P),
|
|
452
455
|
onReset: l(V)
|
|
453
|
-
}),
|
|
454
|
-
default: R(() => [(g(!0), B(
|
|
455
|
-
key:
|
|
456
|
+
}), de({
|
|
457
|
+
default: R(() => [(g(!0), B(ne, null, ue(U.value, (o) => (g(), ie(Ue(o.renderNode), {
|
|
458
|
+
key: o.dataIndex
|
|
456
459
|
}))), 128))]),
|
|
457
460
|
_: 2
|
|
458
461
|
}, [c.searchFormExtra ? {
|
|
459
462
|
name: "extra",
|
|
460
463
|
fn: R(() => [C(e.$slots, "searchFormExtra")]),
|
|
461
464
|
key: "0"
|
|
462
|
-
} : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) :
|
|
465
|
+
} : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) : se("", !0), L("div", {
|
|
463
466
|
ref_key: "contentRef",
|
|
464
|
-
ref:
|
|
467
|
+
ref: Re,
|
|
465
468
|
class: b([l(z)("table-wrapper"), e.card ? l(z)("table-wrapper-card") : null]),
|
|
466
469
|
style: K(e.tableWrapperStyle)
|
|
467
470
|
}, [L("div", {
|
|
@@ -475,52 +478,52 @@ const Hr = /* @__PURE__ */ je({
|
|
|
475
478
|
selectedRows: l(F),
|
|
476
479
|
selectedRowKeys: l(T).selectedRowKeys,
|
|
477
480
|
shownColumns: u.value
|
|
478
|
-
}, x))], 2), c.title ? (g(),
|
|
481
|
+
}, x))], 2), c.title ? (g(), ie(l(Ge), {
|
|
479
482
|
key: 0,
|
|
480
483
|
type: "vertical"
|
|
481
|
-
})) :
|
|
484
|
+
})) : se("", !0), y(hr, {
|
|
482
485
|
config: e.settings === !0 ? {} : e.settings
|
|
483
486
|
}, null, 8, ["config"])], 2)) : C(e.$slots, "title", I({
|
|
484
487
|
key: 1,
|
|
485
488
|
selectedRows: l(F),
|
|
486
489
|
selectedRowKeys: l(T).selectedRowKeys,
|
|
487
490
|
shownColumns: u.value
|
|
488
|
-
}, x))], 2), y(l(
|
|
491
|
+
}, x))], 2), y(l(Je), I({
|
|
489
492
|
ref_key: "antdTableRef",
|
|
490
|
-
ref:
|
|
493
|
+
ref: D,
|
|
491
494
|
class: l(f)("table")
|
|
492
|
-
},
|
|
495
|
+
}, Q.value, {
|
|
493
496
|
size: N.value,
|
|
494
|
-
"table-layout":
|
|
497
|
+
"table-layout": Ke.value,
|
|
495
498
|
columns: u.value,
|
|
496
|
-
onResizeColumn:
|
|
497
|
-
}),
|
|
499
|
+
onResizeColumn: t[0] || (t[0] = (o, a) => a.width = o)
|
|
500
|
+
}), de({
|
|
498
501
|
summary: R(() => [C(e.$slots, "summary", {
|
|
499
502
|
columns: u.value,
|
|
500
|
-
records:
|
|
503
|
+
records: Q.value.dataSource,
|
|
501
504
|
selectedRows: l(F)
|
|
502
505
|
})]),
|
|
503
506
|
_: 2
|
|
504
|
-
}, [l(
|
|
507
|
+
}, [l(j) ? {
|
|
505
508
|
name: "bottomPaginationTop",
|
|
506
509
|
fn: R(() => {
|
|
507
|
-
var
|
|
508
|
-
return [y(l(
|
|
510
|
+
var o, a;
|
|
511
|
+
return [y(l(wr), {
|
|
509
512
|
ref_key: "scrollBarRef",
|
|
510
513
|
ref: i,
|
|
511
|
-
"scroll-container": (a = (
|
|
514
|
+
"scroll-container": (a = (o = D.value) == null ? void 0 : o.table) == null ? void 0 : a.scrollBodyRef,
|
|
512
515
|
direction: "horizontal",
|
|
513
516
|
"bar-color": "var(--ap-scrollbar-thumb-color-base)",
|
|
514
517
|
"track-color": "var(--ap-table-header-bg, #f2f6f9)"
|
|
515
518
|
}, null, 8, ["scroll-container"])];
|
|
516
519
|
}),
|
|
517
520
|
key: "0"
|
|
518
|
-
} : void 0,
|
|
521
|
+
} : void 0, ue(l(fe)(c, ["title", "searchFormExtra", "headerCell", "summary"]), (o, a) => ({
|
|
519
522
|
name: a,
|
|
520
|
-
fn: R((d) => [C(e.$slots, a,
|
|
523
|
+
fn: R((d) => [C(e.$slots, a, qe(Me(d || {})))])
|
|
521
524
|
}))]), 1040, ["class", "size", "table-layout", "columns"])], 6)], 6));
|
|
522
525
|
}
|
|
523
526
|
});
|
|
524
527
|
export {
|
|
525
|
-
|
|
528
|
+
_r as default
|
|
526
529
|
};
|
|
@@ -31,6 +31,7 @@ type ApTableContextProps<RecordType> = {
|
|
|
31
31
|
getSearchFormValues?: (transform?: boolean) => (Partial<Recordable> & Recordable<any>) | undefined;
|
|
32
32
|
setSearchFormValues?: (values: Partial<Recordable>) => void;
|
|
33
33
|
submit?: () => void;
|
|
34
|
+
submitWith?: (resetCurrent?: boolean) => void;
|
|
34
35
|
reset?: () => void;
|
|
35
36
|
refresh?: () => void;
|
|
36
37
|
getSearchFormSorterItems?: () => ApFormSearchFormPopoverSorterItem[];
|
|
@@ -111,5 +111,6 @@ export declare const useTablePaging: <DataType = any, ParamsType = Record<string
|
|
|
111
111
|
pageSize?: number | undefined;
|
|
112
112
|
};
|
|
113
113
|
setPaging: (nextPaging: InternalPagingType, refreshImmediately?: boolean) => void;
|
|
114
|
+
submitWith: (resetCurrent?: boolean) => void;
|
|
114
115
|
};
|
|
115
116
|
export {};
|