@aplus-frontend/ui 0.5.17 → 0.5.19
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 +30 -30
- package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +1 -1
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +108 -107
- package/es/src/ap-table/interface.d.ts +8 -0
- package/es/src/business/ap-ladder/ApLadder.vue.d.ts +4 -20
- package/es/src/business/ap-ladder/ApLadder.vue2.mjs +64 -266
- package/es/src/business/ap-ladder/components/SimpleMode.vue.d.ts +110 -0
- package/es/src/business/ap-ladder/components/SimpleMode.vue.mjs +4 -0
- package/es/src/business/ap-ladder/components/SimpleMode.vue2.mjs +122 -0
- package/es/src/business/ap-ladder/components/ValueGroupMode.vue.d.ts +118 -0
- package/es/src/business/ap-ladder/components/ValueGroupMode.vue.mjs +4 -0
- package/es/src/business/ap-ladder/components/ValueGroupMode.vue2.mjs +209 -0
- package/es/src/business/ap-ladder/index.d.ts +5 -38
- package/es/src/business/ap-ladder/interface.d.ts +42 -16
- package/es/src/business/ap-ladder/useWatchEllipsis.d.ts +1 -2
- package/es/src/business/ap-ladder/useWatchEllipsis.origin.d.ts +3 -0
- package/es/src/business/ap-ladder/utils.d.ts +2 -0
- package/es/src/business/ap-ladder/utils.mjs +5 -0
- package/es/src/business/ap-table-modal/hooks/use-create-table-modal.mjs +1 -1
- package/es/src/business/ap-table-modal/interface.d.ts +1 -1
- package/es/src/business/ap-table-modal/modal-title.vue2.mjs +1 -1
- package/es/src/business/ap-table-modal/table-layout/index.vue2.mjs +8 -9
- package/es/src/business/ap-table-modal/table-modal.vue2.mjs +14 -14
- package/es/src/mask/style/css.d.ts +0 -0
- package/es/src/mask/style/css.js +1 -0
- package/es/src/mask/style/index.d.ts +0 -0
- package/es/src/mask/style/index.js +1 -0
- package/es/src/path-map.mjs +3 -1
- package/es/src/text/index.vue.mjs +46 -41
- package/es/src/text/interface.d.ts +6 -0
- package/es/src/text/style/css.d.ts +0 -0
- package/es/src/text/style/css.js +2 -0
- package/es/src/text/style/index.d.ts +0 -0
- package/es/src/text/style/index.js +2 -0
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/ap-table/interface.d.ts +8 -0
- package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +4 -20
- package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -1
- package/lib/src/business/ap-ladder/components/SimpleMode.vue.d.ts +110 -0
- package/lib/src/business/ap-ladder/components/SimpleMode.vue.js +1 -0
- package/lib/src/business/ap-ladder/components/SimpleMode.vue2.js +1 -0
- package/lib/src/business/ap-ladder/components/ValueGroupMode.vue.d.ts +118 -0
- package/lib/src/business/ap-ladder/components/ValueGroupMode.vue.js +1 -0
- package/lib/src/business/ap-ladder/components/ValueGroupMode.vue2.js +1 -0
- package/lib/src/business/ap-ladder/index.d.ts +5 -38
- package/lib/src/business/ap-ladder/interface.d.ts +42 -16
- package/lib/src/business/ap-ladder/useWatchEllipsis.d.ts +1 -2
- package/lib/src/business/ap-ladder/useWatchEllipsis.origin.d.ts +3 -0
- package/lib/src/business/ap-ladder/utils.d.ts +2 -0
- package/lib/src/business/ap-ladder/utils.js +1 -0
- package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.js +1 -1
- package/lib/src/business/ap-table-modal/interface.d.ts +1 -1
- package/lib/src/business/ap-table-modal/modal-title.vue2.js +1 -1
- package/lib/src/business/ap-table-modal/table-layout/index.vue2.js +1 -1
- package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
- package/lib/src/mask/style/css.cjs +1 -0
- package/lib/src/mask/style/css.d.ts +0 -0
- package/lib/src/mask/style/index.cjs +1 -0
- package/lib/src/mask/style/index.d.ts +0 -0
- package/lib/src/path-map.js +1 -1
- package/lib/src/text/index.vue.js +1 -1
- package/lib/src/text/interface.d.ts +6 -0
- package/lib/src/text/style/css.cjs +2 -0
- package/lib/src/text/style/css.d.ts +0 -0
- package/lib/src/text/style/index.cjs +2 -0
- package/lib/src/text/style/index.d.ts +0 -0
- package/package.json +1 -1
- package/theme/ap-ladder/ap-ladder.css +68 -1
- package/theme/ap-ladder/ap-ladder.less +72 -2
- package/theme/index.css +68 -1
- package/es/src/business/ap-ladder/HelpMessageIcon.vue.d.ts +0 -14
- package/es/src/business/ap-ladder/HelpMessageIcon.vue.mjs +0 -4
- package/es/src/business/ap-ladder/HelpMessageIcon.vue2.mjs +0 -35
- package/es/src/business/ap-ladder/useWatchEllipsis.mjs +0 -35
- package/lib/src/business/ap-ladder/HelpMessageIcon.vue.d.ts +0 -14
- package/lib/src/business/ap-ladder/HelpMessageIcon.vue.js +0 -1
- package/lib/src/business/ap-ladder/HelpMessageIcon.vue2.js +0 -1
- package/lib/src/business/ap-ladder/useWatchEllipsis.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Ke, useSlots as Ee, ref as h, computed as s, unref as l, watch as k, createElementBlock as B, openBlock as
|
|
1
|
+
import { defineComponent as Ke, useSlots as Ee, ref as h, computed as s, unref as l, createVNode as p, Fragment as Z, watch as k, createElementBlock as B, openBlock as m, normalizeStyle as V, normalizeClass as y, createCommentVNode as ee, createElementVNode as K, mergeProps as w, createSlots as oe, withCtx as v, renderList as re, createBlock as ae, resolveDynamicComponent as Oe, renderSlot as R, normalizeProps as Le, guardReactiveProps as $e } from "vue";
|
|
2
2
|
import { Divider as Ae, Table as De } from "@aplus-frontend/antdv";
|
|
3
3
|
import { useToken as je } from "@aplus-frontend/antdv/es/theme/internal";
|
|
4
4
|
import { ApForm as We } from "../ap-form/index.mjs";
|
|
@@ -6,7 +6,7 @@ import { noRenderAsFormItemValueList as te } from "./constants.mjs";
|
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
7
|
import { useTablePaging as _e } from "./hooks/use-table-paging-ng.mjs";
|
|
8
8
|
import { isUndefined as g, omit as le, isBoolean as He } from "lodash-unified";
|
|
9
|
-
import { getColumnOrder as ne, updateFormProps as Ue, getFieldProps as qe, getSearchFormItemRenderNode as Me, recursionApColumns as se,
|
|
9
|
+
import { getColumnOrder as ne, updateFormProps as Ue, getFieldProps as qe, getSearchFormItemRenderNode as Me, recursionApColumns as se, getTableTitle as Ge, getTableRenderType as Je, getTableRenderProps as Qe, getTableCellRenderNode as Xe, apColumnToColumn as Ye, falseToUndefined as Ze, objectToString as eo } from "./utils.mjs";
|
|
10
10
|
import oo from "./hooks/use-table-content-height.mjs";
|
|
11
11
|
import ro from "./hooks/use-table-row-selection.mjs";
|
|
12
12
|
import { getScrollbarSize as ao, isDef as to } from "../utils/index.mjs";
|
|
@@ -17,9 +17,9 @@ import "../scroll-bar/index.mjs";
|
|
|
17
17
|
import { useStickyScroll as no } from "./hooks/use-sticky-scroll.mjs";
|
|
18
18
|
import { useNamespace as so } from "../config-provider/hooks/use-namespace.mjs";
|
|
19
19
|
import { useGlobalConfig as uo } from "../config-provider/hooks/use-global-config.mjs";
|
|
20
|
-
import io from "./components/
|
|
21
|
-
import co from "
|
|
22
|
-
import fo from "
|
|
20
|
+
import io from "./components/paragraph-ellipsis/index.vue2.mjs";
|
|
21
|
+
import co from "./components/setting/modal/index.vue2.mjs";
|
|
22
|
+
import fo from "../scroll-bar/index.vue.mjs";
|
|
23
23
|
const Eo = /* @__PURE__ */ Ke({
|
|
24
24
|
name: "ApTable",
|
|
25
25
|
__name: "ap-table",
|
|
@@ -245,26 +245,26 @@ const Eo = /* @__PURE__ */ Ke({
|
|
|
245
245
|
function a(t, d) {
|
|
246
246
|
return t.map((n) => ({
|
|
247
247
|
resizable: to(n.resizable) ? n.resizable : o.columnResizable,
|
|
248
|
-
...le(
|
|
248
|
+
...le(Ye(n), ["ellipsis"]),
|
|
249
249
|
// tips: 此函数内部依赖查询&筛选的相应式值
|
|
250
250
|
...M(n),
|
|
251
251
|
fixed: d ? d.fixed : n.fixed,
|
|
252
|
-
title:
|
|
252
|
+
title: Ge(n, O("table-header", "title"), C.headerCell, l(ie).colorPrimary),
|
|
253
253
|
customRender({
|
|
254
254
|
value: f,
|
|
255
255
|
...S
|
|
256
256
|
}) {
|
|
257
257
|
var X, Y;
|
|
258
|
-
const J =
|
|
258
|
+
const J = Je(n), Ie = Qe({
|
|
259
259
|
...n,
|
|
260
260
|
valueType: J
|
|
261
261
|
}, {
|
|
262
262
|
value: f,
|
|
263
263
|
...S
|
|
264
|
-
}), Ne =
|
|
264
|
+
}), Ne = Xe(J, Ie, S.record, l(L)), Q = ((X = n.renderText) == null ? void 0 : X.call(n, {
|
|
265
265
|
value: f,
|
|
266
266
|
...S
|
|
267
|
-
})) || f, Ve = n.renderText ?
|
|
267
|
+
})) || f, Ve = n.renderText ? p(Z, null, [(Y = n.renderText) == null ? void 0 : Y.call(n, {
|
|
268
268
|
value: f,
|
|
269
269
|
...S
|
|
270
270
|
})]) : Ne;
|
|
@@ -325,7 +325,7 @@ const Eo = /* @__PURE__ */ Ke({
|
|
|
325
325
|
...a,
|
|
326
326
|
// tips 如果是前端分页,则默认会走缓存
|
|
327
327
|
preserveSelectedRowKeys: g(o.dataSource) ? a.preserveSelectedRowKeys : !0
|
|
328
|
-
} :
|
|
328
|
+
} : Ze(o.rowSelection),
|
|
329
329
|
loading: g(o.loading) ? e.loading : o.loading,
|
|
330
330
|
pagination: o.pagination === !1 ? !1 : e.pagination,
|
|
331
331
|
scroll: l(Te)
|
|
@@ -338,7 +338,7 @@ const Eo = /* @__PURE__ */ Ke({
|
|
|
338
338
|
if (te.includes(e.valueType))
|
|
339
339
|
return r;
|
|
340
340
|
const t = eo(a);
|
|
341
|
-
return e.copyable || e.ellipsis ?
|
|
341
|
+
return e.copyable || e.ellipsis ? p(io, {
|
|
342
342
|
copyable: e.copyable,
|
|
343
343
|
rawValue: t,
|
|
344
344
|
ellipsis: e.ellipsis ? He(e.ellipsis) ? {
|
|
@@ -396,26 +396,26 @@ const Eo = /* @__PURE__ */ Ke({
|
|
|
396
396
|
},
|
|
397
397
|
y: void 0
|
|
398
398
|
}
|
|
399
|
-
}), (e, a) => (
|
|
399
|
+
}), (e, a) => (m(), B("div", {
|
|
400
400
|
ref_key: "tableWrapperRef",
|
|
401
401
|
ref: $,
|
|
402
|
-
class:
|
|
402
|
+
class: y(xe.value),
|
|
403
403
|
style: V(l(fe)({
|
|
404
404
|
"scroll-bar-width": `${l(W)}px`
|
|
405
405
|
}))
|
|
406
|
-
}, [l(g)(e.dataSource) && e.searchForm !== !1 && _.value.length > 0 ? (
|
|
406
|
+
}, [l(g)(e.dataSource) && e.searchForm !== !1 && _.value.length > 0 ? (m(), B("div", {
|
|
407
407
|
key: 0,
|
|
408
|
-
class:
|
|
408
|
+
class: y(e.card ? l(z)("search-wrapper") : null),
|
|
409
409
|
style: V(e.searchFormWrapperStyle)
|
|
410
|
-
}, [
|
|
410
|
+
}, [p(l(We).SearchForm, w(e.searchForm || {}, {
|
|
411
411
|
ref_key: "formRef",
|
|
412
412
|
ref: I,
|
|
413
413
|
"custom-reset": "",
|
|
414
414
|
"submit-loading": l(q).loading,
|
|
415
415
|
onSubmit: l(H),
|
|
416
416
|
onReset: l(U)
|
|
417
|
-
}),
|
|
418
|
-
default: v(() => [(
|
|
417
|
+
}), oe({
|
|
418
|
+
default: v(() => [(m(!0), B(Z, null, re(_.value, (r) => (m(), ae(Oe(r.renderNode.Comp), w({
|
|
419
419
|
key: r.dataIndex,
|
|
420
420
|
item: r,
|
|
421
421
|
ref_for: !0
|
|
@@ -428,33 +428,33 @@ const Eo = /* @__PURE__ */ Ke({
|
|
|
428
428
|
name: "extra",
|
|
429
429
|
fn: v(() => [R(e.$slots, "searchFormExtra")]),
|
|
430
430
|
key: "0"
|
|
431
|
-
} : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) :
|
|
431
|
+
} : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) : ee("", !0), K("div", {
|
|
432
432
|
ref_key: "contentRef",
|
|
433
433
|
ref: me,
|
|
434
|
-
class:
|
|
434
|
+
class: y([l(z)("table-wrapper"), e.card ? l(z)("table-wrapper-card") : null]),
|
|
435
435
|
style: V(e.tableWrapperStyle)
|
|
436
436
|
}, [K("div", {
|
|
437
|
-
class:
|
|
438
|
-
}, [e.settings ? (
|
|
437
|
+
class: y(l(c)("header-wrapper"))
|
|
438
|
+
}, [e.settings ? (m(), B("div", {
|
|
439
439
|
key: 0,
|
|
440
|
-
class:
|
|
440
|
+
class: y(l(c)("header"))
|
|
441
441
|
}, [K("div", {
|
|
442
|
-
class:
|
|
442
|
+
class: y(l(O)("header", "title"))
|
|
443
443
|
}, [R(e.$slots, "title", w({
|
|
444
444
|
selectedRows: l(F),
|
|
445
445
|
selectedRowKeys: l(T).selectedRowKeys,
|
|
446
446
|
shownColumns: u.value
|
|
447
|
-
}, x))], 2), C.title ? (
|
|
447
|
+
}, x))], 2), C.title ? (m(), ae(l(Ae), {
|
|
448
448
|
key: 0,
|
|
449
449
|
type: "vertical"
|
|
450
|
-
})) :
|
|
450
|
+
})) : ee("", !0), p(co, {
|
|
451
451
|
config: e.settings === !0 ? {} : e.settings
|
|
452
452
|
}, null, 8, ["config"])], 2)) : R(e.$slots, "title", w({
|
|
453
453
|
key: 1,
|
|
454
454
|
selectedRows: l(F),
|
|
455
455
|
selectedRowKeys: l(T).selectedRowKeys,
|
|
456
456
|
shownColumns: u.value
|
|
457
|
-
}, x))], 2),
|
|
457
|
+
}, x))], 2), p(l(De), w({
|
|
458
458
|
ref_key: "antdTableRef",
|
|
459
459
|
ref: A,
|
|
460
460
|
class: l(c)("table")
|
|
@@ -463,7 +463,7 @@ const Eo = /* @__PURE__ */ Ke({
|
|
|
463
463
|
"table-layout": Fe.value,
|
|
464
464
|
columns: u.value,
|
|
465
465
|
onResizeColumn: a[0] || (a[0] = (r, t) => t.width = r)
|
|
466
|
-
}),
|
|
466
|
+
}), oe({
|
|
467
467
|
summary: v(() => [R(e.$slots, "summary", {
|
|
468
468
|
columns: u.value,
|
|
469
469
|
records: G.value.dataSource,
|
|
@@ -474,7 +474,7 @@ const Eo = /* @__PURE__ */ Ke({
|
|
|
474
474
|
name: "bottomPaginationTop",
|
|
475
475
|
fn: v(() => {
|
|
476
476
|
var r, t;
|
|
477
|
-
return [
|
|
477
|
+
return [p(l(fo), {
|
|
478
478
|
ref_key: "scrollBarRef",
|
|
479
479
|
ref: i,
|
|
480
480
|
"scroll-container": (t = (r = A.value) == null ? void 0 : r.table) == null ? void 0 : t.scrollBodyRef,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as A, ref as L, computed as O, watch as $, createElementBlock as y, openBlock as c, normalizeClass as d,
|
|
1
|
+
import { defineComponent as A, ref as L, unref as n, computed as O, watch as $, createElementBlock as y, openBlock as c, normalizeClass as d, createVNode as m, createElementVNode as v, withCtx as g, toDisplayString as k, createTextVNode as q, createCommentVNode as p, createBlock as b } from "vue";
|
|
2
2
|
import { Flex as G, Button as H, Divider as J } from "@aplus-frontend/antdv";
|
|
3
3
|
import N from "vuedraggable";
|
|
4
4
|
import "../sortable/index.vue.mjs";
|
|
@@ -1,140 +1,141 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as ne, reactive as J, unref as S, nextTick as ae, onMounted as se, watch as ie, computed as D, createVNode as b } from "vue";
|
|
2
2
|
import { useTableSortedAndFiltered as ce } from "./use-sorted-filtered.mjs";
|
|
3
3
|
import "../../config-provider/index.mjs";
|
|
4
|
-
import { parseFieldValue as
|
|
5
|
-
import { isArray as N, isEqualWith as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
import { parseFieldValue as le, dataIndexToStr as ue, isEqualCustom as fe } from "../utils.mjs";
|
|
5
|
+
import { isArray as N, isEqualWith as ge } from "lodash-unified";
|
|
6
|
+
import { isDef as Q } from "../../utils/index.mjs";
|
|
7
|
+
import { useLocale as pe } from "../../config-provider/hooks/use-locale.mjs";
|
|
8
|
+
import { useNamespace as de } from "../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
const z = 1, L = 10;
|
|
10
|
+
function me(g) {
|
|
10
11
|
const l = {};
|
|
11
|
-
return g && (g === !0 ? (l.current =
|
|
12
|
+
return g && (g === !0 ? (l.current = z, l.pageSize = L) : (l.current = g.defaultCurrent || z, l.pageSize = g.defaultPageSize || L)), l;
|
|
12
13
|
}
|
|
13
|
-
const
|
|
14
|
+
const xe = ({
|
|
14
15
|
manual: g = !1,
|
|
15
16
|
request: l,
|
|
16
17
|
defaultParams: v = {},
|
|
17
18
|
defaultData: y = [],
|
|
18
|
-
formatParams:
|
|
19
|
-
paramsValueTypeMap:
|
|
20
|
-
resetFieldsIgnores:
|
|
19
|
+
formatParams: R,
|
|
20
|
+
paramsValueTypeMap: I,
|
|
21
|
+
resetFieldsIgnores: V,
|
|
21
22
|
filterFields: U,
|
|
22
23
|
sortFields: B,
|
|
23
24
|
namespace: K = "ap-table",
|
|
24
25
|
pagination: p = {
|
|
25
|
-
defaultCurrent:
|
|
26
|
+
defaultCurrent: z,
|
|
26
27
|
defaultPageSize: L,
|
|
27
28
|
showLessItems: !1,
|
|
28
29
|
showTotal: !0
|
|
29
30
|
}
|
|
30
31
|
}) => {
|
|
31
|
-
let
|
|
32
|
-
const
|
|
33
|
-
getColumnSFConfig:
|
|
34
|
-
setSF:
|
|
35
|
-
clearAll:
|
|
36
|
-
sortedInfo:
|
|
37
|
-
filteredInfo:
|
|
32
|
+
let E = 0, s = {};
|
|
33
|
+
const d = p ?? {}, M = (e) => R ? R(e) : e, T = ne(), i = J(me(p)), {
|
|
34
|
+
getColumnSFConfig: $,
|
|
35
|
+
setSF: G,
|
|
36
|
+
clearAll: W,
|
|
37
|
+
sortedInfo: Z,
|
|
38
|
+
filteredInfo: H
|
|
38
39
|
} = ce(), {
|
|
39
|
-
t:
|
|
40
|
-
} =
|
|
40
|
+
t: w
|
|
41
|
+
} = pe(), {
|
|
41
42
|
b: P
|
|
42
|
-
} =
|
|
43
|
+
} = de(K), o = J({
|
|
43
44
|
total: y.length,
|
|
44
45
|
records: y,
|
|
45
46
|
loading: !1
|
|
46
|
-
}),
|
|
47
|
+
}), C = () => {
|
|
47
48
|
var e, t;
|
|
48
|
-
return ((t = (e =
|
|
49
|
-
},
|
|
49
|
+
return ((t = (e = T.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValueTransformed(!0)) || {};
|
|
50
|
+
}, O = async (e) => {
|
|
50
51
|
var n;
|
|
51
|
-
const t =
|
|
52
|
-
|
|
52
|
+
const t = M(e), r = Date.now();
|
|
53
|
+
E = r, o.loading = !0;
|
|
53
54
|
try {
|
|
54
55
|
const a = await l({
|
|
55
|
-
...
|
|
56
|
+
...S(v),
|
|
56
57
|
...t
|
|
57
58
|
});
|
|
58
|
-
|
|
59
|
+
E === r && (o.total = a.total || ((n = a.data) == null ? void 0 : n.length) || 0, o.records = [...a.data || []]);
|
|
59
60
|
} catch {
|
|
60
|
-
|
|
61
|
+
E === r && (o.records = [], o.total = 0);
|
|
61
62
|
} finally {
|
|
62
63
|
o.loading = !1;
|
|
63
64
|
}
|
|
64
|
-
},
|
|
65
|
+
}, _ = (e) => {
|
|
65
66
|
const t = {};
|
|
66
67
|
return Object.entries(e).forEach(([r, n]) => {
|
|
67
|
-
if (t[r] = n,
|
|
68
|
-
const a =
|
|
69
|
-
a && (t[r] =
|
|
68
|
+
if (t[r] = n, I && n) {
|
|
69
|
+
const a = I[r];
|
|
70
|
+
a && (t[r] = le(a, n));
|
|
70
71
|
}
|
|
71
72
|
}), t;
|
|
72
|
-
},
|
|
73
|
-
var n, a, u, f,
|
|
74
|
-
const t =
|
|
75
|
-
Object.entries(t).forEach(([
|
|
76
|
-
|
|
77
|
-
}), await ((a = (n =
|
|
73
|
+
}, X = async (e) => {
|
|
74
|
+
var n, a, u, f, m;
|
|
75
|
+
const t = C(), r = {};
|
|
76
|
+
Object.entries(t).forEach(([h, x]) => {
|
|
77
|
+
V && V.indexOf(h) > -1 && (r[h] = x);
|
|
78
|
+
}), await ((a = (n = T.value) == null ? void 0 : n.apForm) == null ? void 0 : a.resetFields()), (m = (f = (u = T.value) == null ? void 0 : u.apForm) == null ? void 0 : f.setFieldsValue) == null || m.call(f, r), ae(() => {
|
|
78
79
|
e == null || e();
|
|
79
80
|
});
|
|
80
|
-
},
|
|
81
|
+
}, F = (e) => {
|
|
81
82
|
s = e;
|
|
82
|
-
const t =
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
|
|
83
|
+
const t = _(e);
|
|
84
|
+
O(t);
|
|
85
|
+
}, Y = (e) => {
|
|
86
|
+
F({
|
|
86
87
|
...s,
|
|
87
88
|
...e
|
|
88
89
|
});
|
|
89
|
-
},
|
|
90
|
-
const e =
|
|
91
|
-
p && (
|
|
90
|
+
}, A = () => {
|
|
91
|
+
const e = C();
|
|
92
|
+
p && (i.current = z), F({
|
|
92
93
|
...e,
|
|
93
94
|
filter: s.filter,
|
|
94
95
|
sort: s.sort,
|
|
95
|
-
current: p ?
|
|
96
|
-
pageSize: p ? s.pageSize ||
|
|
96
|
+
current: p ? z : void 0,
|
|
97
|
+
pageSize: p ? s.pageSize || i.pageSize : void 0
|
|
97
98
|
});
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
},
|
|
99
|
+
}, k = () => {
|
|
100
|
+
W(), s.sort = {}, s.filter = {}, X(A);
|
|
101
|
+
}, j = () => {
|
|
102
|
+
F(s);
|
|
103
|
+
}, ee = (e) => {
|
|
103
104
|
if (!p)
|
|
104
|
-
|
|
105
|
+
j();
|
|
105
106
|
else {
|
|
106
107
|
const {
|
|
107
108
|
current: t,
|
|
108
109
|
pageSize: r
|
|
109
|
-
} =
|
|
110
|
-
|
|
110
|
+
} = i, n = o.total - e, a = Math.ceil(n / r), u = t > a ? a : t;
|
|
111
|
+
Y({
|
|
111
112
|
current: u > 0 ? u : 1
|
|
112
113
|
});
|
|
113
114
|
}
|
|
114
|
-
},
|
|
115
|
-
var
|
|
116
|
-
const n =
|
|
117
|
-
|
|
115
|
+
}, q = (e, t, r) => {
|
|
116
|
+
var h, x;
|
|
117
|
+
const n = C();
|
|
118
|
+
i.current = e.current, i.pageSize = e.pageSize, G(t, r);
|
|
118
119
|
const a = N(r) ? [...r] : [r], u = {};
|
|
119
|
-
for (const
|
|
120
|
-
(
|
|
120
|
+
for (const c of a)
|
|
121
|
+
(h = S(B)) != null && h.includes(c.columnKey || c.field) && c.order && (u[ue(c.columnKey || c.field)] = c.order);
|
|
121
122
|
const f = {};
|
|
122
|
-
for (const
|
|
123
|
-
(x =
|
|
124
|
-
const
|
|
123
|
+
for (const c of Object.keys(t))
|
|
124
|
+
(x = S(U)) != null && x.includes(c) && t[c] && (f[c] = t[c]);
|
|
125
|
+
const m = {
|
|
125
126
|
...n,
|
|
126
127
|
filter: f,
|
|
127
128
|
sort: u,
|
|
128
129
|
current: e.current,
|
|
129
130
|
pageSize: e.pageSize
|
|
130
131
|
};
|
|
131
|
-
|
|
132
|
+
ge(s, m, fe) || F(m);
|
|
132
133
|
};
|
|
133
|
-
|
|
134
|
-
const e =
|
|
134
|
+
se(() => {
|
|
135
|
+
const e = C(), {
|
|
135
136
|
current: t,
|
|
136
137
|
pageSize: r
|
|
137
|
-
} =
|
|
138
|
+
} = i;
|
|
138
139
|
if (s = {
|
|
139
140
|
current: t,
|
|
140
141
|
pageSize: r,
|
|
@@ -142,75 +143,75 @@ const we = ({
|
|
|
142
143
|
sort: {},
|
|
143
144
|
...e
|
|
144
145
|
}, !g) {
|
|
145
|
-
const n =
|
|
146
|
-
|
|
146
|
+
const n = _(s);
|
|
147
|
+
O(n);
|
|
147
148
|
}
|
|
148
|
-
}),
|
|
149
|
-
|
|
149
|
+
}), ie(() => S(v), () => {
|
|
150
|
+
A();
|
|
150
151
|
}, {
|
|
151
152
|
deep: !0
|
|
152
153
|
});
|
|
153
|
-
const
|
|
154
|
+
const te = D(() => {
|
|
154
155
|
if (o.total === 0)
|
|
155
156
|
return "-";
|
|
156
157
|
const {
|
|
157
158
|
current: e,
|
|
158
159
|
pageSize: t
|
|
159
|
-
} =
|
|
160
|
+
} = i;
|
|
160
161
|
return `${e}/${Math.ceil(o.total / t)}`;
|
|
161
162
|
});
|
|
162
|
-
function
|
|
163
|
+
function re(e) {
|
|
163
164
|
N(e) && (o.records = e, o.total = e.length);
|
|
164
165
|
}
|
|
165
|
-
const
|
|
166
|
+
const oe = D(() => {
|
|
166
167
|
const {
|
|
167
168
|
showLessItems: e,
|
|
168
169
|
showTotal: t
|
|
169
|
-
} =
|
|
170
|
+
} = d;
|
|
170
171
|
return {
|
|
171
172
|
loading: o.loading,
|
|
172
173
|
pagination: {
|
|
173
|
-
current:
|
|
174
|
-
pageSize:
|
|
174
|
+
current: i.current,
|
|
175
|
+
pageSize: i.pageSize,
|
|
175
176
|
total: o.total,
|
|
176
|
-
showSizeChanger: !e,
|
|
177
|
-
showQuickJumper: !e,
|
|
177
|
+
showSizeChanger: Q(d.showSizeChanger) ? d.showSizeChanger : !e,
|
|
178
|
+
showQuickJumper: Q(d.showQuickJumper) ? d.showQuickJumper : !e,
|
|
178
179
|
showLessItems: e,
|
|
179
180
|
size: "default",
|
|
180
|
-
showTotal: t ? (r) =>
|
|
181
|
+
showTotal: t ? (r) => b("span", {
|
|
181
182
|
class: P("pagination-total-wrapper")
|
|
182
|
-
}, [
|
|
183
|
+
}, [w("ap.apTable.pagination.totalLeftPrefix"), " ", b("span", {
|
|
183
184
|
class: P("pagination-count-text")
|
|
184
|
-
}, [r]), " ",
|
|
185
|
+
}, [r]), " ", w("ap.apTable.pagination.totalLeftSuffix"), b("span", {
|
|
185
186
|
class: P("pagination--total-right")
|
|
186
|
-
}, [
|
|
187
|
+
}, [w("ap.apTable.pagination.totalRightPrefix"), " ", b("span", {
|
|
187
188
|
class: P("pagination-count-text")
|
|
188
|
-
}, [
|
|
189
|
+
}, [S(te)]), " ", w("ap.apTable.pagination.totalRightSuffix")])]) : void 0
|
|
189
190
|
},
|
|
190
|
-
onChange:
|
|
191
|
+
onChange: q,
|
|
191
192
|
dataSource: o.records
|
|
192
193
|
};
|
|
193
194
|
});
|
|
194
195
|
return {
|
|
195
|
-
formRef:
|
|
196
|
-
submit:
|
|
197
|
-
reset:
|
|
198
|
-
refresh:
|
|
199
|
-
refreshByDelete:
|
|
196
|
+
formRef: T,
|
|
197
|
+
submit: A,
|
|
198
|
+
reset: k,
|
|
199
|
+
refresh: j,
|
|
200
|
+
refreshByDelete: ee,
|
|
200
201
|
data: o,
|
|
201
|
-
current:
|
|
202
|
-
pageSize:
|
|
203
|
-
handleTableChange:
|
|
204
|
-
tableProps:
|
|
205
|
-
dataSource:
|
|
206
|
-
setDataSource:
|
|
207
|
-
getColumnSFConfig:
|
|
208
|
-
sortedInfo:
|
|
209
|
-
filteredInfo:
|
|
202
|
+
current: i.current,
|
|
203
|
+
pageSize: i.pageSize,
|
|
204
|
+
handleTableChange: q,
|
|
205
|
+
tableProps: oe,
|
|
206
|
+
dataSource: D(() => o.records),
|
|
207
|
+
setDataSource: re,
|
|
208
|
+
getColumnSFConfig: $,
|
|
209
|
+
sortedInfo: Z,
|
|
210
|
+
filteredInfo: H
|
|
210
211
|
};
|
|
211
212
|
};
|
|
212
213
|
export {
|
|
213
|
-
|
|
214
|
+
z as DEFAULT_CURRENT,
|
|
214
215
|
L as DEFAULT_PAGE_SIZE,
|
|
215
|
-
|
|
216
|
+
xe as useTablePaging
|
|
216
217
|
};
|
|
@@ -226,6 +226,14 @@ export type ApTablePaginationConfig = {
|
|
|
226
226
|
* 用于显示数据总量和当前数据顺序
|
|
227
227
|
*/
|
|
228
228
|
showTotal?: boolean;
|
|
229
|
+
/**
|
|
230
|
+
* 是否显示尺寸切换器
|
|
231
|
+
*/
|
|
232
|
+
showSizeChanger?: boolean;
|
|
233
|
+
/**
|
|
234
|
+
* 是否显示快速跳转
|
|
235
|
+
*/
|
|
236
|
+
showQuickJumper?: boolean;
|
|
229
237
|
};
|
|
230
238
|
export type ApTableProps<RecordType = any, ParamsType = any> = Omit<TableProps<RecordType>, 'columns' | 'pagination' | 'dataSource' | 'size' | 'rowSelection'> & {
|
|
231
239
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApLadderLabelValue, ApLadderProps, ApLadderSlots } from './interface';
|
|
2
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType, CSSProperties,
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType, CSSProperties, ComponentProvideOptions } from 'vue';
|
|
3
3
|
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
4
4
|
import { TriggerType } from '@aplus-frontend/antdv/es/tooltip/abstractTooltipProps';
|
|
5
5
|
import { TooltipPlacement, AdjustOverflow } from '@aplus-frontend/antdv/es/tooltip';
|
|
@@ -9,18 +9,13 @@ import { AlignType, BuildInPlacements } from '@aplus-frontend/antdv/es/vc-trigge
|
|
|
9
9
|
declare function __VLS_template(): {
|
|
10
10
|
attrs: Partial<{}>;
|
|
11
11
|
slots: Readonly<ApLadderSlots> & ApLadderSlots;
|
|
12
|
-
refs: {
|
|
13
|
-
wrapperRef: HTMLDivElement;
|
|
14
|
-
valueRefs: HTMLSpanElement;
|
|
15
|
-
};
|
|
12
|
+
refs: {};
|
|
16
13
|
rootEl: HTMLDivElement;
|
|
17
14
|
};
|
|
18
15
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
16
|
declare const __VLS_component: DefineComponent<ApLadderProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApLadderProps> & Readonly<{}>, {
|
|
20
17
|
layout: "vertical" | "horizontal";
|
|
21
18
|
tooltip: boolean;
|
|
22
|
-
major: string;
|
|
23
|
-
minor: string;
|
|
24
19
|
labelAlign: "left" | "right";
|
|
25
20
|
tooltipProps: Partial<Pick<Partial< ExtractPropTypes<{
|
|
26
21
|
title: VueTypeValidableDef<any>;
|
|
@@ -97,21 +92,10 @@ declare const __VLS_component: DefineComponent<ApLadderProps, {}, {}, {}, {}, Co
|
|
|
97
92
|
default: boolean;
|
|
98
93
|
};
|
|
99
94
|
}>>, "title" | "placement" | "color" | "mouseEnterDelay" | "trigger" | "getPopupContainer" | "align" | "overlayStyle" | "overlayInnerStyle" | "overlayClassName" | "mouseLeaveDelay" | "arrowPointAtCenter" | "arrow" | "autoAdjustOverflow" | "destroyTooltipOnHide">>;
|
|
95
|
+
labelValues: Array<ApLadderLabelValue>;
|
|
100
96
|
majorColor: string;
|
|
101
|
-
majorStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
102
97
|
minorColor: string;
|
|
103
|
-
|
|
104
|
-
labelValues: Array<ApLadderLabelValue>;
|
|
105
|
-
labelStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
106
|
-
valueStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
107
|
-
linkStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
108
|
-
unitStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
109
|
-
tooltipLabelStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
110
|
-
tooltipValueStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
111
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
112
|
-
wrapperRef: HTMLDivElement;
|
|
113
|
-
valueRefs: HTMLSpanElement;
|
|
114
|
-
}, HTMLDivElement>;
|
|
98
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
115
99
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
116
100
|
export default _default;
|
|
117
101
|
type __VLS_WithTemplateSlots<T, S> = T & {
|