@aplus-frontend/ui 0.4.22 → 0.4.24
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-table/ap-table.vue.d.ts +4 -2
- package/es/src/ap-table/ap-table.vue2.mjs +147 -135
- package/es/src/ap-table/interface.d.ts +5 -4
- package/es/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +5 -4
- package/es/src/business/ap-table-modal/hooks/use-table-modal.d.ts +5 -4
- package/es/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +5 -4
- package/es/src/business/ap-table-modal/index.d.ts +19 -9
- package/es/src/business/ap-table-modal/table-modal.vue.d.ts +9 -5
- package/es/src/business/hooks/usePageListApTable.d.ts +5 -4
- package/es/src/business/hooks/useTableRefresh.mjs +27 -30
- package/es/src/scroll-bar/index.vue.d.ts +2 -1
- package/es/src/scroll-bar/index.vue.mjs +38 -41
- package/es/src/scroll-bar/internal.vue.mjs +10 -11
- package/es/src/utils/index.d.ts +0 -8
- package/index.ts +19 -0
- package/lib/src/ap-table/ap-table.vue.d.ts +4 -2
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/interface.d.ts +5 -4
- package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +5 -4
- package/lib/src/business/ap-table-modal/hooks/use-table-modal.d.ts +5 -4
- package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +5 -4
- package/lib/src/business/ap-table-modal/index.d.ts +19 -9
- package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +9 -5
- package/lib/src/business/hooks/usePageListApTable.d.ts +5 -4
- package/lib/src/business/hooks/useTableRefresh.js +1 -1
- package/lib/src/scroll-bar/index.vue.d.ts +2 -1
- package/lib/src/scroll-bar/index.vue.js +1 -1
- package/lib/src/scroll-bar/internal.vue.js +1 -1
- package/lib/src/utils/index.d.ts +0 -8
- package/package.json +1 -1
|
@@ -2,7 +2,6 @@ import { ApColumnType, ApTableProps } from './interface';
|
|
|
2
2
|
import { ColumnsType, ColumnType } from '@aplus-frontend/antdv/es/table';
|
|
3
3
|
import { RowSelectionReturnType } from './hooks/use-table-row-selection';
|
|
4
4
|
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, ComputedRef, Ref, VNode, RendererNode, RendererElement } from 'vue';
|
|
5
|
-
import { ScrollBarExpose } from '../scroll-bar';
|
|
6
5
|
declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
7
6
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ApTableProps<RecordType> & Partial<{}>> & PublicProps;
|
|
8
7
|
expose(exposed: ShallowUnwrapRef<{
|
|
@@ -24,7 +23,10 @@ declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __V
|
|
|
24
23
|
selectedRows: ComputedRef<RecordType[]>;
|
|
25
24
|
};
|
|
26
25
|
scrollBar: {
|
|
27
|
-
x:
|
|
26
|
+
x: {
|
|
27
|
+
getCurrentScroll: () => 0 | Ref<number, number>;
|
|
28
|
+
scroll: (percent: number) => void | undefined;
|
|
29
|
+
};
|
|
28
30
|
y: undefined;
|
|
29
31
|
};
|
|
30
32
|
}>): void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as ze, useSlots as Pe, ref as
|
|
1
|
+
import { defineComponent as ze, useSlots as Pe, ref as h, computed as s, unref as l, createVNode as p, Fragment as J, watchEffect as Ne, watch as Q, openBlock as m, createElementBlock as k, normalizeClass as y, normalizeStyle as X, mergeProps as w, createSlots as Y, withCtx as v, renderList as Z, createBlock as ee, resolveDynamicComponent as Ie, renderSlot as R, createCommentVNode as oe, createElementVNode as I, normalizeProps as Ee, guardReactiveProps as Ke } from "vue";
|
|
2
2
|
import { Divider as Oe, Table as Le } from "@aplus-frontend/antdv";
|
|
3
3
|
import { useToken as Ve } from "@aplus-frontend/antdv/es/theme/internal";
|
|
4
4
|
import { ApForm as Ae } from "../ap-form/index.mjs";
|
|
5
5
|
import { noRenderAsFormItemValueList as ae } from "./constants.mjs";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
7
|
import { useTablePaging as De } from "./hooks/use-table-paging-ng.mjs";
|
|
8
|
-
import { isUndefined as
|
|
8
|
+
import { isUndefined as g, omit as re, isBoolean as $e } from "lodash-unified";
|
|
9
9
|
import { getColumnOrder as te, updateFormProps as We, getFieldProps as je, getSearchFormItemRenderNode as _e, recursionApColumns as le, apColumnToColumn as He, getTableTitle as Ue, getTableRenderType as qe, getTableRenderProps as Me, getTableCellRenderNode as Ge, falseToUndefined as Je } from "./utils.mjs";
|
|
10
10
|
import Qe from "./hooks/use-table-content-height.mjs";
|
|
11
11
|
import Xe from "./hooks/use-table-row-selection.mjs";
|
|
@@ -149,85 +149,85 @@ const No = /* @__PURE__ */ ze({
|
|
|
149
149
|
expose: se
|
|
150
150
|
}) {
|
|
151
151
|
const o = ne;
|
|
152
|
-
let
|
|
152
|
+
let E = 0;
|
|
153
153
|
const C = Pe(), [, de] = Ve(), {
|
|
154
|
-
e:
|
|
155
|
-
b:
|
|
156
|
-
be:
|
|
154
|
+
e: B,
|
|
155
|
+
b: c,
|
|
156
|
+
be: K,
|
|
157
157
|
m: ue
|
|
158
|
-
} = ao("ap-table"),
|
|
158
|
+
} = ao("ap-table"), O = ro("valueTypeMap"), {
|
|
159
159
|
height: ie,
|
|
160
160
|
contentRef: ce
|
|
161
|
-
} = Qe(),
|
|
162
|
-
isStickyMode:
|
|
163
|
-
scrollBarRef:
|
|
164
|
-
} = eo(
|
|
161
|
+
} = Qe(), L = h(), V = h(), {
|
|
162
|
+
isStickyMode: A,
|
|
163
|
+
scrollBarRef: i
|
|
164
|
+
} = eo(L), z = h(o.size), u = h([]), D = h([]);
|
|
165
165
|
Ze({
|
|
166
166
|
columns: s(() => u.value),
|
|
167
167
|
columnsBackup: s(() => D.value),
|
|
168
|
-
size: s(() =>
|
|
168
|
+
size: s(() => z.value),
|
|
169
169
|
updateColumns(e) {
|
|
170
170
|
u.value = e;
|
|
171
171
|
},
|
|
172
172
|
updateSize(e) {
|
|
173
|
-
|
|
173
|
+
z.value = e;
|
|
174
174
|
},
|
|
175
|
-
dataSource: s(() =>
|
|
175
|
+
dataSource: s(() => l(b).records)
|
|
176
176
|
});
|
|
177
177
|
const $ = s(() => {
|
|
178
|
-
var e,
|
|
179
|
-
return
|
|
180
|
-
let n = te(
|
|
178
|
+
var e, r, a;
|
|
179
|
+
return E++, ((a = (r = (e = o.columns) == null ? void 0 : e.filter((t) => !t.hideInSearch && t.dataIndex && (t.valueType || t.customRenderFormItem) && !ae.includes(t.valueType))) == null ? void 0 : r.sort((t, d) => {
|
|
180
|
+
let n = te(t.order);
|
|
181
181
|
return te(d.order) - n;
|
|
182
|
-
})) == null ? void 0 : a.map((
|
|
183
|
-
const d = We(
|
|
184
|
-
...
|
|
182
|
+
})) == null ? void 0 : a.map((t) => {
|
|
183
|
+
const d = We(t, je(t.fieldProps, {})), n = {
|
|
184
|
+
...t,
|
|
185
185
|
fieldProps: {
|
|
186
|
-
label:
|
|
187
|
-
name:
|
|
186
|
+
label: t.title,
|
|
187
|
+
name: t.dataIndex,
|
|
188
188
|
...d || {},
|
|
189
|
-
_signal:
|
|
189
|
+
_signal: E
|
|
190
190
|
},
|
|
191
191
|
renderNode: void 0
|
|
192
192
|
};
|
|
193
|
-
return n.renderNode = _e(n,
|
|
193
|
+
return n.renderNode = _e(n, l(O)), n;
|
|
194
194
|
})) || [];
|
|
195
|
-
}), fe = s(() => le(
|
|
195
|
+
}), fe = s(() => le(l(u), (e) => {
|
|
196
196
|
if (e.sorter === !0)
|
|
197
197
|
return e.key || e.dataIndex;
|
|
198
|
-
}).filter(Boolean)), pe = s(() => le(
|
|
198
|
+
}).filter(Boolean)), pe = s(() => le(l(u), (e) => {
|
|
199
199
|
if (e.filters && !e.onFilter)
|
|
200
200
|
return e.key || e.dataIndex;
|
|
201
|
-
}).filter(Boolean)), me = s(() =>
|
|
202
|
-
rowSelection:
|
|
203
|
-
selectedRows:
|
|
204
|
-
...
|
|
201
|
+
}).filter(Boolean)), me = s(() => g(o.dataSource) ? b.records : o.dataSource), {
|
|
202
|
+
rowSelection: T,
|
|
203
|
+
selectedRows: F,
|
|
204
|
+
...x
|
|
205
205
|
} = Xe({
|
|
206
206
|
fixed: !0,
|
|
207
207
|
...o.rowSelection === !0 ? {} : o.rowSelection,
|
|
208
208
|
rowKey: o.rowKey,
|
|
209
209
|
dataSource: me
|
|
210
210
|
}), {
|
|
211
|
-
formRef:
|
|
211
|
+
formRef: P,
|
|
212
212
|
submit: W,
|
|
213
213
|
reset: j,
|
|
214
214
|
tableProps: _,
|
|
215
215
|
refresh: ye,
|
|
216
|
-
data:
|
|
216
|
+
data: b,
|
|
217
217
|
setDataSource: ge,
|
|
218
218
|
getColumnSFConfig: be
|
|
219
219
|
} = De({
|
|
220
220
|
async request(e) {
|
|
221
|
-
var a,
|
|
222
|
-
if (!
|
|
221
|
+
var a, t;
|
|
222
|
+
if (!T.value.preserveSelectedRowKeys && g(o.dataSource) && x.clearAll(), !g(o.dataSource))
|
|
223
223
|
return {
|
|
224
224
|
data: o.dataSource || [],
|
|
225
225
|
total: o.dataSource.length || 0
|
|
226
226
|
};
|
|
227
|
-
const
|
|
228
|
-
return (
|
|
229
|
-
data: (
|
|
230
|
-
total: (
|
|
227
|
+
const r = await ((a = o.request) == null ? void 0 : a.call(o, e));
|
|
228
|
+
return (t = o.onLoad) == null || t.call(o, (r == null ? void 0 : r.data) || []), {
|
|
229
|
+
data: (r == null ? void 0 : r.data) || [],
|
|
230
|
+
total: (r == null ? void 0 : r.total) || 0
|
|
231
231
|
};
|
|
232
232
|
},
|
|
233
233
|
filterFields: pe,
|
|
@@ -239,55 +239,55 @@ const No = /* @__PURE__ */ ze({
|
|
|
239
239
|
pagination: o.pagination
|
|
240
240
|
}), Se = () => {
|
|
241
241
|
var a;
|
|
242
|
-
let e = ((a = o.columns) == null ? void 0 : a.filter((
|
|
243
|
-
function
|
|
244
|
-
return
|
|
242
|
+
let e = ((a = o.columns) == null ? void 0 : a.filter((t) => !t.hideInTable)) || [];
|
|
243
|
+
function r(t, d) {
|
|
244
|
+
return t.map((n) => ({
|
|
245
245
|
resizable: Ye(n.resizable) ? n.resizable : o.columnResizable,
|
|
246
246
|
...re(He(n), ["ellipsis"]),
|
|
247
247
|
...be(n),
|
|
248
248
|
fixed: d ? d.fixed : n.fixed,
|
|
249
|
-
title: Ue(n,
|
|
249
|
+
title: Ue(n, K("table-header", "title"), C.headerCell, l(de).colorPrimary),
|
|
250
250
|
customRender({
|
|
251
|
-
value:
|
|
252
|
-
...
|
|
251
|
+
value: f,
|
|
252
|
+
...S
|
|
253
253
|
}) {
|
|
254
254
|
var M, G;
|
|
255
|
-
const U = qe(n),
|
|
255
|
+
const U = qe(n), xe = Me({
|
|
256
256
|
...n,
|
|
257
257
|
valueType: U
|
|
258
258
|
}, {
|
|
259
|
-
value:
|
|
260
|
-
...
|
|
261
|
-
}),
|
|
262
|
-
value:
|
|
263
|
-
...
|
|
264
|
-
})) ||
|
|
265
|
-
value:
|
|
266
|
-
...
|
|
267
|
-
})]) :
|
|
268
|
-
let
|
|
269
|
-
return n.customRender && (
|
|
270
|
-
value:
|
|
271
|
-
...
|
|
259
|
+
value: f,
|
|
260
|
+
...S
|
|
261
|
+
}), ke = Ge(U, xe, S.record, l(O)), q = ((M = n.renderText) == null ? void 0 : M.call(n, {
|
|
262
|
+
value: f,
|
|
263
|
+
...S
|
|
264
|
+
})) || f, Be = n.renderText ? p(J, null, [(G = n.renderText) == null ? void 0 : G.call(n, {
|
|
265
|
+
value: f,
|
|
266
|
+
...S
|
|
267
|
+
})]) : ke;
|
|
268
|
+
let N = Re(n, q, Be);
|
|
269
|
+
return n.customRender && (N = n.customRender({
|
|
270
|
+
value: f,
|
|
271
|
+
...S,
|
|
272
272
|
column: n,
|
|
273
|
-
originalNode:
|
|
273
|
+
originalNode: N,
|
|
274
274
|
originalText: q
|
|
275
|
-
})),
|
|
275
|
+
})), N;
|
|
276
276
|
},
|
|
277
|
-
children:
|
|
277
|
+
children: r(n.children || [], d || n)
|
|
278
278
|
}));
|
|
279
279
|
}
|
|
280
|
-
return
|
|
280
|
+
return r(e);
|
|
281
281
|
};
|
|
282
282
|
Ne(() => {
|
|
283
283
|
const e = Se();
|
|
284
284
|
u.value = e, D.value = e;
|
|
285
285
|
});
|
|
286
286
|
const he = s(() => {
|
|
287
|
-
var
|
|
288
|
-
if (o.adaptive && (
|
|
287
|
+
var r, a;
|
|
288
|
+
if (o.adaptive && (b.total > 0 || ((r = o.dataSource) == null ? void 0 : r.length)))
|
|
289
289
|
return {
|
|
290
|
-
y:
|
|
290
|
+
y: l(ie),
|
|
291
291
|
x: ((a = o.scroll) == null ? void 0 : a.x) || "100%"
|
|
292
292
|
};
|
|
293
293
|
if (o.scroll)
|
|
@@ -296,26 +296,29 @@ const No = /* @__PURE__ */ ze({
|
|
|
296
296
|
var e;
|
|
297
297
|
if (o.tableLayout)
|
|
298
298
|
return o.tableLayout;
|
|
299
|
-
if ((e = o.columns) != null && e.some((
|
|
299
|
+
if ((e = o.columns) != null && e.some((r) => r.ellipsis))
|
|
300
300
|
return "fixed";
|
|
301
301
|
}), H = s(() => {
|
|
302
302
|
var a;
|
|
303
|
-
const e =
|
|
303
|
+
const e = l(_), r = l(T);
|
|
304
304
|
return {
|
|
305
305
|
...o,
|
|
306
306
|
...e,
|
|
307
307
|
rowSelection: o.rowSelection === !0 || ((a = o.rowSelection) == null ? void 0 : a.mode) === "internal" ? {
|
|
308
|
-
...
|
|
308
|
+
...r,
|
|
309
309
|
// tips 如果是前端分页,则默认会走缓存
|
|
310
|
-
preserveSelectedRowKeys:
|
|
310
|
+
preserveSelectedRowKeys: g(o.dataSource) ? r.preserveSelectedRowKeys : !0
|
|
311
311
|
} : Je(o.rowSelection),
|
|
312
|
-
loading:
|
|
312
|
+
loading: g(o.loading) ? e.loading : o.loading,
|
|
313
313
|
pagination: o.pagination === !1 ? !1 : e.pagination,
|
|
314
|
-
scroll:
|
|
314
|
+
scroll: l(he)
|
|
315
315
|
};
|
|
316
|
-
}),
|
|
317
|
-
|
|
318
|
-
return
|
|
316
|
+
}), ve = s(() => {
|
|
317
|
+
var e;
|
|
318
|
+
return [c(), o.card ? null : c("wrapper"), o.adaptive ? c("adaptive") : null, A.value && ((e = i.value) != null && e.visible) ? ue(`sticky-${oo === 0 ? "absolute" : "relative"}`) : null].filter(Boolean);
|
|
319
|
+
});
|
|
320
|
+
function Re(e, r, a) {
|
|
321
|
+
return ae.includes(e.valueType) ? a : e.copyable || e.ellipsis ? p(to, {
|
|
319
322
|
copyable: e.copyable,
|
|
320
323
|
ellipsis: e.ellipsis ? $e(e.ellipsis) ? {
|
|
321
324
|
tooltip: a,
|
|
@@ -327,59 +330,68 @@ const No = /* @__PURE__ */ ze({
|
|
|
327
330
|
content: a
|
|
328
331
|
}, null) : a;
|
|
329
332
|
}
|
|
330
|
-
Q(() =>
|
|
331
|
-
var
|
|
332
|
-
(
|
|
333
|
+
Q(() => l(b).loading, (e) => {
|
|
334
|
+
var r;
|
|
335
|
+
(r = o.onLoadingChange) == null || r.call(o, e);
|
|
333
336
|
}), Q(() => o.dataSource, (e) => {
|
|
334
337
|
ge(e);
|
|
335
338
|
}, {
|
|
336
339
|
immediate: !0
|
|
337
340
|
});
|
|
338
|
-
function
|
|
339
|
-
var
|
|
340
|
-
(
|
|
341
|
+
function Ce(e) {
|
|
342
|
+
var r, a, t;
|
|
343
|
+
(t = (a = (r = P.value) == null ? void 0 : r.apForm) == null ? void 0 : a.setFieldsValue) == null || t.call(a, e);
|
|
341
344
|
}
|
|
342
345
|
function Te(e = !1) {
|
|
343
|
-
var a,
|
|
344
|
-
const
|
|
345
|
-
return (d = (
|
|
346
|
+
var a, t, d;
|
|
347
|
+
const r = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
348
|
+
return (d = (t = (a = P.value) == null ? void 0 : a.apForm) == null ? void 0 : t[r]) == null ? void 0 : d.call(t, !0);
|
|
346
349
|
}
|
|
347
|
-
function
|
|
348
|
-
return
|
|
350
|
+
function Fe() {
|
|
351
|
+
return l(u);
|
|
349
352
|
}
|
|
350
353
|
return se({
|
|
351
354
|
submit: () => W(),
|
|
352
355
|
reset: () => j(),
|
|
353
356
|
refresh: () => ye(),
|
|
354
|
-
setSearchFormValues:
|
|
357
|
+
setSearchFormValues: Ce,
|
|
355
358
|
getSearchFormValues: Te,
|
|
356
|
-
getShownColumns:
|
|
357
|
-
dataSource: s(() =>
|
|
359
|
+
getShownColumns: Fe,
|
|
360
|
+
dataSource: s(() => l(b).records),
|
|
358
361
|
rowSelection: {
|
|
359
|
-
selectedRows: s(() =>
|
|
360
|
-
...
|
|
362
|
+
selectedRows: s(() => l(F)),
|
|
363
|
+
...x
|
|
361
364
|
},
|
|
362
365
|
scrollBar: {
|
|
363
|
-
x:
|
|
366
|
+
x: {
|
|
367
|
+
getCurrentScroll: () => {
|
|
368
|
+
var e;
|
|
369
|
+
return ((e = i == null ? void 0 : i.value) == null ? void 0 : e.currentScroll) ?? 0;
|
|
370
|
+
},
|
|
371
|
+
scroll: (e) => {
|
|
372
|
+
var r, a;
|
|
373
|
+
return (a = (r = i == null ? void 0 : i.value) == null ? void 0 : r.scroll) == null ? void 0 : a.call(r, e);
|
|
374
|
+
}
|
|
375
|
+
},
|
|
364
376
|
y: void 0
|
|
365
377
|
}
|
|
366
|
-
}), (e,
|
|
378
|
+
}), (e, r) => (m(), k("div", {
|
|
367
379
|
ref_key: "tableWrapperRef",
|
|
368
|
-
ref:
|
|
369
|
-
class:
|
|
370
|
-
}, [
|
|
380
|
+
ref: L,
|
|
381
|
+
class: y(ve.value)
|
|
382
|
+
}, [l(g)(e.dataSource) && e.searchForm !== !1 && $.value.length > 0 ? (m(), k("div", {
|
|
371
383
|
key: 0,
|
|
372
|
-
class:
|
|
384
|
+
class: y(e.card ? l(B)("search-wrapper") : null),
|
|
373
385
|
style: X(e.searchFormWrapperStyle)
|
|
374
|
-
}, [
|
|
386
|
+
}, [p(l(Ae).SearchForm, w(e.searchForm || {}, {
|
|
375
387
|
ref_key: "formRef",
|
|
376
|
-
ref:
|
|
388
|
+
ref: P,
|
|
377
389
|
"custom-reset": "",
|
|
378
|
-
"submit-loading":
|
|
379
|
-
onSubmit:
|
|
380
|
-
onReset:
|
|
390
|
+
"submit-loading": l(_).loading,
|
|
391
|
+
onSubmit: l(W),
|
|
392
|
+
onReset: l(j)
|
|
381
393
|
}), Y({
|
|
382
|
-
default:
|
|
394
|
+
default: v(() => [(m(!0), k(J, null, Z($.value, (a) => (m(), ee(Ie(a.renderNode.Comp), w({
|
|
383
395
|
key: a.dataIndex,
|
|
384
396
|
item: a,
|
|
385
397
|
ref_for: !0
|
|
@@ -390,65 +402,65 @@ const No = /* @__PURE__ */ ze({
|
|
|
390
402
|
_: 2
|
|
391
403
|
}, [C.searchFormExtra ? {
|
|
392
404
|
name: "extra",
|
|
393
|
-
fn:
|
|
405
|
+
fn: v(() => [R(e.$slots, "searchFormExtra")]),
|
|
394
406
|
key: "0"
|
|
395
|
-
} : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) : oe("", !0),
|
|
407
|
+
} : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) : oe("", !0), I("div", {
|
|
396
408
|
ref_key: "contentRef",
|
|
397
409
|
ref: ce,
|
|
398
|
-
class:
|
|
410
|
+
class: y([l(B)("table-wrapper"), e.card ? l(B)("table-wrapper-card") : null]),
|
|
399
411
|
style: X(e.tableWrapperStyle)
|
|
400
|
-
}, [
|
|
401
|
-
class:
|
|
402
|
-
}, [e.settings ? (
|
|
412
|
+
}, [I("div", {
|
|
413
|
+
class: y(l(c)("header-wrapper"))
|
|
414
|
+
}, [e.settings ? (m(), k("div", {
|
|
403
415
|
key: 0,
|
|
404
|
-
class:
|
|
405
|
-
}, [
|
|
406
|
-
class:
|
|
407
|
-
}, [R(e.$slots, "title",
|
|
408
|
-
selectedRows:
|
|
409
|
-
selectedRowKeys:
|
|
416
|
+
class: y(l(c)("header"))
|
|
417
|
+
}, [I("div", {
|
|
418
|
+
class: y(l(K)("header", "title"))
|
|
419
|
+
}, [R(e.$slots, "title", w({
|
|
420
|
+
selectedRows: l(F),
|
|
421
|
+
selectedRowKeys: l(T).selectedRowKeys,
|
|
410
422
|
shownColumns: u.value
|
|
411
|
-
},
|
|
423
|
+
}, x))], 2), C.title ? (m(), ee(l(Oe), {
|
|
412
424
|
key: 0,
|
|
413
425
|
type: "vertical"
|
|
414
|
-
})) : oe("", !0),
|
|
426
|
+
})) : oe("", !0), p(lo, {
|
|
415
427
|
config: e.settings === !0 ? {} : e.settings
|
|
416
|
-
}, null, 8, ["config"])], 2)) : R(e.$slots, "title",
|
|
428
|
+
}, null, 8, ["config"])], 2)) : R(e.$slots, "title", w({
|
|
417
429
|
key: 1,
|
|
418
|
-
selectedRows:
|
|
419
|
-
selectedRowKeys:
|
|
430
|
+
selectedRows: l(F),
|
|
431
|
+
selectedRowKeys: l(T).selectedRowKeys,
|
|
420
432
|
shownColumns: u.value
|
|
421
|
-
},
|
|
433
|
+
}, x))], 2), p(l(Le), w({
|
|
422
434
|
ref_key: "antdTableRef",
|
|
423
|
-
ref:
|
|
424
|
-
class:
|
|
435
|
+
ref: V,
|
|
436
|
+
class: l(c)("table")
|
|
425
437
|
}, H.value, {
|
|
426
|
-
size:
|
|
438
|
+
size: z.value,
|
|
427
439
|
"table-layout": we.value,
|
|
428
440
|
columns: u.value,
|
|
429
|
-
onResizeColumn:
|
|
441
|
+
onResizeColumn: r[0] || (r[0] = (a, t) => t.width = a)
|
|
430
442
|
}), Y({
|
|
431
|
-
summary:
|
|
443
|
+
summary: v(() => [R(e.$slots, "summary", {
|
|
432
444
|
columns: u.value,
|
|
433
445
|
records: H.value.dataSource,
|
|
434
|
-
selectedRows:
|
|
446
|
+
selectedRows: l(F)
|
|
435
447
|
})]),
|
|
436
448
|
_: 2
|
|
437
|
-
}, [
|
|
449
|
+
}, [l(A) ? {
|
|
438
450
|
name: "bottomPaginationTop",
|
|
439
|
-
fn:
|
|
440
|
-
var a,
|
|
441
|
-
return [
|
|
451
|
+
fn: v(() => {
|
|
452
|
+
var a, t;
|
|
453
|
+
return [p(l(no), {
|
|
442
454
|
ref_key: "scrollBarRef",
|
|
443
|
-
ref:
|
|
444
|
-
"scroll-container": (
|
|
455
|
+
ref: i,
|
|
456
|
+
"scroll-container": (t = (a = V.value) == null ? void 0 : a.table) == null ? void 0 : t.scrollBodyRef,
|
|
445
457
|
direction: "horizontal"
|
|
446
458
|
}, null, 8, ["scroll-container"])];
|
|
447
459
|
}),
|
|
448
460
|
key: "0"
|
|
449
|
-
} : void 0, Z(
|
|
450
|
-
name:
|
|
451
|
-
fn:
|
|
461
|
+
} : void 0, Z(l(re)(C, ["title", "searchFormExtra", "headerCell", "summary"]), (a, t) => ({
|
|
462
|
+
name: t,
|
|
463
|
+
fn: v((d) => [R(e.$slots, t, Ee(Ke(d || {})))])
|
|
452
464
|
}))]), 1040, ["class", "size", "table-layout", "columns"])], 6)], 2));
|
|
453
465
|
}
|
|
454
466
|
});
|
|
@@ -8,8 +8,6 @@ import { ApActionGroupProps } from '../ap-action';
|
|
|
8
8
|
import { ApTableIndexProps } from './components/interface';
|
|
9
9
|
import { EllipsisConfig } from '@aplus-frontend/antdv/es/typography/Base';
|
|
10
10
|
import { RowSelectionReturnType } from './hooks/use-table-row-selection';
|
|
11
|
-
import { ScrollBarExpose } from '../scroll-bar/interface';
|
|
12
|
-
import { UnwrapRefProps } from '../utils';
|
|
13
11
|
export type ValueEnumType = {
|
|
14
12
|
text: string;
|
|
15
13
|
/**
|
|
@@ -374,7 +372,10 @@ export type ApTableExpose<SearchParamsType = Recordable, RecordType = any> = {
|
|
|
374
372
|
* 滚动条实例
|
|
375
373
|
*/
|
|
376
374
|
scrollBar: {
|
|
377
|
-
x:
|
|
378
|
-
|
|
375
|
+
x: {
|
|
376
|
+
getCurrentScroll: () => number;
|
|
377
|
+
scroll: (percent: number) => void | undefined;
|
|
378
|
+
};
|
|
379
|
+
y: undefined;
|
|
379
380
|
};
|
|
380
381
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { OpenOptions, UseCreateTableModalProps, OpenReturnType } from '../interface';
|
|
2
2
|
import { Recordable } from '../../../type';
|
|
3
3
|
import { TableColumnsType } from '@aplus-frontend/antdv';
|
|
4
|
-
import { UnwrapRefProps } from '../../../utils';
|
|
5
|
-
import { ScrollBarExpose } from '../../../scroll-bar';
|
|
6
4
|
export declare function useCreateTableModal(props: UseCreateTableModalProps): {
|
|
7
5
|
readonly openModal: <T>(selected?: any[], options?: OpenOptions) => Promise< OpenReturnType<T> | undefined>;
|
|
8
6
|
readonly closeModal: () => void;
|
|
@@ -28,8 +26,11 @@ export declare function useCreateTableModal(props: UseCreateTableModalProps): {
|
|
|
28
26
|
} | undefined;
|
|
29
27
|
getShownColumns: () => TableColumnsType<any>;
|
|
30
28
|
scrollBar: {
|
|
31
|
-
x:
|
|
32
|
-
|
|
29
|
+
x: {
|
|
30
|
+
getCurrentScroll: () => number;
|
|
31
|
+
scroll: (percent: number) => void | undefined;
|
|
32
|
+
};
|
|
33
|
+
y: undefined;
|
|
33
34
|
};
|
|
34
35
|
} | null | undefined;
|
|
35
36
|
readonly isDestroyed: true;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { ApTableModalProps, OpenOptions } from '../interface';
|
|
2
2
|
import { Recordable } from '../../../type';
|
|
3
3
|
import { TableColumnsType } from '@aplus-frontend/antdv';
|
|
4
|
-
import { UnwrapRefProps } from '../../../utils';
|
|
5
|
-
import { ScrollBarExpose } from '../../..';
|
|
6
4
|
/** 函数式调用弹框表格 */
|
|
7
5
|
export declare function useTableModal<TableRowType = Record<string, any>>(props: ApTableModalProps<TableRowType>): {
|
|
8
6
|
reloadApTableData: () => void;
|
|
@@ -26,8 +24,11 @@ export declare function useTableModal<TableRowType = Record<string, any>>(props:
|
|
|
26
24
|
} | undefined;
|
|
27
25
|
getShownColumns: () => TableColumnsType<any>;
|
|
28
26
|
scrollBar: {
|
|
29
|
-
x:
|
|
30
|
-
|
|
27
|
+
x: {
|
|
28
|
+
getCurrentScroll: () => number;
|
|
29
|
+
scroll: (percent: number) => void | undefined;
|
|
30
|
+
};
|
|
31
|
+
y: undefined;
|
|
31
32
|
};
|
|
32
33
|
} | null | undefined;
|
|
33
34
|
isDestroyed: true;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { OpenOptions, UseTableSelectModalProps } from '../interface';
|
|
2
2
|
import { Recordable } from '../../../type';
|
|
3
3
|
import { TableColumnsType } from '@aplus-frontend/antdv';
|
|
4
|
-
import { UnwrapRefProps } from '../../../utils';
|
|
5
|
-
import { ScrollBarExpose } from '../../..';
|
|
6
4
|
export declare function useTableSelectModal<TableRowType = Record<string, any>>(props: UseTableSelectModalProps<TableRowType>): {
|
|
7
5
|
reloadApTableData: () => void;
|
|
8
6
|
resetApTableData: () => void;
|
|
@@ -25,8 +23,11 @@ export declare function useTableSelectModal<TableRowType = Record<string, any>>(
|
|
|
25
23
|
} | undefined;
|
|
26
24
|
getShownColumns: () => TableColumnsType<any>;
|
|
27
25
|
scrollBar: {
|
|
28
|
-
x:
|
|
29
|
-
|
|
26
|
+
x: {
|
|
27
|
+
getCurrentScroll: () => number;
|
|
28
|
+
scroll: (percent: number) => void | undefined;
|
|
29
|
+
};
|
|
30
|
+
y: undefined;
|
|
30
31
|
};
|
|
31
32
|
} | null | undefined;
|
|
32
33
|
isDestroyed: true;
|
|
@@ -4,8 +4,6 @@ import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicP
|
|
|
4
4
|
import { ApTableModalProps, OpenOptions, OpenReturnType } from './interface';
|
|
5
5
|
import { Recordable } from '../../type';
|
|
6
6
|
import { TableColumnsType } from '@aplus-frontend/antdv';
|
|
7
|
-
import { UnwrapRefProps } from '../../utils';
|
|
8
|
-
import { ScrollBarExpose } from '../..';
|
|
9
7
|
/**
|
|
10
8
|
*
|
|
11
9
|
*/
|
|
@@ -34,8 +32,11 @@ declare const ApTableModal: {
|
|
|
34
32
|
} | undefined;
|
|
35
33
|
getShownColumns: () => TableColumnsType<any>;
|
|
36
34
|
scrollBar: {
|
|
37
|
-
x:
|
|
38
|
-
|
|
35
|
+
x: {
|
|
36
|
+
getCurrentScroll: () => number;
|
|
37
|
+
scroll: (percent: number) => void | undefined;
|
|
38
|
+
};
|
|
39
|
+
y: undefined;
|
|
39
40
|
};
|
|
40
41
|
} | null;
|
|
41
42
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
@@ -77,7 +78,10 @@ declare const ApTableModal: {
|
|
|
77
78
|
selectedRows: ComputedRef<any[]>;
|
|
78
79
|
};
|
|
79
80
|
scrollBar: {
|
|
80
|
-
x:
|
|
81
|
+
x: {
|
|
82
|
+
getCurrentScroll: () => 0 | Ref<number, number>;
|
|
83
|
+
scroll: (percent: number) => void | undefined;
|
|
84
|
+
};
|
|
81
85
|
y: undefined;
|
|
82
86
|
};
|
|
83
87
|
}> | null;
|
|
@@ -112,8 +116,11 @@ declare const ApTableModal: {
|
|
|
112
116
|
} | undefined;
|
|
113
117
|
getShownColumns: () => TableColumnsType<any>;
|
|
114
118
|
scrollBar: {
|
|
115
|
-
x:
|
|
116
|
-
|
|
119
|
+
x: {
|
|
120
|
+
getCurrentScroll: () => number;
|
|
121
|
+
scroll: (percent: number) => void | undefined;
|
|
122
|
+
};
|
|
123
|
+
y: undefined;
|
|
117
124
|
};
|
|
118
125
|
} | null;
|
|
119
126
|
}, {}, {}, {}, {
|
|
@@ -161,8 +168,11 @@ declare const ApTableModal: {
|
|
|
161
168
|
} | undefined;
|
|
162
169
|
getShownColumns: () => TableColumnsType<any>;
|
|
163
170
|
scrollBar: {
|
|
164
|
-
x:
|
|
165
|
-
|
|
171
|
+
x: {
|
|
172
|
+
getCurrentScroll: () => number;
|
|
173
|
+
scroll: (percent: number) => void | undefined;
|
|
174
|
+
};
|
|
175
|
+
y: undefined;
|
|
166
176
|
};
|
|
167
177
|
} | null;
|
|
168
178
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|