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