@aplus-frontend/ui 0.1.19 → 0.1.21
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-modal/interface.d.ts +3 -3
- package/es/src/ap-table/ap-table.vue.mjs +107 -107
- package/es/src/ap-table/constants.mjs +11 -9
- package/es/src/ap-table/hooks/use-table-paging.d.ts +12 -2
- package/es/src/ap-table/hooks/use-table-paging.mjs +115 -103
- package/es/src/ap-table/interface.d.ts +13 -4
- package/es/src/ap-table/style/ap-table.css +9 -0
- package/es/src/ap-table/utils.d.ts +4 -4
- package/es/src/ap-table/utils.mjs +44 -39
- package/es/src/business/ap-image/ApImage.vue.d.ts +12 -66
- package/es/src/business/ap-image/ApImage.vue2.mjs +44 -44
- package/es/src/business/ap-image/interface.d.ts +17 -0
- package/es/src/business/index.d.ts +47 -50
- package/es/src/config-provider/config-provider.mjs +9 -9
- package/es/src/locale/lang/en.mjs +4 -2
- package/es/src/locale/lang/zh-cn.mjs +4 -2
- package/es/src/theme/ap-table/ap-table.css +9 -0
- package/es/src/theme/css-var/index.mjs +23 -7
- package/lib/src/ap-modal/interface.d.ts +3 -3
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/constants.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging.d.ts +12 -2
- package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
- package/lib/src/ap-table/interface.d.ts +13 -4
- package/lib/src/ap-table/style/ap-table.css +9 -0
- package/lib/src/ap-table/utils.d.ts +4 -4
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-image/ApImage.vue.d.ts +12 -66
- package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
- package/lib/src/business/ap-image/interface.d.ts +17 -0
- package/lib/src/business/index.d.ts +47 -50
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/theme/ap-table/ap-table.css +9 -0
- package/lib/src/theme/css-var/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ModalProps } from 'ant-design-vue';
|
|
2
|
-
export type CreateModalFuncProps<ContentRecord = any> = Omit<ModalProps, 'open' | 'onUpdate:open' | 'destroyOnClose' | 'onCancel' | 'onOk' | 'getContainer'> & Partial<{
|
|
3
|
-
onCancel: (params: ContentRecord) =>
|
|
4
|
-
onOk: (params: ContentRecord) =>
|
|
2
|
+
export type CreateModalFuncProps<ContentRecord = any> = Omit<ModalProps, 'open' | 'onUpdate:open' | 'destroyOnClose' | 'onCancel' | 'onOk' | 'getContainer' | 'icon'> & Partial<{
|
|
3
|
+
onCancel: (params: ContentRecord) => any | Promise<any>;
|
|
4
|
+
onOk: (params: ContentRecord) => any | Promise<any>;
|
|
5
5
|
getContainer: HTMLElement;
|
|
6
6
|
content: any;
|
|
7
7
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ie, useSlots as ce, ref as pe, unref as l, createVNode as m, Fragment as D, watchEffect as fe, computed as s, watch as me, openBlock as g, createElementBlock as x, normalizeClass as v, normalizeStyle as j, mergeProps as y, createSlots as A, withCtx as
|
|
1
|
+
import { defineComponent as ie, useSlots as ce, ref as pe, unref as l, createVNode as m, Fragment as D, watchEffect as fe, computed as s, watch as me, openBlock as g, createElementBlock as x, normalizeClass as v, normalizeStyle as j, mergeProps as y, createSlots as A, withCtx as h, renderList as W, createBlock as ge, resolveDynamicComponent as ye, renderSlot as b, createCommentVNode as he, createElementVNode as be, normalizeProps as Se, guardReactiveProps as we } from "vue";
|
|
2
2
|
import { Typography as Re, Table as Ce } from "ant-design-vue";
|
|
3
3
|
import { useToken as Te } from "ant-design-vue/es/theme/internal";
|
|
4
4
|
import { ApForm as Fe } from "../ap-form/index.mjs";
|
|
@@ -7,7 +7,7 @@ import "../config-provider/index.mjs";
|
|
|
7
7
|
import { useTablePaging as xe } from "./hooks/use-table-paging.mjs";
|
|
8
8
|
import { omit as $, isUndefined as u, isBoolean as ve } from "lodash-unified";
|
|
9
9
|
import "./style/ap-table.css";
|
|
10
|
-
import { apColumnToColumn as Be, getTableTitle as Pe, getTableRenderType as
|
|
10
|
+
import { apColumnToColumn as Be, getTableTitle as Pe, getTableRenderType as Ie, getTableRenderProps as ke, getTableCellRenderNode as ze, getColumnOrder as q, updateFormProps as Ne, getFieldProps as Le, getPlaceholder as Ee, getSearchFormItemRenderNode as Ve, objectToString as Ke } from "./utils.mjs";
|
|
11
11
|
import Oe from "./hooks/use-table-content-height.mjs";
|
|
12
12
|
import { getRawDisplayValue as De } from "../editable-table/utils.mjs";
|
|
13
13
|
import je from "./hooks/use-table-row-selection.mjs";
|
|
@@ -138,7 +138,7 @@ const sa = /* @__PURE__ */ ie({
|
|
|
138
138
|
setup(U, {
|
|
139
139
|
expose: G
|
|
140
140
|
}) {
|
|
141
|
-
const
|
|
141
|
+
const a = U;
|
|
142
142
|
let B = 0;
|
|
143
143
|
const S = ce(), [, M] = Te(), {
|
|
144
144
|
t: J
|
|
@@ -149,35 +149,35 @@ const sa = /* @__PURE__ */ ie({
|
|
|
149
149
|
height: Q,
|
|
150
150
|
contentRef: X
|
|
151
151
|
} = Oe(), i = pe([]), Y = () => {
|
|
152
|
-
var
|
|
153
|
-
let e = ((
|
|
154
|
-
return e = e.map((
|
|
155
|
-
resizable: Ae(
|
|
156
|
-
...$(Be(
|
|
157
|
-
title: Pe(
|
|
152
|
+
var t;
|
|
153
|
+
let e = ((t = a.columns) == null ? void 0 : t.filter((o) => !o.hideInTable)) || [];
|
|
154
|
+
return e = e.map((o) => ({
|
|
155
|
+
resizable: Ae(o.resizable) ? o.resizable : a.columnResizable,
|
|
156
|
+
...$(Be(o), ["ellipsis"]),
|
|
157
|
+
title: Pe(o, S.headerCell, l(M).colorPrimary),
|
|
158
158
|
customRender({
|
|
159
|
-
value:
|
|
159
|
+
value: r,
|
|
160
160
|
...n
|
|
161
161
|
}) {
|
|
162
162
|
var K, O;
|
|
163
|
-
const d =
|
|
164
|
-
...
|
|
163
|
+
const d = Ie(o), E = ke({
|
|
164
|
+
...o,
|
|
165
165
|
valueType: d
|
|
166
166
|
}, {
|
|
167
|
-
value:
|
|
167
|
+
value: r,
|
|
168
168
|
...n
|
|
169
|
-
}), de = ze(d,
|
|
170
|
-
value:
|
|
169
|
+
}), de = ze(d, E, n.record, l(P)), V = ((K = o.renderText) == null ? void 0 : K.call(o, {
|
|
170
|
+
value: r,
|
|
171
171
|
...n
|
|
172
|
-
})) ||
|
|
173
|
-
value:
|
|
172
|
+
})) || r, ue = o.renderText ? m(D, null, [(O = o.renderText) == null ? void 0 : O.call(o, {
|
|
173
|
+
value: r,
|
|
174
174
|
...n
|
|
175
175
|
})]) : de;
|
|
176
|
-
let F = le(
|
|
177
|
-
return
|
|
178
|
-
value:
|
|
176
|
+
let F = le(o, V, ue);
|
|
177
|
+
return o.customRender && (F = o.customRender({
|
|
178
|
+
value: r,
|
|
179
179
|
...n,
|
|
180
|
-
column:
|
|
180
|
+
column: o,
|
|
181
181
|
originalNode: F,
|
|
182
182
|
originalText: V
|
|
183
183
|
})), F;
|
|
@@ -187,33 +187,33 @@ const sa = /* @__PURE__ */ ie({
|
|
|
187
187
|
fe(() => {
|
|
188
188
|
i.value = Y();
|
|
189
189
|
});
|
|
190
|
-
const
|
|
191
|
-
var e,
|
|
192
|
-
return B++, ((
|
|
193
|
-
let d = q(
|
|
190
|
+
const I = s(() => {
|
|
191
|
+
var e, t, o;
|
|
192
|
+
return B++, ((o = (t = (e = a.columns) == null ? void 0 : e.filter((r) => !r.hideInSearch && r.dataIndex && (r.valueType || r.customRenderFormItem) && !H.includes(r.valueType))) == null ? void 0 : t.sort((r, n) => {
|
|
193
|
+
let d = q(r.order);
|
|
194
194
|
return q(n.order) - d;
|
|
195
|
-
})) == null ? void 0 :
|
|
196
|
-
const n = Ne(
|
|
197
|
-
...
|
|
195
|
+
})) == null ? void 0 : o.map((r) => {
|
|
196
|
+
const n = Ne(r, Le(r.fieldProps, {})), d = {
|
|
197
|
+
...r,
|
|
198
198
|
fieldProps: {
|
|
199
|
-
label:
|
|
200
|
-
name:
|
|
199
|
+
label: r.title,
|
|
200
|
+
name: r.dataIndex,
|
|
201
201
|
...n || {},
|
|
202
202
|
// 格式化placeholder
|
|
203
|
-
placeholder:
|
|
203
|
+
placeholder: Ee(J, r.valueType, n == null ? void 0 : n.placeholder),
|
|
204
204
|
_signal: B
|
|
205
205
|
},
|
|
206
206
|
renderNode: void 0
|
|
207
207
|
};
|
|
208
208
|
return d.renderNode = Ve(d, l(P)), d;
|
|
209
209
|
})) || [];
|
|
210
|
-
}), Z = s(() => l(i).filter((e) => e.sorter === !0).map((e) => e.dataIndex).filter(Boolean)), _ = s(() => l(i).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex).filter(Boolean)), ee = s(() => u(
|
|
210
|
+
}), Z = s(() => l(i).filter((e) => e.sorter === !0).map((e) => e.dataIndex).filter(Boolean)), _ = s(() => l(i).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex).filter(Boolean)), ee = s(() => u(a.dataSource) ? f.value.records : a.dataSource), {
|
|
211
211
|
rowSelection: R,
|
|
212
|
-
selectedRows:
|
|
212
|
+
selectedRows: k,
|
|
213
213
|
...C
|
|
214
214
|
} = je({
|
|
215
|
-
...
|
|
216
|
-
rowKey:
|
|
215
|
+
...a.rowSelection === !0 ? {} : a.rowSelection,
|
|
216
|
+
rowKey: a.rowKey,
|
|
217
217
|
dataSource: ee
|
|
218
218
|
}), {
|
|
219
219
|
formRef: T,
|
|
@@ -224,86 +224,88 @@ const sa = /* @__PURE__ */ ie({
|
|
|
224
224
|
data: f
|
|
225
225
|
} = xe({
|
|
226
226
|
async request(e) {
|
|
227
|
-
var
|
|
228
|
-
!R.value.preserveSelectedRowKeys && u(
|
|
229
|
-
const
|
|
230
|
-
return (
|
|
231
|
-
data: (
|
|
232
|
-
total: (
|
|
227
|
+
var o, r;
|
|
228
|
+
!R.value.preserveSelectedRowKeys && u(a.dataSource) && C.clearAll();
|
|
229
|
+
const t = await ((o = a.request) == null ? void 0 : o.call(a, e));
|
|
230
|
+
return (r = a.onLoad) == null || r.call(a, (t == null ? void 0 : t.data) || []), {
|
|
231
|
+
data: (t == null ? void 0 : t.data) || [],
|
|
232
|
+
total: (t == null ? void 0 : t.total) || 0
|
|
233
233
|
};
|
|
234
234
|
},
|
|
235
235
|
filterFields: _,
|
|
236
236
|
sortFields: Z,
|
|
237
|
-
defaultParams:
|
|
238
|
-
defaultData:
|
|
239
|
-
manual:
|
|
240
|
-
defaultCurrent:
|
|
241
|
-
defaultPageSize:
|
|
242
|
-
formatParams:
|
|
237
|
+
defaultParams: a.params,
|
|
238
|
+
defaultData: a.defaultData,
|
|
239
|
+
manual: a.manual,
|
|
240
|
+
defaultCurrent: a.pagination ? a.pagination.defaultCurrent : void 0,
|
|
241
|
+
defaultPageSize: a.pagination ? a.pagination.defaultPageSize : void 0,
|
|
242
|
+
formatParams: a.beforeSearchSubmit,
|
|
243
|
+
showLessItems: a.pagination ? a.pagination.showLessItems : void 0,
|
|
244
|
+
showTotal: a.pagination ? a.pagination.showTotal : void 0
|
|
243
245
|
}), oe = s(() => {
|
|
244
|
-
var
|
|
245
|
-
if (
|
|
246
|
+
var t, o;
|
|
247
|
+
if (a.adaptive && (f.value.total > 0 || ((t = a.dataSource) == null ? void 0 : t.length)))
|
|
246
248
|
return {
|
|
247
249
|
y: l(Q),
|
|
248
|
-
x: ((
|
|
250
|
+
x: ((o = a.scroll) == null ? void 0 : o.x) || "100%"
|
|
249
251
|
};
|
|
250
|
-
if (
|
|
251
|
-
return
|
|
252
|
-
}),
|
|
252
|
+
if (a.scroll)
|
|
253
|
+
return a.scroll;
|
|
254
|
+
}), te = s(() => {
|
|
253
255
|
var e;
|
|
254
|
-
if (
|
|
255
|
-
return
|
|
256
|
-
if ((e =
|
|
256
|
+
if (a.tableLayout)
|
|
257
|
+
return a.tableLayout;
|
|
258
|
+
if ((e = a.columns) != null && e.some((t) => t.ellipsis))
|
|
257
259
|
return "fixed";
|
|
258
|
-
}),
|
|
259
|
-
var
|
|
260
|
-
const e = l(p),
|
|
260
|
+
}), L = s(() => {
|
|
261
|
+
var r;
|
|
262
|
+
const e = l(p), t = u(a.dataSource) ? e : {
|
|
261
263
|
...e,
|
|
262
|
-
dataSource:
|
|
263
|
-
onChange:
|
|
264
|
-
},
|
|
264
|
+
dataSource: a.dataSource,
|
|
265
|
+
onChange: a.onChange
|
|
266
|
+
}, o = l(R);
|
|
265
267
|
return {
|
|
266
|
-
...
|
|
267
|
-
...
|
|
268
|
-
rowSelection:
|
|
269
|
-
...
|
|
268
|
+
...a,
|
|
269
|
+
...t,
|
|
270
|
+
rowSelection: a.rowSelection === !0 || ((r = a.rowSelection) == null ? void 0 : r.mode) === "internal" ? {
|
|
271
|
+
...o,
|
|
270
272
|
// tips 如果是前端分页,则默认会走缓存
|
|
271
|
-
preserveSelectedRowKeys: u(
|
|
272
|
-
} :
|
|
273
|
-
loading: u(
|
|
274
|
-
pagination:
|
|
273
|
+
preserveSelectedRowKeys: u(a.dataSource) ? o.preserveSelectedRowKeys : !0
|
|
274
|
+
} : a.rowSelection,
|
|
275
|
+
loading: u(a.loading) ? l(p).loading : a.loading,
|
|
276
|
+
pagination: a.pagination === !1 ? !1 : l(p).pagination,
|
|
275
277
|
scroll: l(oe)
|
|
276
278
|
};
|
|
277
|
-
}),
|
|
278
|
-
function le(e,
|
|
279
|
+
}), re = s(() => [c(), a.card ? null : c("wrapper"), a.adaptive ? c("adaptive") : null].filter(Boolean));
|
|
280
|
+
function le(e, t, o) {
|
|
279
281
|
if (H.includes(e.valueType))
|
|
280
|
-
return
|
|
281
|
-
const
|
|
282
|
+
return o;
|
|
283
|
+
const r = Ke(t);
|
|
282
284
|
return e.copyable || e.ellipsis ? m(Re.Paragraph, {
|
|
283
285
|
copyable: e.copyable ? {
|
|
284
|
-
text:
|
|
286
|
+
text: r,
|
|
285
287
|
tooltip: !1
|
|
286
288
|
} : !1,
|
|
287
289
|
ellipsis: e.ellipsis ? ve(e.ellipsis) ? {
|
|
288
|
-
tooltip:
|
|
290
|
+
tooltip: r
|
|
289
291
|
} : {
|
|
290
292
|
...e.ellipsis,
|
|
291
|
-
tooltip:
|
|
293
|
+
tooltip: r
|
|
292
294
|
} : !1,
|
|
293
|
-
content: e.ellipsis ? De(e,
|
|
294
|
-
}, null) :
|
|
295
|
+
content: e.ellipsis ? De(e, t) : o
|
|
296
|
+
}, null) : o;
|
|
295
297
|
}
|
|
296
298
|
me(() => l(f).loading, (e) => {
|
|
297
|
-
var
|
|
298
|
-
(
|
|
299
|
+
var t;
|
|
300
|
+
(t = a.onLoadingChange) == null || t.call(a, e);
|
|
299
301
|
});
|
|
300
302
|
function ne(e) {
|
|
301
|
-
var
|
|
302
|
-
(
|
|
303
|
+
var t, o, r;
|
|
304
|
+
(r = (o = (t = T.value) == null ? void 0 : t.apForm) == null ? void 0 : o.setFieldsValue) == null || r.call(o, e);
|
|
303
305
|
}
|
|
304
306
|
function se() {
|
|
305
|
-
var e,
|
|
306
|
-
return (
|
|
307
|
+
var e, t, o;
|
|
308
|
+
return (o = (t = (e = T.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValue) == null ? void 0 : o.call(t, !0);
|
|
307
309
|
}
|
|
308
310
|
return G({
|
|
309
311
|
submit: () => z(),
|
|
@@ -312,12 +314,12 @@ const sa = /* @__PURE__ */ ie({
|
|
|
312
314
|
getSearchFormValues: se,
|
|
313
315
|
dataSource: s(() => l(f).records),
|
|
314
316
|
rowSelection: {
|
|
315
|
-
selectedRows: s(() => l(
|
|
317
|
+
selectedRows: s(() => l(k)),
|
|
316
318
|
...C
|
|
317
319
|
}
|
|
318
|
-
}), (e,
|
|
319
|
-
class: v(
|
|
320
|
-
}, [l(u)(e.dataSource) && e.searchForm !== !1 &&
|
|
320
|
+
}), (e, t) => (g(), x("div", {
|
|
321
|
+
class: v(re.value)
|
|
322
|
+
}, [l(u)(e.dataSource) && e.searchForm !== !1 && I.value.length > 0 ? (g(), x("div", {
|
|
321
323
|
key: 0,
|
|
322
324
|
class: v(e.card ? l(w)("search-wrapper") : null),
|
|
323
325
|
style: j(e.searchFormWrapperStyle)
|
|
@@ -329,43 +331,41 @@ const sa = /* @__PURE__ */ ie({
|
|
|
329
331
|
onReset: l(N),
|
|
330
332
|
"submit-loading": l(p).loading
|
|
331
333
|
}), A({
|
|
332
|
-
default:
|
|
333
|
-
key:
|
|
334
|
+
default: h(() => [(g(!0), x(D, null, W(I.value, (o) => (g(), ge(ye(o.renderNode), y({
|
|
335
|
+
key: o.dataIndex,
|
|
334
336
|
ref_for: !0
|
|
335
|
-
},
|
|
336
|
-
span:
|
|
337
|
+
}, o.fieldProps || {}, {
|
|
338
|
+
span: o.span
|
|
337
339
|
}), null, 16, ["span"]))), 128))]),
|
|
338
340
|
_: 2
|
|
339
341
|
}, [S.searchFormExtra ? {
|
|
340
342
|
name: "extra",
|
|
341
|
-
fn:
|
|
343
|
+
fn: h(() => [b(e.$slots, "searchFormExtra")]),
|
|
342
344
|
key: "0"
|
|
343
|
-
} : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) :
|
|
345
|
+
} : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : he("", !0), be("div", {
|
|
344
346
|
ref_key: "contentRef",
|
|
345
347
|
ref: X,
|
|
346
348
|
class: v([l(w)("table-wrapper"), e.card ? l(w)("table-wrapper-card") : null]),
|
|
347
349
|
style: j(e.tableWrapperStyle)
|
|
348
|
-
}, [
|
|
349
|
-
selectedRows: l(
|
|
350
|
+
}, [b(e.$slots, "title", y({
|
|
351
|
+
selectedRows: l(k),
|
|
350
352
|
selectedRowKeys: l(R).selectedRowKeys
|
|
351
353
|
}, C)), m(l(Ce), y({
|
|
352
354
|
class: l(c)("table")
|
|
353
|
-
},
|
|
354
|
-
"table-layout":
|
|
355
|
+
}, L.value, {
|
|
356
|
+
"table-layout": te.value,
|
|
355
357
|
onChange: l(ae),
|
|
356
358
|
columns: i.value,
|
|
357
|
-
onResizeColumn:
|
|
358
|
-
console.log("width is: ", a), t.width = a;
|
|
359
|
-
})
|
|
359
|
+
onResizeColumn: t[0] || (t[0] = (o, r) => r.width = o)
|
|
360
360
|
}), A({
|
|
361
|
-
summary:
|
|
361
|
+
summary: h(() => [b(e.$slots, "summary", {
|
|
362
362
|
columns: i.value,
|
|
363
|
-
records:
|
|
363
|
+
records: L.value.dataSource
|
|
364
364
|
})]),
|
|
365
365
|
_: 2
|
|
366
|
-
}, [W(l($)(S, ["title", "searchFormExtra", "headerCell"]), (
|
|
367
|
-
name:
|
|
368
|
-
fn:
|
|
366
|
+
}, [W(l($)(S, ["title", "searchFormExtra", "headerCell"]), (o, r) => ({
|
|
367
|
+
name: r,
|
|
368
|
+
fn: h((n) => [b(e.$slots, r, Se(we(n || {})))])
|
|
369
369
|
}))]), 1040, ["class", "table-layout", "onChange", "columns"])], 6)], 2));
|
|
370
370
|
}
|
|
371
371
|
});
|
|
@@ -5,8 +5,8 @@ import "./components/index/index.vue.mjs";
|
|
|
5
5
|
import "./components/status/index.vue.mjs";
|
|
6
6
|
import i from "../ap-form/items/date/index.vue.mjs";
|
|
7
7
|
import o from "../ap-form/items/date-range/index.vue.mjs";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import r from "../ap-form/items/number/index.vue.mjs";
|
|
9
|
+
import t from "../ap-form/items/radio/index.vue.mjs";
|
|
10
10
|
import e from "../ap-form/items/select/index.vue.mjs";
|
|
11
11
|
import a from "../ap-form/items/switch/index.vue.mjs";
|
|
12
12
|
import { ApFormItemText as m } from "../ap-form/items/text/index.mjs";
|
|
@@ -23,13 +23,13 @@ import x from "../ap-field/text-area/index.vue.mjs";
|
|
|
23
23
|
import b from "../ap-field/checkbox/index.vue.mjs";
|
|
24
24
|
import w from "../ap-action/group/index.vue.mjs";
|
|
25
25
|
import h from "./components/index/index.vue2.mjs";
|
|
26
|
-
import
|
|
27
|
-
import
|
|
26
|
+
import k from "./components/status/index.vue2.mjs";
|
|
27
|
+
import A from "../ap-field/text/password.vue.mjs";
|
|
28
28
|
const Q = {
|
|
29
29
|
date: i,
|
|
30
30
|
dateRange: o,
|
|
31
|
-
number:
|
|
32
|
-
radio:
|
|
31
|
+
number: r,
|
|
32
|
+
radio: t,
|
|
33
33
|
select: e,
|
|
34
34
|
switch: a,
|
|
35
35
|
text: m,
|
|
@@ -48,8 +48,8 @@ const Q = {
|
|
|
48
48
|
checkbox: b,
|
|
49
49
|
action: w,
|
|
50
50
|
index: h,
|
|
51
|
-
status:
|
|
52
|
-
password:
|
|
51
|
+
status: k,
|
|
52
|
+
password: A
|
|
53
53
|
}, X = [
|
|
54
54
|
"action",
|
|
55
55
|
"index"
|
|
@@ -61,7 +61,9 @@ const Q = {
|
|
|
61
61
|
textOverflow: "ellipsis",
|
|
62
62
|
whiteSpace: "normal",
|
|
63
63
|
maxWidth: "100%",
|
|
64
|
-
verticalAlign: "middle"
|
|
64
|
+
verticalAlign: "middle",
|
|
65
|
+
wordBreak: "break-all",
|
|
66
|
+
flex: 1
|
|
65
67
|
};
|
|
66
68
|
export {
|
|
67
69
|
Q as apTableFormItemMap,
|
|
@@ -51,8 +51,16 @@ export type UseTablePagingParams<DataType, ParamsType> = {
|
|
|
51
51
|
* 需要后端筛选的排序字段列表
|
|
52
52
|
*/
|
|
53
53
|
sortFields?: ComputedRef<DataIndex[]>;
|
|
54
|
+
/**
|
|
55
|
+
* 是否显示基础分页(较少的现实内容)
|
|
56
|
+
*/
|
|
57
|
+
showLessItems?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* 用于显示数据总量和当前数据顺序
|
|
60
|
+
*/
|
|
61
|
+
showTotal?: boolean;
|
|
54
62
|
};
|
|
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>) => {
|
|
63
|
+
export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, defaultCurrent, defaultPageSize, request, defaultParams, defaultData, formatParams, paramsValueTypeMap, resetFieldsIgnores, filterFields, sortFields, showLessItems, showTotal }: UseTablePagingParams<DataType, ParamsType>) => {
|
|
56
64
|
formRef: Ref<ApFormSearchFormExpose | undefined>;
|
|
57
65
|
submit: () => void;
|
|
58
66
|
reset: () => void;
|
|
@@ -74,7 +82,9 @@ export declare const useTablePaging: <DataType = any, ParamsType = Record<string
|
|
|
74
82
|
total: number;
|
|
75
83
|
showSizeChanger: boolean;
|
|
76
84
|
showQuickJumper: boolean;
|
|
77
|
-
|
|
85
|
+
showLessItems: boolean;
|
|
86
|
+
size: string;
|
|
87
|
+
showTotal: ((total: number) => import("vue/jsx-runtime").JSX.Element) | undefined;
|
|
78
88
|
};
|
|
79
89
|
onChange: (pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<any> | SorterResult<any>[], extra: TableCurrentDataSource<any>) => void;
|
|
80
90
|
dataSource: DataType[];
|