@aplus-frontend/ui 0.4.14 → 0.4.16
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.vue2.mjs +203 -179
- package/es/src/ap-table/hooks/use-sticky-scroll.d.ts +6 -0
- package/es/src/ap-table/hooks/use-sticky-scroll.mjs +16 -0
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +1 -1
- package/es/src/ap-upload/apUpload.vue.d.ts +9 -0
- package/es/src/ap-upload/apUpload.vue.mjs +22 -18
- package/es/src/ap-upload/components/MultipleFile.vue2.mjs +66 -66
- package/es/src/ap-upload/components/Picture.vue2.mjs +82 -82
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +114 -114
- package/es/src/config-provider/config-provider.d.ts +3 -0
- package/es/src/config-provider/css-var.d.ts +4 -0
- package/es/src/config-provider/css-var.mjs +22 -14
- package/es/src/config-provider/index.d.ts +15 -0
- package/es/src/scroll-bar/index.vue.d.ts +2 -0
- package/es/src/scroll-bar/index.vue.mjs +40 -35
- package/es/src/scroll-bar/interface.d.ts +4 -1
- package/es/src/theme/antd-global-overwrite/admin/index.css +24 -2
- package/es/src/theme/antd-global-overwrite/admin/table.css +24 -2
- package/es/src/theme/antd-global-overwrite/aplus/index.css +24 -2
- package/es/src/theme/antd-global-overwrite/aplus/table.css +24 -2
- package/es/src/utils/index.d.ts +1 -0
- package/es/src/utils/index.mjs +40 -30
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/hooks/use-sticky-scroll.d.ts +6 -0
- package/lib/src/ap-table/hooks/use-sticky-scroll.js +1 -0
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/ap-upload/apUpload.vue.d.ts +9 -0
- package/lib/src/ap-upload/apUpload.vue.js +1 -1
- package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
- package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +3 -0
- package/lib/src/config-provider/css-var.d.ts +4 -0
- package/lib/src/config-provider/css-var.js +1 -1
- package/lib/src/config-provider/index.d.ts +15 -0
- package/lib/src/scroll-bar/index.vue.d.ts +2 -0
- package/lib/src/scroll-bar/index.vue.js +1 -1
- package/lib/src/scroll-bar/interface.d.ts +4 -1
- package/lib/src/theme/antd-global-overwrite/admin/index.css +24 -2
- package/lib/src/theme/antd-global-overwrite/admin/table.css +24 -2
- package/lib/src/theme/antd-global-overwrite/aplus/index.css +24 -2
- package/lib/src/theme/antd-global-overwrite/aplus/table.css +24 -2
- package/lib/src/utils/index.d.ts +1 -0
- package/lib/src/utils/index.js +1 -1
- package/package.json +3 -3
- package/theme/antd-global-overwrite/admin/index.css +24 -2
- package/theme/antd-global-overwrite/admin/table.css +24 -2
- package/theme/antd-global-overwrite/admin/table.less +8 -2
- package/theme/antd-global-overwrite/aplus/index.css +24 -2
- package/theme/antd-global-overwrite/aplus/table.css +24 -2
- package/theme/antd-global-overwrite/aplus/table.less +7 -2
- package/theme/ap-table/ap-table.css +9 -0
- package/theme/ap-table/ap-table.less +20 -8
- package/theme/ap-table-modal/index.css +9 -0
- package/theme/index.css +9 -0
|
@@ -1,23 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Divider as
|
|
3
|
-
import { useToken as
|
|
4
|
-
import { ApForm as
|
|
5
|
-
import { noRenderAsFormItemValueList as
|
|
1
|
+
import { defineComponent as ze, useSlots as Pe, ref as S, computed as s, unref as t, createVNode as f, Fragment as G, watchEffect as Ne, watch as J, openBlock as p, createElementBlock as B, normalizeClass as m, normalizeStyle as Q, mergeProps as h, createSlots as X, withCtx as w, renderList as Y, createBlock as Z, resolveDynamicComponent as Ie, renderSlot as R, createCommentVNode as ee, createElementVNode as N, normalizeProps as Ee, guardReactiveProps as Ke } from "vue";
|
|
2
|
+
import { Divider as Oe, Table as Le } from "@aplus-frontend/antdv";
|
|
3
|
+
import { useToken as Ve } from "@aplus-frontend/antdv/es/theme/internal";
|
|
4
|
+
import { ApForm as Ae } from "../ap-form/index.mjs";
|
|
5
|
+
import { noRenderAsFormItemValueList as oe } from "./constants.mjs";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
|
-
import { useTablePaging as
|
|
8
|
-
import { isUndefined as
|
|
9
|
-
import { getColumnOrder as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { isDef as
|
|
7
|
+
import { useTablePaging as De } from "./hooks/use-table-paging-ng.mjs";
|
|
8
|
+
import { isUndefined as y, omit as ae, isBoolean as $e } from "lodash-unified";
|
|
9
|
+
import { getColumnOrder as re, updateFormProps as We, getFieldProps as je, getSearchFormItemRenderNode as _e, recursionApColumns as te, apColumnToColumn as He, getTableTitle as Ue, getTableRenderType as qe, getTableRenderProps as Me, getTableCellRenderNode as Ge, falseToUndefined as Je } from "./utils.mjs";
|
|
10
|
+
import Qe from "./hooks/use-table-content-height.mjs";
|
|
11
|
+
import Xe from "./hooks/use-table-row-selection.mjs";
|
|
12
|
+
import { 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
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
|
|
15
|
+
import { useProvideApTable as Ze } from "./context.mjs";
|
|
16
|
+
import "../scroll-bar/index.mjs";
|
|
17
|
+
import { useStickyScroll as eo } from "./hooks/use-sticky-scroll.mjs";
|
|
18
|
+
import { scrollbarSize as oo } from "../config-provider/css-var.mjs";
|
|
19
|
+
import { useNamespace as ao } from "../config-provider/hooks/use-namespace.mjs";
|
|
20
|
+
import { useGlobalConfig as ro } from "../config-provider/hooks/use-global-config.mjs";
|
|
21
|
+
import to from "./components/paragraph-ellipsis/index.vue2.mjs";
|
|
22
|
+
import lo from "./components/setting/modal/index.vue2.mjs";
|
|
23
|
+
import no from "../scroll-bar/index.vue.mjs";
|
|
24
|
+
const No = /* @__PURE__ */ ze({
|
|
21
25
|
name: "ApTable",
|
|
22
26
|
__name: "ap-table",
|
|
23
27
|
props: {
|
|
@@ -141,175 +145,179 @@ const bo = /* @__PURE__ */ Te({
|
|
|
141
145
|
default: void 0
|
|
142
146
|
}
|
|
143
147
|
},
|
|
144
|
-
setup(
|
|
145
|
-
expose:
|
|
148
|
+
setup(le, {
|
|
149
|
+
expose: ne
|
|
146
150
|
}) {
|
|
147
|
-
const o =
|
|
151
|
+
const o = le;
|
|
148
152
|
let I = 0;
|
|
149
|
-
const
|
|
153
|
+
const C = Pe(), [, se] = Ve(), {
|
|
150
154
|
e: x,
|
|
151
155
|
b: i,
|
|
152
|
-
be: E
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
be: E,
|
|
157
|
+
m: de
|
|
158
|
+
} = ao("ap-table"), K = ro("valueTypeMap"), {
|
|
159
|
+
height: ue,
|
|
160
|
+
contentRef: ie
|
|
161
|
+
} = Qe(), O = S(), L = S(), {
|
|
162
|
+
isStickyMode: V,
|
|
163
|
+
scrollBarRef: ce
|
|
164
|
+
} = eo(O), k = S(o.size), u = S([]), A = S([]);
|
|
165
|
+
Ze({
|
|
158
166
|
columns: s(() => u.value),
|
|
159
|
-
columnsBackup: s(() =>
|
|
160
|
-
size: s(() =>
|
|
167
|
+
columnsBackup: s(() => A.value),
|
|
168
|
+
size: s(() => k.value),
|
|
161
169
|
updateColumns(e) {
|
|
162
170
|
u.value = e;
|
|
163
171
|
},
|
|
164
172
|
updateSize(e) {
|
|
165
|
-
|
|
173
|
+
k.value = e;
|
|
166
174
|
},
|
|
167
|
-
dataSource: s(() => t(
|
|
175
|
+
dataSource: s(() => t(g).records)
|
|
168
176
|
});
|
|
169
|
-
const
|
|
170
|
-
var e,
|
|
171
|
-
return I++, ((a = (
|
|
172
|
-
let n =
|
|
173
|
-
return
|
|
174
|
-
})) == null ? void 0 : a.map((
|
|
175
|
-
const d =
|
|
176
|
-
...
|
|
177
|
+
const D = s(() => {
|
|
178
|
+
var e, l, a;
|
|
179
|
+
return I++, ((a = (l = (e = o.columns) == null ? void 0 : e.filter((r) => !r.hideInSearch && r.dataIndex && (r.valueType || r.customRenderFormItem) && !oe.includes(r.valueType))) == null ? void 0 : l.sort((r, d) => {
|
|
180
|
+
let n = re(r.order);
|
|
181
|
+
return re(d.order) - n;
|
|
182
|
+
})) == null ? void 0 : a.map((r) => {
|
|
183
|
+
const d = We(r, je(r.fieldProps, {})), n = {
|
|
184
|
+
...r,
|
|
177
185
|
fieldProps: {
|
|
178
|
-
label:
|
|
179
|
-
name:
|
|
186
|
+
label: r.title,
|
|
187
|
+
name: r.dataIndex,
|
|
180
188
|
...d || {},
|
|
181
189
|
_signal: I
|
|
182
190
|
},
|
|
183
191
|
renderNode: void 0
|
|
184
192
|
};
|
|
185
|
-
return n.renderNode =
|
|
193
|
+
return n.renderNode = _e(n, t(K)), n;
|
|
186
194
|
})) || [];
|
|
187
|
-
}),
|
|
195
|
+
}), fe = s(() => te(t(u), (e) => {
|
|
188
196
|
if (e.sorter === !0)
|
|
189
197
|
return e.key || e.dataIndex;
|
|
190
|
-
}).filter(Boolean)),
|
|
198
|
+
}).filter(Boolean)), pe = s(() => te(t(u), (e) => {
|
|
191
199
|
if (e.filters && !e.onFilter)
|
|
192
200
|
return e.key || e.dataIndex;
|
|
193
|
-
}).filter(Boolean)),
|
|
194
|
-
rowSelection:
|
|
195
|
-
selectedRows:
|
|
196
|
-
...
|
|
197
|
-
} =
|
|
201
|
+
}).filter(Boolean)), me = s(() => y(o.dataSource) ? g.records : o.dataSource), {
|
|
202
|
+
rowSelection: v,
|
|
203
|
+
selectedRows: T,
|
|
204
|
+
...F
|
|
205
|
+
} = Xe({
|
|
198
206
|
fixed: !0,
|
|
199
207
|
...o.rowSelection === !0 ? {} : o.rowSelection,
|
|
200
208
|
rowKey: o.rowKey,
|
|
201
|
-
dataSource:
|
|
209
|
+
dataSource: me
|
|
202
210
|
}), {
|
|
203
|
-
formRef:
|
|
204
|
-
submit:
|
|
205
|
-
reset:
|
|
206
|
-
tableProps:
|
|
207
|
-
refresh:
|
|
208
|
-
data:
|
|
209
|
-
setDataSource:
|
|
210
|
-
getColumnSFConfig:
|
|
211
|
-
} =
|
|
211
|
+
formRef: z,
|
|
212
|
+
submit: $,
|
|
213
|
+
reset: W,
|
|
214
|
+
tableProps: j,
|
|
215
|
+
refresh: ye,
|
|
216
|
+
data: g,
|
|
217
|
+
setDataSource: ge,
|
|
218
|
+
getColumnSFConfig: be
|
|
219
|
+
} = De({
|
|
212
220
|
async request(e) {
|
|
213
|
-
var a,
|
|
214
|
-
if (!
|
|
221
|
+
var a, r;
|
|
222
|
+
if (!v.value.preserveSelectedRowKeys && y(o.dataSource) && F.clearAll(), !y(o.dataSource))
|
|
215
223
|
return {
|
|
216
224
|
data: o.dataSource || [],
|
|
217
225
|
total: o.dataSource.length || 0
|
|
218
226
|
};
|
|
219
|
-
const
|
|
220
|
-
return (
|
|
221
|
-
data: (
|
|
222
|
-
total: (
|
|
227
|
+
const l = await ((a = o.request) == null ? void 0 : a.call(o, e));
|
|
228
|
+
return (r = o.onLoad) == null || r.call(o, (l == null ? void 0 : l.data) || []), {
|
|
229
|
+
data: (l == null ? void 0 : l.data) || [],
|
|
230
|
+
total: (l == null ? void 0 : l.total) || 0
|
|
223
231
|
};
|
|
224
232
|
},
|
|
225
|
-
filterFields:
|
|
226
|
-
sortFields:
|
|
233
|
+
filterFields: pe,
|
|
234
|
+
sortFields: fe,
|
|
227
235
|
defaultParams: o.params,
|
|
228
236
|
defaultData: o.defaultData,
|
|
229
237
|
manual: o.manual,
|
|
230
238
|
formatParams: o.beforeSearchSubmit,
|
|
231
239
|
pagination: o.pagination
|
|
232
|
-
}),
|
|
240
|
+
}), Se = () => {
|
|
233
241
|
var a;
|
|
234
|
-
let e = ((a = o.columns) == null ? void 0 : a.filter((
|
|
235
|
-
function r
|
|
236
|
-
return
|
|
237
|
-
resizable:
|
|
238
|
-
...
|
|
239
|
-
...
|
|
242
|
+
let e = ((a = o.columns) == null ? void 0 : a.filter((r) => !r.hideInTable)) || [];
|
|
243
|
+
function l(r, d) {
|
|
244
|
+
return r.map((n) => ({
|
|
245
|
+
resizable: Ye(n.resizable) ? n.resizable : o.columnResizable,
|
|
246
|
+
...ae(He(n), ["ellipsis"]),
|
|
247
|
+
...be(n),
|
|
240
248
|
fixed: d ? d.fixed : n.fixed,
|
|
241
|
-
title:
|
|
249
|
+
title: Ue(n, E("table-header", "title"), C.headerCell, t(se).colorPrimary),
|
|
242
250
|
customRender({
|
|
243
251
|
value: c,
|
|
244
|
-
...
|
|
252
|
+
...b
|
|
245
253
|
}) {
|
|
246
|
-
var
|
|
247
|
-
const
|
|
254
|
+
var q, M;
|
|
255
|
+
const H = qe(n), Be = Me({
|
|
248
256
|
...n,
|
|
249
|
-
valueType:
|
|
257
|
+
valueType: H
|
|
250
258
|
}, {
|
|
251
259
|
value: c,
|
|
252
|
-
...
|
|
253
|
-
}),
|
|
260
|
+
...b
|
|
261
|
+
}), xe = Ge(H, Be, b.record, t(K)), U = ((q = n.renderText) == null ? void 0 : q.call(n, {
|
|
254
262
|
value: c,
|
|
255
|
-
...
|
|
256
|
-
})) || c,
|
|
263
|
+
...b
|
|
264
|
+
})) || c, ke = n.renderText ? f(G, null, [(M = n.renderText) == null ? void 0 : M.call(n, {
|
|
257
265
|
value: c,
|
|
258
|
-
...
|
|
259
|
-
})]) :
|
|
260
|
-
let
|
|
261
|
-
return n.customRender && (
|
|
266
|
+
...b
|
|
267
|
+
})]) : xe;
|
|
268
|
+
let P = Ce(n, U, ke);
|
|
269
|
+
return n.customRender && (P = n.customRender({
|
|
262
270
|
value: c,
|
|
263
|
-
...
|
|
271
|
+
...b,
|
|
264
272
|
column: n,
|
|
265
|
-
originalNode:
|
|
266
|
-
originalText:
|
|
267
|
-
})),
|
|
273
|
+
originalNode: P,
|
|
274
|
+
originalText: U
|
|
275
|
+
})), P;
|
|
268
276
|
},
|
|
269
|
-
children:
|
|
277
|
+
children: l(n.children || [], d || n)
|
|
270
278
|
}));
|
|
271
279
|
}
|
|
272
|
-
return
|
|
280
|
+
return l(e);
|
|
273
281
|
};
|
|
274
|
-
|
|
275
|
-
const e =
|
|
276
|
-
u.value = e,
|
|
282
|
+
Ne(() => {
|
|
283
|
+
const e = Se();
|
|
284
|
+
u.value = e, A.value = e;
|
|
277
285
|
});
|
|
278
|
-
const
|
|
279
|
-
var
|
|
280
|
-
if (o.adaptive && (
|
|
286
|
+
const he = s(() => {
|
|
287
|
+
var l, a;
|
|
288
|
+
if (o.adaptive && (g.total > 0 || ((l = o.dataSource) == null ? void 0 : l.length)))
|
|
281
289
|
return {
|
|
282
|
-
y: t(
|
|
290
|
+
y: t(ue),
|
|
283
291
|
x: ((a = o.scroll) == null ? void 0 : a.x) || "100%"
|
|
284
292
|
};
|
|
285
293
|
if (o.scroll)
|
|
286
294
|
return o.scroll;
|
|
287
|
-
}),
|
|
295
|
+
}), we = s(() => {
|
|
288
296
|
var e;
|
|
289
297
|
if (o.tableLayout)
|
|
290
298
|
return o.tableLayout;
|
|
291
|
-
if ((e = o.columns) != null && e.some((
|
|
299
|
+
if ((e = o.columns) != null && e.some((l) => l.ellipsis))
|
|
292
300
|
return "fixed";
|
|
293
|
-
}),
|
|
301
|
+
}), _ = s(() => {
|
|
294
302
|
var a;
|
|
295
|
-
const e = t(
|
|
303
|
+
const e = t(j), l = t(v);
|
|
296
304
|
return {
|
|
297
305
|
...o,
|
|
298
306
|
...e,
|
|
299
307
|
rowSelection: o.rowSelection === !0 || ((a = o.rowSelection) == null ? void 0 : a.mode) === "internal" ? {
|
|
300
|
-
...
|
|
308
|
+
...l,
|
|
301
309
|
// tips 如果是前端分页,则默认会走缓存
|
|
302
|
-
preserveSelectedRowKeys:
|
|
303
|
-
} :
|
|
304
|
-
loading:
|
|
310
|
+
preserveSelectedRowKeys: y(o.dataSource) ? l.preserveSelectedRowKeys : !0
|
|
311
|
+
} : Je(o.rowSelection),
|
|
312
|
+
loading: y(o.loading) ? e.loading : o.loading,
|
|
305
313
|
pagination: o.pagination === !1 ? !1 : e.pagination,
|
|
306
|
-
scroll: t(
|
|
314
|
+
scroll: t(he)
|
|
307
315
|
};
|
|
308
|
-
}),
|
|
309
|
-
function
|
|
310
|
-
return
|
|
316
|
+
}), Re = s(() => [i(), o.card ? null : i("wrapper"), o.adaptive ? i("adaptive") : null, V ? de(`sticky-${oo === 0 ? "absolute" : "relative"}`) : null].filter(Boolean));
|
|
317
|
+
function Ce(e, l, a) {
|
|
318
|
+
return oe.includes(e.valueType) ? a : e.copyable || e.ellipsis ? f(to, {
|
|
311
319
|
copyable: e.copyable,
|
|
312
|
-
ellipsis: e.ellipsis ?
|
|
320
|
+
ellipsis: e.ellipsis ? $e(e.ellipsis) ? {
|
|
313
321
|
tooltip: a,
|
|
314
322
|
rows: 1
|
|
315
323
|
} : {
|
|
@@ -319,53 +327,55 @@ const bo = /* @__PURE__ */ Te({
|
|
|
319
327
|
content: a
|
|
320
328
|
}, null) : a;
|
|
321
329
|
}
|
|
322
|
-
|
|
323
|
-
var
|
|
324
|
-
(
|
|
325
|
-
}),
|
|
326
|
-
|
|
330
|
+
J(() => t(g).loading, (e) => {
|
|
331
|
+
var l;
|
|
332
|
+
(l = o.onLoadingChange) == null || l.call(o, e);
|
|
333
|
+
}), J(() => o.dataSource, (e) => {
|
|
334
|
+
ge(e);
|
|
327
335
|
}, {
|
|
328
336
|
immediate: !0
|
|
329
337
|
});
|
|
330
|
-
function
|
|
331
|
-
var
|
|
332
|
-
(
|
|
338
|
+
function ve(e) {
|
|
339
|
+
var l, a, r;
|
|
340
|
+
(r = (a = (l = z.value) == null ? void 0 : l.apForm) == null ? void 0 : a.setFieldsValue) == null || r.call(a, e);
|
|
333
341
|
}
|
|
334
|
-
function
|
|
335
|
-
var a,
|
|
336
|
-
const
|
|
337
|
-
return (d = (
|
|
342
|
+
function Te(e = !1) {
|
|
343
|
+
var a, r, d;
|
|
344
|
+
const l = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
345
|
+
return (d = (r = (a = z.value) == null ? void 0 : a.apForm) == null ? void 0 : r[l]) == null ? void 0 : d.call(r, !0);
|
|
338
346
|
}
|
|
339
|
-
function
|
|
347
|
+
function Fe() {
|
|
340
348
|
return t(u);
|
|
341
349
|
}
|
|
342
|
-
return
|
|
343
|
-
submit: () =>
|
|
344
|
-
reset: () =>
|
|
345
|
-
refresh: () =>
|
|
346
|
-
setSearchFormValues:
|
|
347
|
-
getSearchFormValues:
|
|
348
|
-
getShownColumns:
|
|
349
|
-
dataSource: s(() => t(
|
|
350
|
+
return ne({
|
|
351
|
+
submit: () => $(),
|
|
352
|
+
reset: () => W(),
|
|
353
|
+
refresh: () => ye(),
|
|
354
|
+
setSearchFormValues: ve,
|
|
355
|
+
getSearchFormValues: Te,
|
|
356
|
+
getShownColumns: Fe,
|
|
357
|
+
dataSource: s(() => t(g).records),
|
|
350
358
|
rowSelection: {
|
|
351
|
-
selectedRows: s(() => t(
|
|
352
|
-
...
|
|
359
|
+
selectedRows: s(() => t(T)),
|
|
360
|
+
...F
|
|
353
361
|
}
|
|
354
|
-
}), (e,
|
|
355
|
-
|
|
356
|
-
|
|
362
|
+
}), (e, l) => (p(), B("div", {
|
|
363
|
+
ref_key: "tableWrapperRef",
|
|
364
|
+
ref: O,
|
|
365
|
+
class: m(Re.value)
|
|
366
|
+
}, [t(y)(e.dataSource) && e.searchForm !== !1 && D.value.length > 0 ? (p(), B("div", {
|
|
357
367
|
key: 0,
|
|
358
|
-
class:
|
|
359
|
-
style:
|
|
360
|
-
}, [
|
|
368
|
+
class: m(e.card ? t(x)("search-wrapper") : null),
|
|
369
|
+
style: Q(e.searchFormWrapperStyle)
|
|
370
|
+
}, [f(t(Ae).SearchForm, h(e.searchForm || {}, {
|
|
361
371
|
ref_key: "formRef",
|
|
362
|
-
ref:
|
|
372
|
+
ref: z,
|
|
363
373
|
"custom-reset": "",
|
|
364
|
-
"submit-loading": t(
|
|
365
|
-
onSubmit: t(
|
|
366
|
-
onReset: t(
|
|
367
|
-
}),
|
|
368
|
-
default:
|
|
374
|
+
"submit-loading": t(j).loading,
|
|
375
|
+
onSubmit: t($),
|
|
376
|
+
onReset: t(W)
|
|
377
|
+
}), X({
|
|
378
|
+
default: w(() => [(p(!0), B(G, null, Y(D.value, (a) => (p(), Z(Ie(a.renderNode.Comp), h({
|
|
369
379
|
key: a.dataIndex,
|
|
370
380
|
item: a,
|
|
371
381
|
ref_for: !0
|
|
@@ -374,56 +384,70 @@ const bo = /* @__PURE__ */ Te({
|
|
|
374
384
|
"custom-render": a.renderNode.render
|
|
375
385
|
}), null, 16, ["item", "span", "custom-render"]))), 128))]),
|
|
376
386
|
_: 2
|
|
377
|
-
}, [
|
|
387
|
+
}, [C.searchFormExtra ? {
|
|
378
388
|
name: "extra",
|
|
379
|
-
fn:
|
|
389
|
+
fn: w(() => [R(e.$slots, "searchFormExtra")]),
|
|
380
390
|
key: "0"
|
|
381
|
-
} : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) :
|
|
391
|
+
} : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) : ee("", !0), N("div", {
|
|
382
392
|
ref_key: "contentRef",
|
|
383
|
-
ref:
|
|
384
|
-
class:
|
|
385
|
-
style:
|
|
393
|
+
ref: ie,
|
|
394
|
+
class: m([t(x)("table-wrapper"), e.card ? t(x)("table-wrapper-card") : null]),
|
|
395
|
+
style: Q(e.tableWrapperStyle)
|
|
386
396
|
}, [N("div", {
|
|
387
|
-
class:
|
|
388
|
-
}, [e.settings ? (p(),
|
|
397
|
+
class: m(t(i)("header-wrapper"))
|
|
398
|
+
}, [e.settings ? (p(), B("div", {
|
|
389
399
|
key: 0,
|
|
390
|
-
class:
|
|
400
|
+
class: m(t(i)("header"))
|
|
391
401
|
}, [N("div", {
|
|
392
|
-
class:
|
|
393
|
-
}, [
|
|
394
|
-
selectedRows: t(
|
|
395
|
-
selectedRowKeys: t(
|
|
402
|
+
class: m(t(E)("header", "title"))
|
|
403
|
+
}, [R(e.$slots, "title", h({
|
|
404
|
+
selectedRows: t(T),
|
|
405
|
+
selectedRowKeys: t(v).selectedRowKeys,
|
|
396
406
|
shownColumns: u.value
|
|
397
|
-
},
|
|
407
|
+
}, F))], 2), C.title ? (p(), Z(t(Oe), {
|
|
398
408
|
key: 0,
|
|
399
409
|
type: "vertical"
|
|
400
|
-
})) :
|
|
410
|
+
})) : ee("", !0), f(lo, {
|
|
401
411
|
config: e.settings === !0 ? {} : e.settings
|
|
402
|
-
}, null, 8, ["config"])], 2)) :
|
|
412
|
+
}, null, 8, ["config"])], 2)) : R(e.$slots, "title", h({
|
|
403
413
|
key: 1,
|
|
404
|
-
selectedRows: t(
|
|
405
|
-
selectedRowKeys: t(
|
|
414
|
+
selectedRows: t(T),
|
|
415
|
+
selectedRowKeys: t(v).selectedRowKeys,
|
|
406
416
|
shownColumns: u.value
|
|
407
|
-
},
|
|
417
|
+
}, F))], 2), f(t(Le), h({
|
|
418
|
+
ref_key: "antdTableRef",
|
|
419
|
+
ref: L,
|
|
408
420
|
class: t(i)("table")
|
|
409
|
-
},
|
|
410
|
-
size:
|
|
411
|
-
"table-layout":
|
|
421
|
+
}, _.value, {
|
|
422
|
+
size: k.value,
|
|
423
|
+
"table-layout": we.value,
|
|
412
424
|
columns: u.value,
|
|
413
|
-
onResizeColumn:
|
|
414
|
-
}),
|
|
415
|
-
summary:
|
|
425
|
+
onResizeColumn: l[0] || (l[0] = (a, r) => r.width = a)
|
|
426
|
+
}), X({
|
|
427
|
+
summary: w(() => [R(e.$slots, "summary", {
|
|
416
428
|
columns: u.value,
|
|
417
|
-
records:
|
|
418
|
-
selectedRows: t(
|
|
429
|
+
records: _.value.dataSource,
|
|
430
|
+
selectedRows: t(T)
|
|
419
431
|
})]),
|
|
420
432
|
_: 2
|
|
421
|
-
}, [
|
|
422
|
-
name:
|
|
423
|
-
fn:
|
|
433
|
+
}, [t(V) ? {
|
|
434
|
+
name: "bottomPaginationTop",
|
|
435
|
+
fn: w(() => {
|
|
436
|
+
var a, r;
|
|
437
|
+
return [f(t(no), {
|
|
438
|
+
ref_key: "scrollBarRef",
|
|
439
|
+
ref: ce,
|
|
440
|
+
"scroll-container": (r = (a = L.value) == null ? void 0 : a.table) == null ? void 0 : r.scrollBodyRef,
|
|
441
|
+
direction: "horizontal"
|
|
442
|
+
}, null, 8, ["scroll-container"])];
|
|
443
|
+
}),
|
|
444
|
+
key: "0"
|
|
445
|
+
} : void 0, Y(t(ae)(C, ["title", "searchFormExtra", "headerCell", "summary"]), (a, r) => ({
|
|
446
|
+
name: r,
|
|
447
|
+
fn: w((d) => [R(e.$slots, r, Ee(Ke(d || {})))])
|
|
424
448
|
}))]), 1040, ["class", "size", "table-layout", "columns"])], 6)], 2));
|
|
425
449
|
}
|
|
426
450
|
});
|
|
427
451
|
export {
|
|
428
|
-
|
|
452
|
+
No as default
|
|
429
453
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ScrollBarExpose } from '../../scroll-bar';
|
|
2
|
+
import { Ref, ComputedRef } from 'vue';
|
|
3
|
+
export declare const useStickyScroll: (tableWrapper: Ref<HTMLElement | undefined>) => {
|
|
4
|
+
isStickyMode: ComputedRef<boolean>;
|
|
5
|
+
scrollBarRef: Ref<ScrollBarExpose | undefined, ScrollBarExpose | undefined>;
|
|
6
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ref as o, computed as e } from "vue";
|
|
2
|
+
const i = "ap-table--sticky", r = (t) => {
|
|
3
|
+
const c = o();
|
|
4
|
+
return {
|
|
5
|
+
isStickyMode: e(
|
|
6
|
+
() => {
|
|
7
|
+
var s;
|
|
8
|
+
return ((s = t.value) == null ? void 0 : s.classList.contains(i)) || !1;
|
|
9
|
+
}
|
|
10
|
+
),
|
|
11
|
+
scrollBarRef: c
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
r as useStickyScroll
|
|
16
|
+
};
|
|
@@ -5,7 +5,7 @@ import { parseFieldValue as ae, dataIndexToStr as se, isEqualCustom as ce } from
|
|
|
5
5
|
import { isArray as N, isEqualWith as ie } from "lodash-unified";
|
|
6
6
|
import { useLocale as le } from "../../config-provider/hooks/use-locale.mjs";
|
|
7
7
|
import { useNamespace as ue } from "../../config-provider/hooks/use-namespace.mjs";
|
|
8
|
-
const S = 1, L =
|
|
8
|
+
const S = 1, L = 10;
|
|
9
9
|
function fe(g) {
|
|
10
10
|
const l = {};
|
|
11
11
|
return g && (g === !0 ? (l.current = S, l.pageSize = L) : (l.current = g.defaultCurrent || S, l.pageSize = g.defaultPageSize || L)), l;
|
|
@@ -77,6 +77,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
77
77
|
type: StringConstructor;
|
|
78
78
|
default: undefined;
|
|
79
79
|
};
|
|
80
|
+
onRemove: {
|
|
81
|
+
type: FunctionConstructor;
|
|
82
|
+
default: undefined;
|
|
83
|
+
};
|
|
80
84
|
}>, {
|
|
81
85
|
done: ComputedRef<boolean>;
|
|
82
86
|
clear: typeof clear;
|
|
@@ -148,6 +152,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
148
152
|
type: StringConstructor;
|
|
149
153
|
default: undefined;
|
|
150
154
|
};
|
|
155
|
+
onRemove: {
|
|
156
|
+
type: FunctionConstructor;
|
|
157
|
+
default: undefined;
|
|
158
|
+
};
|
|
151
159
|
}>> & Readonly<{
|
|
152
160
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
153
161
|
}>, {
|
|
@@ -167,6 +175,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
167
175
|
customRequest: CustomRequest;
|
|
168
176
|
maxSizeErrorMsg: string;
|
|
169
177
|
acceptErrorMsg: string;
|
|
178
|
+
onRemove: Function;
|
|
170
179
|
maxCount: number;
|
|
171
180
|
maxCountErrorMsg: string;
|
|
172
181
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|