@aplus-frontend/ui 0.1.9 → 0.1.10
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-field/interface.d.ts +4 -0
- package/es/src/ap-field/select/index.vue.d.ts +6 -0
- package/es/src/ap-field/select/index.vue.mjs +36 -31
- package/es/src/ap-layout/ap-info-layout/ap-info-layout.vue.d.ts +6 -2
- package/es/src/ap-layout/ap-info-layout/ap-info-layout.vue.mjs +33 -23
- package/es/src/ap-table/ap-table.vue.mjs +158 -147
- package/es/src/ap-table/constants.d.ts +26 -0
- package/es/src/ap-table/hooks/use-table-paging.d.ts +4 -3
- package/es/src/ap-table/hooks/use-table-paging.mjs +63 -63
- package/es/src/ap-table/interface.d.ts +13 -1
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +53 -48
- package/es/src/business/ap-export-group/interface.d.ts +4 -0
- package/es/src/business/ap-label/ApLabel.vue2.mjs +18 -17
- package/es/src/business/ap-label/ApLabelGroup.d.ts +22 -4
- package/es/src/business/ap-label/ApLabelGroup.mjs +17 -23
- package/es/src/business/ap-label/constans.d.ts +10 -2
- package/es/src/business/ap-label/constans.mjs +8 -0
- package/es/src/business/ap-label/interface.d.ts +13 -8
- package/es/src/business/index.d.ts +35 -5
- package/es/src/theme/antd-global-overwrite/admin/button.css +3 -0
- package/es/src/theme/antd-global-overwrite/admin/index.css +3 -0
- package/es/src/theme/antd-global-overwrite/aplus/button.css +3 -0
- package/es/src/theme/antd-global-overwrite/aplus/index.css +3 -0
- package/lib/src/ap-field/interface.d.ts +4 -0
- package/lib/src/ap-field/select/index.vue.d.ts +6 -0
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-layout/ap-info-layout/ap-info-layout.vue.d.ts +6 -2
- package/lib/src/ap-layout/ap-info-layout/ap-info-layout.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +26 -0
- package/lib/src/ap-table/hooks/use-table-paging.d.ts +4 -3
- package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
- package/lib/src/ap-table/interface.d.ts +13 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-export-group/interface.d.ts +4 -0
- package/lib/src/business/ap-label/ApLabel.vue2.js +1 -1
- package/lib/src/business/ap-label/ApLabelGroup.d.ts +22 -4
- package/lib/src/business/ap-label/ApLabelGroup.js +1 -1
- package/lib/src/business/ap-label/constans.d.ts +10 -2
- package/lib/src/business/ap-label/constans.js +1 -1
- package/lib/src/business/ap-label/interface.d.ts +13 -8
- package/lib/src/business/index.d.ts +35 -5
- package/lib/src/theme/antd-global-overwrite/admin/button.css +3 -0
- package/lib/src/theme/antd-global-overwrite/admin/index.css +3 -0
- package/lib/src/theme/antd-global-overwrite/aplus/button.css +3 -0
- package/lib/src/theme/antd-global-overwrite/aplus/index.css +3 -0
- package/package.json +3 -3
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Typography as
|
|
3
|
-
import { useToken as
|
|
4
|
-
import { ApForm as
|
|
5
|
-
import { apTableRenderItemMap as
|
|
1
|
+
import { defineComponent as ie, useSlots as ce, computed as s, createVNode as d, Fragment as z, mergeProps as i, unref as l, watch as pe, openBlock as c, createElementBlock as S, normalizeClass as F, normalizeStyle as x, createSlots as D, withCtx as p, renderList as j, createBlock as fe, resolveDynamicComponent as me, renderSlot as B, createCommentVNode as W, createElementVNode as _, toDisplayString as ye, normalizeProps as ge, guardReactiveProps as Se } from "vue";
|
|
2
|
+
import { Typography as be, Table as he, Tooltip as we } from "ant-design-vue";
|
|
3
|
+
import { useToken as Re } from "ant-design-vue/es/theme/internal";
|
|
4
|
+
import { ApForm as Ce } from "../ap-form/index.mjs";
|
|
5
|
+
import { apTableRenderItemMap as Te, noRenderAsFormItemValueList as A, apTableFormItemMap as Fe } from "./constants.mjs";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
|
-
import { useTablePaging as
|
|
8
|
-
import { omit as
|
|
7
|
+
import { useTablePaging as xe } from "./hooks/use-table-paging.mjs";
|
|
8
|
+
import { omit as q, isUndefined as u, isBoolean as Be } from "lodash-unified";
|
|
9
9
|
import "./style/ap-table.css";
|
|
10
|
-
import { QuestionCircleOutlined as
|
|
11
|
-
import { apColumnToColumn as
|
|
12
|
-
import
|
|
13
|
-
import { getRawDisplayValue as
|
|
14
|
-
import
|
|
15
|
-
import { useLocale as
|
|
16
|
-
import { useNamespace as
|
|
17
|
-
const
|
|
10
|
+
import { QuestionCircleOutlined as ve } from "@ant-design/icons-vue";
|
|
11
|
+
import { apColumnToColumn as Pe, getTableRenderType as Ie, getTableRenderProps as ke, getColumnOrder as H, updateFormProps as Le, getFieldProps as Ee, getPlaceholder as Oe } from "./utils.mjs";
|
|
12
|
+
import Ke from "./hooks/use-table-content-height.mjs";
|
|
13
|
+
import { getRawDisplayValue as Ne } from "../editable-table/utils.mjs";
|
|
14
|
+
import Ve from "./hooks/use-table-row-selection.mjs";
|
|
15
|
+
import { useLocale as ze } from "../config-provider/hooks/use-locale.mjs";
|
|
16
|
+
import { useNamespace as De } from "../config-provider/hooks/use-namespace.mjs";
|
|
17
|
+
const je = {
|
|
18
18
|
key: 0
|
|
19
|
-
},
|
|
19
|
+
}, oa = /* @__PURE__ */ ie({
|
|
20
20
|
name: "ApTable",
|
|
21
21
|
__name: "ap-table",
|
|
22
22
|
props: {
|
|
@@ -132,50 +132,61 @@ const Ve = {
|
|
|
132
132
|
default: !1
|
|
133
133
|
}
|
|
134
134
|
},
|
|
135
|
-
setup(
|
|
136
|
-
expose:
|
|
135
|
+
setup($, {
|
|
136
|
+
expose: M
|
|
137
137
|
}) {
|
|
138
|
-
const
|
|
139
|
-
let
|
|
140
|
-
const P =
|
|
141
|
-
t:
|
|
142
|
-
} =
|
|
143
|
-
e:
|
|
138
|
+
const o = $;
|
|
139
|
+
let v = 0;
|
|
140
|
+
const P = ce(), [, Q] = Re(), {
|
|
141
|
+
t: U
|
|
142
|
+
} = ze(), {
|
|
143
|
+
e: b,
|
|
144
144
|
b: f
|
|
145
|
-
} =
|
|
146
|
-
height:
|
|
147
|
-
contentRef:
|
|
148
|
-
} =
|
|
149
|
-
var
|
|
150
|
-
let e = ((
|
|
151
|
-
return e = e.map((
|
|
152
|
-
...
|
|
145
|
+
} = De("ap-table"), {
|
|
146
|
+
height: G,
|
|
147
|
+
contentRef: J
|
|
148
|
+
} = Ke(), h = s(() => {
|
|
149
|
+
var t;
|
|
150
|
+
let e = ((t = o.columns) == null ? void 0 : t.filter((a) => !a.hideInTable)) || [];
|
|
151
|
+
return e = e.map((a) => ({
|
|
152
|
+
...q(Pe(a), ["ellipsis"]),
|
|
153
153
|
customRender({
|
|
154
154
|
value: r,
|
|
155
155
|
...n
|
|
156
156
|
}) {
|
|
157
|
-
|
|
157
|
+
var N, V;
|
|
158
|
+
const g = Ie(a), O = Te[g], de = ke({
|
|
159
|
+
...a,
|
|
160
|
+
valueType: g
|
|
161
|
+
}, {
|
|
158
162
|
value: r,
|
|
159
163
|
...n
|
|
160
|
-
})
|
|
161
|
-
|
|
164
|
+
}), K = ((N = a.renderText) == null ? void 0 : N.call(a, {
|
|
165
|
+
value: r,
|
|
166
|
+
...n
|
|
167
|
+
})) || r, ue = a.renderText ? d(z, null, [(V = a.renderText) == null ? void 0 : V.call(a, {
|
|
168
|
+
value: r,
|
|
169
|
+
...n
|
|
170
|
+
})]) : d(O, i(de, {
|
|
162
171
|
mode: "read"
|
|
163
|
-
}), null)
|
|
164
|
-
|
|
172
|
+
}), null);
|
|
173
|
+
let T = le(a, K, ue);
|
|
174
|
+
return a.customRender && (T = a.customRender({
|
|
165
175
|
value: r,
|
|
166
176
|
...n,
|
|
167
|
-
column:
|
|
168
|
-
originalNode:
|
|
169
|
-
|
|
177
|
+
column: a,
|
|
178
|
+
originalNode: T,
|
|
179
|
+
originalText: K
|
|
180
|
+
})), T;
|
|
170
181
|
}
|
|
171
182
|
})), e;
|
|
172
183
|
}), I = s(() => {
|
|
173
|
-
var e,
|
|
174
|
-
return
|
|
175
|
-
let
|
|
176
|
-
return
|
|
177
|
-
})) == null ? void 0 :
|
|
178
|
-
const n =
|
|
184
|
+
var e, t, a;
|
|
185
|
+
return v++, ((a = (t = (e = o.columns) == null ? void 0 : e.filter((r) => !r.hideInSearch && r.dataIndex && (r.valueType || r.customRenderFormItem) && !A.includes(r.valueType))) == null ? void 0 : t.sort((r, n) => {
|
|
186
|
+
let g = H(r.order);
|
|
187
|
+
return H(n.order) - g;
|
|
188
|
+
})) == null ? void 0 : a.map((r) => {
|
|
189
|
+
const n = Le(r, Ee(r.fieldProps, {}));
|
|
179
190
|
return {
|
|
180
191
|
...r,
|
|
181
192
|
fieldProps: {
|
|
@@ -183,177 +194,177 @@ const Ve = {
|
|
|
183
194
|
name: r.dataIndex,
|
|
184
195
|
...n || {},
|
|
185
196
|
// 格式化placeholder
|
|
186
|
-
placeholder:
|
|
187
|
-
_signal:
|
|
197
|
+
placeholder: Oe(U, r.valueType, n == null ? void 0 : n.placeholder),
|
|
198
|
+
_signal: v
|
|
188
199
|
}
|
|
189
200
|
};
|
|
190
201
|
})) || [];
|
|
191
|
-
}),
|
|
192
|
-
rowSelection:
|
|
202
|
+
}), X = s(() => l(h).filter((e) => e.sorter === !0).map((e) => e.dataIndex).filter(Boolean)), Y = s(() => l(h).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex).filter(Boolean)), Z = s(() => u(o.dataSource) ? y.value.records : o.dataSource), {
|
|
203
|
+
rowSelection: w,
|
|
193
204
|
selectedRows: k,
|
|
194
|
-
...
|
|
195
|
-
} =
|
|
196
|
-
...
|
|
197
|
-
rowKey:
|
|
198
|
-
dataSource:
|
|
205
|
+
...R
|
|
206
|
+
} = Ve({
|
|
207
|
+
...o.rowSelection === !0 ? {} : o.rowSelection,
|
|
208
|
+
rowKey: o.rowKey,
|
|
209
|
+
dataSource: Z
|
|
199
210
|
}), {
|
|
200
|
-
formRef:
|
|
211
|
+
formRef: C,
|
|
201
212
|
submit: L,
|
|
202
213
|
reset: E,
|
|
203
214
|
tableProps: m,
|
|
204
|
-
handleTableChange:
|
|
215
|
+
handleTableChange: ee,
|
|
205
216
|
data: y
|
|
206
|
-
} =
|
|
217
|
+
} = xe({
|
|
207
218
|
async request(e) {
|
|
208
|
-
var
|
|
209
|
-
!
|
|
210
|
-
const
|
|
211
|
-
return (r =
|
|
212
|
-
data: (
|
|
213
|
-
total: (
|
|
219
|
+
var a, r;
|
|
220
|
+
!w.value.preserveSelectedRowKeys && u(o.dataSource) && R.clearAll();
|
|
221
|
+
const t = await ((a = o.request) == null ? void 0 : a.call(o, e));
|
|
222
|
+
return (r = o.onLoad) == null || r.call(o, (t == null ? void 0 : t.data) || []), {
|
|
223
|
+
data: (t == null ? void 0 : t.data) || [],
|
|
224
|
+
total: (t == null ? void 0 : t.total) || 0
|
|
214
225
|
};
|
|
215
226
|
},
|
|
216
|
-
filterFields:
|
|
217
|
-
sortFields:
|
|
218
|
-
defaultParams:
|
|
219
|
-
defaultData:
|
|
220
|
-
manual:
|
|
221
|
-
defaultCurrent:
|
|
222
|
-
defaultPageSize:
|
|
223
|
-
formatParams:
|
|
224
|
-
}),
|
|
227
|
+
filterFields: Y,
|
|
228
|
+
sortFields: X,
|
|
229
|
+
defaultParams: o.params,
|
|
230
|
+
defaultData: o.defaultData,
|
|
231
|
+
manual: o.manual,
|
|
232
|
+
defaultCurrent: o.pagination ? o.pagination.defaultCurrent : void 0,
|
|
233
|
+
defaultPageSize: o.pagination ? o.pagination.defaultPageSize : void 0,
|
|
234
|
+
formatParams: o.beforeSearchSubmit
|
|
235
|
+
}), ae = s(() => {
|
|
225
236
|
var e;
|
|
226
|
-
return
|
|
227
|
-
y: l(
|
|
237
|
+
return o.scroll ? o.scroll : o.adaptive && (y.value.total > 0 || (e = o.dataSource) != null && e.length) ? {
|
|
238
|
+
y: l(G),
|
|
228
239
|
x: "100%"
|
|
229
240
|
} : {
|
|
230
241
|
x: !0
|
|
231
242
|
};
|
|
232
|
-
}),
|
|
243
|
+
}), oe = s(() => {
|
|
233
244
|
var e;
|
|
234
|
-
if (
|
|
235
|
-
return
|
|
236
|
-
if ((e =
|
|
245
|
+
if (o.tableLayout)
|
|
246
|
+
return o.tableLayout;
|
|
247
|
+
if ((e = o.columns) != null && e.some((t) => t.ellipsis))
|
|
237
248
|
return "fixed";
|
|
238
|
-
}),
|
|
249
|
+
}), te = s(() => {
|
|
239
250
|
var r;
|
|
240
|
-
const e = l(m),
|
|
251
|
+
const e = l(m), t = u(o.dataSource) ? e : {
|
|
241
252
|
...e,
|
|
242
|
-
dataSource:
|
|
243
|
-
onChange:
|
|
244
|
-
},
|
|
253
|
+
dataSource: o.dataSource,
|
|
254
|
+
onChange: o.onChange
|
|
255
|
+
}, a = l(w);
|
|
245
256
|
return {
|
|
246
|
-
...a,
|
|
247
257
|
...o,
|
|
248
|
-
|
|
249
|
-
|
|
258
|
+
...t,
|
|
259
|
+
rowSelection: o.rowSelection === !0 || ((r = o.rowSelection) == null ? void 0 : r.mode) === "internal" ? {
|
|
260
|
+
...a,
|
|
250
261
|
// tips 如果是前端分页,则默认会走缓存
|
|
251
|
-
preserveSelectedRowKeys: u(
|
|
252
|
-
} :
|
|
253
|
-
loading: u(
|
|
254
|
-
pagination:
|
|
255
|
-
scroll: l(
|
|
262
|
+
preserveSelectedRowKeys: u(o.dataSource) ? a.preserveSelectedRowKeys : !0
|
|
263
|
+
} : o.rowSelection,
|
|
264
|
+
loading: u(o.loading) ? l(m).loading : o.loading,
|
|
265
|
+
pagination: o.pagination === !1 ? !1 : l(m).pagination,
|
|
266
|
+
scroll: l(ae)
|
|
256
267
|
};
|
|
257
|
-
}),
|
|
258
|
-
function
|
|
259
|
-
return
|
|
268
|
+
}), re = s(() => [f(), o.card ? null : f("wrapper"), o.adaptive ? f("adaptive") : null].filter(Boolean));
|
|
269
|
+
function le(e, t, a) {
|
|
270
|
+
return A.includes(e.valueType) ? a : e.copyable || e.ellipsis ? d(be.Paragraph, {
|
|
260
271
|
copyable: e.copyable ? {
|
|
261
|
-
text:
|
|
272
|
+
text: t,
|
|
262
273
|
tooltip: !1
|
|
263
274
|
} : !1,
|
|
264
|
-
ellipsis: e.ellipsis ?
|
|
265
|
-
tooltip:
|
|
275
|
+
ellipsis: e.ellipsis ? Be(e.ellipsis) ? {
|
|
276
|
+
tooltip: t
|
|
266
277
|
} : {
|
|
267
278
|
...e.ellipsis,
|
|
268
|
-
tooltip:
|
|
279
|
+
tooltip: t
|
|
269
280
|
} : !1,
|
|
270
|
-
content: e.ellipsis ?
|
|
271
|
-
}, null) :
|
|
281
|
+
content: e.ellipsis ? Ne(e, t) : a
|
|
282
|
+
}, null) : a;
|
|
272
283
|
}
|
|
273
|
-
|
|
274
|
-
var
|
|
275
|
-
(
|
|
284
|
+
pe(() => l(y).loading, (e) => {
|
|
285
|
+
var t;
|
|
286
|
+
(t = o.onLoadingChange) == null || t.call(o, e);
|
|
276
287
|
});
|
|
277
|
-
function
|
|
278
|
-
var
|
|
279
|
-
(r = (
|
|
288
|
+
function ne(e) {
|
|
289
|
+
var t, a, r;
|
|
290
|
+
(r = (a = (t = C.value) == null ? void 0 : t.apForm) == null ? void 0 : a.setFieldsValue) == null || r.call(a, e);
|
|
280
291
|
}
|
|
281
|
-
function
|
|
282
|
-
var e,
|
|
283
|
-
return (
|
|
292
|
+
function se() {
|
|
293
|
+
var e, t, a;
|
|
294
|
+
return (a = (t = (e = C.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValue) == null ? void 0 : a.call(t, !0);
|
|
284
295
|
}
|
|
285
|
-
return
|
|
296
|
+
return M({
|
|
286
297
|
submit: () => L(),
|
|
287
298
|
reset: () => E(),
|
|
288
|
-
setSearchFormValues:
|
|
289
|
-
getSearchFormValues:
|
|
299
|
+
setSearchFormValues: ne,
|
|
300
|
+
getSearchFormValues: se,
|
|
290
301
|
dataSource: s(() => l(y).records),
|
|
291
302
|
rowSelection: {
|
|
292
303
|
selectedRows: s(() => l(k)),
|
|
293
|
-
...
|
|
304
|
+
...R
|
|
294
305
|
}
|
|
295
|
-
}), (e,
|
|
296
|
-
class:
|
|
297
|
-
}, [l(u)(e.dataSource) && e.searchForm !== !1 && I.value.length > 0 ? (
|
|
306
|
+
}), (e, t) => (c(), S("div", {
|
|
307
|
+
class: F(re.value)
|
|
308
|
+
}, [l(u)(e.dataSource) && e.searchForm !== !1 && I.value.length > 0 ? (c(), S("div", {
|
|
298
309
|
key: 0,
|
|
299
|
-
class:
|
|
310
|
+
class: F(e.card ? l(b)("search-wrapper") : null),
|
|
300
311
|
style: x(e.searchFormWrapperStyle)
|
|
301
|
-
}, [d(l(
|
|
312
|
+
}, [d(l(Ce).SearchForm, i(e.searchForm || {}, {
|
|
302
313
|
ref_key: "formRef",
|
|
303
|
-
ref:
|
|
314
|
+
ref: C,
|
|
304
315
|
"custom-reset": "",
|
|
305
316
|
onSubmit: l(L),
|
|
306
317
|
onReset: l(E),
|
|
307
318
|
"submit-loading": l(m).loading
|
|
308
|
-
}),
|
|
309
|
-
default:
|
|
310
|
-
key:
|
|
319
|
+
}), D({
|
|
320
|
+
default: p(() => [(c(!0), S(z, null, j(I.value, (a) => (c(), fe(me(a.customRenderFormItem ? a.customRenderFormItem(a) : l(Fe)[a.valueType || "text"]), i({
|
|
321
|
+
key: a.dataIndex,
|
|
311
322
|
ref_for: !0
|
|
312
|
-
},
|
|
313
|
-
span:
|
|
323
|
+
}, a.fieldProps || {}, {
|
|
324
|
+
span: a.span
|
|
314
325
|
}), null, 16, ["span"]))), 128))]),
|
|
315
326
|
_: 2
|
|
316
327
|
}, [P.searchFormExtra ? {
|
|
317
328
|
name: "extra",
|
|
318
|
-
fn:
|
|
329
|
+
fn: p(() => [B(e.$slots, "searchFormExtra")]),
|
|
319
330
|
key: "0"
|
|
320
|
-
} : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) :
|
|
331
|
+
} : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : W("", !0), _("div", {
|
|
321
332
|
ref_key: "contentRef",
|
|
322
|
-
ref:
|
|
323
|
-
class:
|
|
333
|
+
ref: J,
|
|
334
|
+
class: F([l(b)("table-wrapper"), e.card ? l(b)("table-wrapper-card") : null]),
|
|
324
335
|
style: x(e.tableWrapperStyle)
|
|
325
|
-
}, [
|
|
336
|
+
}, [B(e.$slots, "title", i({
|
|
326
337
|
selectedRows: l(k),
|
|
327
|
-
selectedRowKeys: l(
|
|
328
|
-
},
|
|
338
|
+
selectedRowKeys: l(w).selectedRowKeys
|
|
339
|
+
}, R)), d(l(he), i({
|
|
329
340
|
class: l(f)("table")
|
|
330
|
-
},
|
|
331
|
-
"table-layout":
|
|
332
|
-
onChange: l(
|
|
333
|
-
columns:
|
|
334
|
-
}),
|
|
335
|
-
headerCell:
|
|
336
|
-
column:
|
|
341
|
+
}, te.value, {
|
|
342
|
+
"table-layout": oe.value,
|
|
343
|
+
onChange: l(ee),
|
|
344
|
+
columns: h.value
|
|
345
|
+
}), D({
|
|
346
|
+
headerCell: p(({
|
|
347
|
+
column: a,
|
|
337
348
|
title: r
|
|
338
|
-
}) => [
|
|
339
|
-
title:
|
|
349
|
+
}) => [a.tooltip ? (c(), S("span", je, [_("span", null, ye(r), 1), d(l(we), {
|
|
350
|
+
title: a.tooltip,
|
|
340
351
|
placement: "bottom"
|
|
341
352
|
}, {
|
|
342
|
-
default:
|
|
353
|
+
default: p(() => [d(l(ve), {
|
|
343
354
|
style: x({
|
|
344
355
|
paddingLeft: "4px",
|
|
345
|
-
color: l(
|
|
356
|
+
color: l(Q).colorPrimary
|
|
346
357
|
})
|
|
347
358
|
}, null, 8, ["style"])]),
|
|
348
359
|
_: 2
|
|
349
|
-
}, 1032, ["title"])])) :
|
|
360
|
+
}, 1032, ["title"])])) : W("", !0)]),
|
|
350
361
|
_: 2
|
|
351
|
-
}, [
|
|
362
|
+
}, [j(l(q)(P, ["title", "searchFormExtra"]), (a, r) => ({
|
|
352
363
|
name: r,
|
|
353
|
-
fn:
|
|
364
|
+
fn: p((n) => [B(e.$slots, r, ge(Se(n || {})))])
|
|
354
365
|
}))]), 1040, ["class", "table-layout", "onChange", "columns"])], 6)], 2));
|
|
355
366
|
}
|
|
356
367
|
});
|
|
357
368
|
export {
|
|
358
|
-
|
|
369
|
+
oa as default
|
|
359
370
|
};
|
|
@@ -11301,6 +11301,10 @@ export declare const apTableRenderItemMap: {
|
|
|
11301
11301
|
type: PropType<boolean>;
|
|
11302
11302
|
default: undefined;
|
|
11303
11303
|
};
|
|
11304
|
+
lazy: {
|
|
11305
|
+
type: PropType<boolean>;
|
|
11306
|
+
default: boolean;
|
|
11307
|
+
};
|
|
11304
11308
|
emptyText: {
|
|
11305
11309
|
type: PropType<string>;
|
|
11306
11310
|
default: string;
|
|
@@ -11314,6 +11318,7 @@ export declare const apTableRenderItemMap: {
|
|
|
11314
11318
|
};
|
|
11315
11319
|
refetchOnFocus: {
|
|
11316
11320
|
type: PropType<boolean>;
|
|
11321
|
+
default: boolean;
|
|
11317
11322
|
};
|
|
11318
11323
|
}>> & {
|
|
11319
11324
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -11570,6 +11575,10 @@ export declare const apTableRenderItemMap: {
|
|
|
11570
11575
|
type: PropType<boolean>;
|
|
11571
11576
|
default: undefined;
|
|
11572
11577
|
};
|
|
11578
|
+
lazy: {
|
|
11579
|
+
type: PropType<boolean>;
|
|
11580
|
+
default: boolean;
|
|
11581
|
+
};
|
|
11573
11582
|
emptyText: {
|
|
11574
11583
|
type: PropType<string>;
|
|
11575
11584
|
default: string;
|
|
@@ -11583,6 +11592,7 @@ export declare const apTableRenderItemMap: {
|
|
|
11583
11592
|
};
|
|
11584
11593
|
refetchOnFocus: {
|
|
11585
11594
|
type: PropType<boolean>;
|
|
11595
|
+
default: boolean;
|
|
11586
11596
|
};
|
|
11587
11597
|
}>> & {
|
|
11588
11598
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -11602,8 +11612,10 @@ export declare const apTableRenderItemMap: {
|
|
|
11602
11612
|
defaultActiveFirstOption: boolean;
|
|
11603
11613
|
labelInValue: boolean;
|
|
11604
11614
|
multiple: boolean;
|
|
11615
|
+
lazy: boolean;
|
|
11605
11616
|
emptyText: string;
|
|
11606
11617
|
searchMode: "filter" | "request";
|
|
11618
|
+
refetchOnFocus: boolean;
|
|
11607
11619
|
}, true, {}, {}, {
|
|
11608
11620
|
P: {};
|
|
11609
11621
|
B: {};
|
|
@@ -11858,6 +11870,10 @@ export declare const apTableRenderItemMap: {
|
|
|
11858
11870
|
type: PropType<boolean>;
|
|
11859
11871
|
default: undefined;
|
|
11860
11872
|
};
|
|
11873
|
+
lazy: {
|
|
11874
|
+
type: PropType<boolean>;
|
|
11875
|
+
default: boolean;
|
|
11876
|
+
};
|
|
11861
11877
|
emptyText: {
|
|
11862
11878
|
type: PropType<string>;
|
|
11863
11879
|
default: string;
|
|
@@ -11871,6 +11887,7 @@ export declare const apTableRenderItemMap: {
|
|
|
11871
11887
|
};
|
|
11872
11888
|
refetchOnFocus: {
|
|
11873
11889
|
type: PropType<boolean>;
|
|
11890
|
+
default: boolean;
|
|
11874
11891
|
};
|
|
11875
11892
|
}>> & {
|
|
11876
11893
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -11894,8 +11911,10 @@ export declare const apTableRenderItemMap: {
|
|
|
11894
11911
|
defaultActiveFirstOption: boolean;
|
|
11895
11912
|
labelInValue: boolean;
|
|
11896
11913
|
multiple: boolean;
|
|
11914
|
+
lazy: boolean;
|
|
11897
11915
|
emptyText: string;
|
|
11898
11916
|
searchMode: "filter" | "request";
|
|
11917
|
+
refetchOnFocus: boolean;
|
|
11899
11918
|
}>;
|
|
11900
11919
|
__isFragment?: never;
|
|
11901
11920
|
__isTeleport?: never;
|
|
@@ -12147,6 +12166,10 @@ export declare const apTableRenderItemMap: {
|
|
|
12147
12166
|
type: PropType<boolean>;
|
|
12148
12167
|
default: undefined;
|
|
12149
12168
|
};
|
|
12169
|
+
lazy: {
|
|
12170
|
+
type: PropType<boolean>;
|
|
12171
|
+
default: boolean;
|
|
12172
|
+
};
|
|
12150
12173
|
emptyText: {
|
|
12151
12174
|
type: PropType<string>;
|
|
12152
12175
|
default: string;
|
|
@@ -12160,6 +12183,7 @@ export declare const apTableRenderItemMap: {
|
|
|
12160
12183
|
};
|
|
12161
12184
|
refetchOnFocus: {
|
|
12162
12185
|
type: PropType<boolean>;
|
|
12186
|
+
default: boolean;
|
|
12163
12187
|
};
|
|
12164
12188
|
}>> & {
|
|
12165
12189
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -12185,8 +12209,10 @@ export declare const apTableRenderItemMap: {
|
|
|
12185
12209
|
defaultActiveFirstOption: boolean;
|
|
12186
12210
|
labelInValue: boolean;
|
|
12187
12211
|
multiple: boolean;
|
|
12212
|
+
lazy: boolean;
|
|
12188
12213
|
emptyText: string;
|
|
12189
12214
|
searchMode: "filter" | "request";
|
|
12215
|
+
refetchOnFocus: boolean;
|
|
12190
12216
|
}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
12191
12217
|
$slots: Readonly<{
|
|
12192
12218
|
notFoundContent: any;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
2
|
import { RequestData } from '../interface';
|
|
3
3
|
import { ApFormSearchFormExpose } from '../../ap-form';
|
|
4
|
+
import { DataIndex } from 'ant-design-vue/es/vc-table/interface';
|
|
4
5
|
import { TablePaginationConfig, FilterValue, SorterResult, TableCurrentDataSource } from 'ant-design-vue/es/table/interface';
|
|
5
6
|
export type UseTablePagingParams<DataType, ParamsType> = {
|
|
6
7
|
request: (params: any) => Promise<RequestData<DataType>>;
|
|
@@ -45,11 +46,11 @@ export type UseTablePagingParams<DataType, ParamsType> = {
|
|
|
45
46
|
/**
|
|
46
47
|
* 需要后端筛选的字段列表
|
|
47
48
|
*/
|
|
48
|
-
filterFields?:
|
|
49
|
+
filterFields?: ComputedRef<DataIndex[]>;
|
|
49
50
|
/**
|
|
50
51
|
* 需要后端筛选的排序字段列表
|
|
51
52
|
*/
|
|
52
|
-
sortFields?:
|
|
53
|
+
sortFields?: ComputedRef<DataIndex[]>;
|
|
53
54
|
};
|
|
54
55
|
export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, defaultCurrent, defaultPageSize, request, defaultParams, defaultData, formatParams, paramsValueTypeMap, resetFieldsIgnores, filterFields, sortFields }: UseTablePagingParams<DataType, ParamsType>) => {
|
|
55
56
|
formRef: Ref<ApFormSearchFormExpose | undefined>;
|