@aplus-frontend/ui 0.1.25 → 0.1.27
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-download/ap-download.vue.d.ts +7 -3
- package/es/src/ap-download/ap-download.vue.mjs +50 -35
- package/es/src/ap-download/interface.d.ts +3 -11
- package/es/src/ap-download/style/ap-download.css +3 -0
- package/es/src/ap-form/ap-form-item.vue.mjs +26 -26
- package/es/src/ap-table/ap-table.vue.mjs +231 -183
- package/es/src/ap-table/components/interface.d.ts +33 -1
- package/es/src/ap-table/components/setting/images/icon_carst_down.svg.mjs +4 -0
- package/es/src/ap-table/components/setting/images/icon_fill_right.svg.mjs +4 -0
- package/es/src/ap-table/components/setting/modal/index.vue.d.ts +28 -0
- package/es/src/ap-table/components/setting/modal/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +152 -0
- package/es/src/ap-table/components/setting/select-group/index.vue.d.ts +13 -0
- package/es/src/ap-table/components/setting/select-group/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +96 -0
- package/es/src/ap-table/components/setting/sortable/index.vue.d.ts +13 -0
- package/es/src/ap-table/components/setting/sortable/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +51 -0
- package/es/src/ap-table/components/setting/sortable/item.vue.d.ts +20 -0
- package/es/src/ap-table/components/setting/sortable/item.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +140 -0
- package/es/src/ap-table/components/setting/sorter/context.d.ts +11 -0
- package/es/src/ap-table/components/setting/sorter/context.mjs +20 -0
- package/es/src/ap-table/components/setting/sorter/index.vue.d.ts +18 -0
- package/es/src/ap-table/components/setting/sorter/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +199 -0
- package/es/src/ap-table/components/setting/tree-select/index.vue.d.ts +13 -0
- package/es/src/ap-table/components/setting/tree-select/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +75 -0
- package/es/src/ap-table/components/setting/utils.d.ts +17 -0
- package/es/src/ap-table/components/setting/utils.mjs +48 -0
- package/es/src/ap-table/components/style/setting/modal.css +39 -0
- package/es/src/ap-table/components/style/setting/select-group.css +7 -0
- package/es/src/ap-table/components/style/setting/sortable-item-meta.css +50 -0
- package/es/src/ap-table/components/style/setting/sortable-item.css +3 -0
- package/es/src/ap-table/components/style/setting/sorter.css +26 -0
- package/es/src/ap-table/constants.d.ts +31 -8
- package/es/src/ap-table/constants.mjs +41 -53
- package/es/src/ap-table/context.d.ts +31 -0
- package/es/src/ap-table/context.mjs +20 -0
- package/es/src/ap-table/hooks/use-table-column-state.d.ts +18 -0
- package/es/src/ap-table/hooks/use-table-column-state.mjs +46 -0
- package/es/src/ap-table/hooks/use-table-content-height.mjs +19 -19
- package/es/src/ap-table/hooks/use-table-paging.d.ts +1 -0
- package/es/src/ap-table/hooks/use-table-paging.mjs +87 -82
- package/es/src/ap-table/interface.d.ts +51 -1
- package/es/src/ap-table/style/ap-table.css +29 -1
- package/es/src/ap-table/utils.d.ts +1 -1
- package/es/src/ap-table/utils.mjs +82 -82
- package/es/src/ap-upload/components/MultipleFile.vue2.mjs +91 -89
- package/es/src/ap-upload/components/Picture.vue2.mjs +114 -112
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +10 -7
- package/es/src/business/ap-attachment/ApAttachment.d.ts +1 -1
- package/es/src/business/ap-attachment/ApAttachment.mjs +45 -42
- package/es/src/business/ap-attachment/style.css +2 -0
- package/es/src/business/ap-ladder/ApLadder.vue2.mjs +114 -84
- package/es/src/business/ap-ladder/interface.d.ts +42 -0
- package/es/src/business/ap-ladder/interface.mjs +10 -0
- package/es/src/business/hooks/usePageListApTable.d.ts +8 -3
- package/es/src/business/hooks/usePageListApTable.mjs +27 -17
- package/es/src/business/hooks/useTableRefresh.d.ts +3 -4
- package/es/src/business/hooks/useTableRefresh.mjs +9 -9
- package/es/src/business/index.d.ts +4 -4
- package/es/src/editable-table/interface.d.ts +1 -1
- package/es/src/locale/lang/en.mjs +14 -0
- package/es/src/locale/lang/zh-cn.mjs +14 -0
- package/es/src/theme/ap-attachment/ap-attachment.css +2 -0
- package/es/src/theme/ap-download/ap-download.css +3 -0
- package/es/src/theme/ap-table/ap-table.css +29 -1
- package/es/src/theme/ap-table/setting/modal.css +39 -0
- package/es/src/theme/ap-table/setting/select-group.css +7 -0
- package/es/src/theme/ap-table/setting/sortable-item-meta.css +50 -0
- package/es/src/theme/ap-table/setting/sortable-item.css +3 -0
- package/es/src/theme/ap-table/setting/sorter.css +26 -0
- package/es/src/theme/css-var/index.mjs +22 -12
- package/lib/src/ap-download/ap-download.vue.d.ts +7 -3
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/interface.d.ts +3 -11
- package/lib/src/ap-download/style/ap-download.css +3 -0
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/components/interface.d.ts +33 -1
- package/lib/src/ap-table/components/setting/images/icon_carst_down.svg.js +1 -0
- package/lib/src/ap-table/components/setting/images/icon_fill_right.svg.js +1 -0
- package/lib/src/ap-table/components/setting/modal/index.vue.d.ts +28 -0
- package/lib/src/ap-table/components/setting/modal/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/select-group/index.vue.d.ts +13 -0
- package/lib/src/ap-table/components/setting/select-group/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/sortable/index.vue.d.ts +13 -0
- package/lib/src/ap-table/components/setting/sortable/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/sortable/item.vue.d.ts +20 -0
- package/lib/src/ap-table/components/setting/sortable/item.vue.js +1 -0
- package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/sorter/context.d.ts +11 -0
- package/lib/src/ap-table/components/setting/sorter/context.js +1 -0
- package/lib/src/ap-table/components/setting/sorter/index.vue.d.ts +18 -0
- package/lib/src/ap-table/components/setting/sorter/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/tree-select/index.vue.d.ts +13 -0
- package/lib/src/ap-table/components/setting/tree-select/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/utils.d.ts +17 -0
- package/lib/src/ap-table/components/setting/utils.js +1 -0
- package/lib/src/ap-table/components/style/setting/modal.css +39 -0
- package/lib/src/ap-table/components/style/setting/select-group.css +7 -0
- package/lib/src/ap-table/components/style/setting/sortable-item-meta.css +50 -0
- package/lib/src/ap-table/components/style/setting/sortable-item.css +3 -0
- package/lib/src/ap-table/components/style/setting/sorter.css +26 -0
- package/lib/src/ap-table/constants.d.ts +31 -8
- package/lib/src/ap-table/constants.js +1 -1
- package/lib/src/ap-table/context.d.ts +31 -0
- package/lib/src/ap-table/context.js +1 -0
- package/lib/src/ap-table/hooks/use-table-column-state.d.ts +18 -0
- package/lib/src/ap-table/hooks/use-table-column-state.js +1 -0
- package/lib/src/ap-table/hooks/use-table-content-height.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging.d.ts +1 -0
- package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
- package/lib/src/ap-table/interface.d.ts +51 -1
- package/lib/src/ap-table/style/ap-table.css +29 -1
- package/lib/src/ap-table/utils.d.ts +1 -1
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
- package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.d.ts +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-attachment/style.css +2 -0
- package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -1
- package/lib/src/business/ap-ladder/interface.d.ts +42 -0
- package/lib/src/business/ap-ladder/interface.js +1 -0
- package/lib/src/business/hooks/usePageListApTable.d.ts +8 -3
- package/lib/src/business/hooks/usePageListApTable.js +1 -1
- package/lib/src/business/hooks/useTableRefresh.d.ts +3 -4
- package/lib/src/business/hooks/useTableRefresh.js +1 -1
- package/lib/src/business/index.d.ts +4 -4
- package/lib/src/editable-table/interface.d.ts +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-attachment/ap-attachment.css +2 -0
- package/lib/src/theme/ap-download/ap-download.css +3 -0
- package/lib/src/theme/ap-table/ap-table.css +29 -1
- package/lib/src/theme/ap-table/setting/modal.css +39 -0
- package/lib/src/theme/ap-table/setting/select-group.css +7 -0
- package/lib/src/theme/ap-table/setting/sortable-item-meta.css +50 -0
- package/lib/src/theme/ap-table/setting/sortable-item.css +3 -0
- package/lib/src/theme/ap-table/setting/sorter.css +26 -0
- package/lib/src/theme/css-var/index.js +1 -1
- package/package.json +3 -2
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Tooltip as
|
|
1
|
+
import { defineComponent as q, useSlots as H, ref as R, computed as h, unref as l, onMounted as J, openBlock as t, createElementBlock as r, normalizeClass as u, createBlock as $, normalizeProps as w, mergeProps as E, createSlots as M, withCtx as b, Fragment as y, createElementVNode as p, normalizeStyle as m, toDisplayString as i, renderSlot as N, createCommentVNode as f, renderList as z, createTextVNode as K } from "vue";
|
|
2
|
+
import { Tooltip as O } from "ant-design-vue";
|
|
3
3
|
import "../../config-provider/index.mjs";
|
|
4
|
+
import { locales as Q } from "./interface.mjs";
|
|
4
5
|
import "./style.css";
|
|
5
|
-
import { useNamespace as
|
|
6
|
-
import { useGlobalConfig as
|
|
7
|
-
const
|
|
6
|
+
import { useNamespace as U } from "../../config-provider/hooks/use-namespace.mjs";
|
|
7
|
+
import { useGlobalConfig as X } from "../../config-provider/hooks/use-global-config.mjs";
|
|
8
|
+
const Y = { key: 1 }, Z = { key: 0 }, x = { key: 1 }, ee = { key: 0 }, oe = ["onClick"], te = { key: 0 }, re = { key: 1 }, le = { key: 0 }, se = { key: 1 }, me = /* @__PURE__ */ q({
|
|
8
9
|
name: "ApLadder",
|
|
9
10
|
__name: "ApLadder",
|
|
10
11
|
props: {
|
|
@@ -33,114 +34,143 @@ const K = { key: 0 }, Q = { key: 1 }, R = ["onClick"], U = { key: 0 }, X = { key
|
|
|
33
34
|
trigger: "hover"
|
|
34
35
|
}) }
|
|
35
36
|
},
|
|
36
|
-
setup(
|
|
37
|
-
const
|
|
38
|
-
color: `${
|
|
39
|
-
} : {}),
|
|
40
|
-
color: `${
|
|
41
|
-
} : {}),
|
|
42
|
-
const e =
|
|
43
|
-
|
|
37
|
+
setup(A) {
|
|
38
|
+
const v = H(), s = A, { b: B, e: n, m: L } = U("ap-ladder"), F = X("uiMode", "aplus"), _ = `ap-ladder-${Math.floor(Math.random() * 1e7)}`, W = n("ellipsis"), k = R(!1), D = h(() => s.labelValues.length === 0), T = h(() => s.labelValues.length > 0), g = h(() => s.majorColor ? {
|
|
39
|
+
color: `${s.majorColor}`
|
|
40
|
+
} : {}), S = h(() => s.minorColor ? {
|
|
41
|
+
color: `${s.minorColor}`
|
|
42
|
+
} : {}), C = (o) => o == null || typeof o == "string" && o.trim() === "", c = (o, a = {}) => {
|
|
43
|
+
const e = {
|
|
44
|
+
rawValue: a.rawValue,
|
|
45
|
+
precision: a.precision === void 0 ? 2 : a.precision,
|
|
46
|
+
thousand: a.thousand,
|
|
47
|
+
thousandSeparator: a.thousandSeparator || ",",
|
|
48
|
+
currency: a.currency,
|
|
49
|
+
percent: a.percent
|
|
50
|
+
};
|
|
51
|
+
return C(o) ? "--" : e.rawValue ? o : typeof o == "number" ? e.percent ? `${o.toFixed(e.precision)}%` : e.currency ? o.toLocaleString(Q[e.currency], {
|
|
52
|
+
style: "currency",
|
|
53
|
+
currency: e.currency
|
|
54
|
+
}) : e.thousand ? o.toFixed(e.precision).replace(
|
|
55
|
+
/(\d)(?=(\d{3})+(?!\d))/g,
|
|
56
|
+
`$1${e.thousandSeparator}`
|
|
57
|
+
) : o.toFixed(e.precision) : o;
|
|
58
|
+
}, G = () => {
|
|
59
|
+
const o = document.getElementById(_);
|
|
60
|
+
if (!o)
|
|
44
61
|
return;
|
|
45
|
-
|
|
46
|
-
|
|
62
|
+
const a = o.querySelectorAll(`.${W}`);
|
|
63
|
+
new ResizeObserver((d) => {
|
|
64
|
+
d.forEach((j) => {
|
|
65
|
+
j.target === o && (k.value = !1, a.forEach((P) => {
|
|
66
|
+
P.clientWidth < P.scrollWidth && (k.value = !0);
|
|
67
|
+
}));
|
|
68
|
+
});
|
|
69
|
+
}).observe(o), k.value = !1, a.forEach((d) => {
|
|
70
|
+
d.clientWidth < d.scrollWidth && (k.value = !0);
|
|
47
71
|
});
|
|
48
|
-
},
|
|
49
|
-
|
|
72
|
+
}, V = h(() => v.title ? !0 : s.tooltip && l(k)), I = (o) => {
|
|
73
|
+
o && window.open(o, "_blank");
|
|
50
74
|
};
|
|
51
|
-
return
|
|
52
|
-
|
|
53
|
-
}), (
|
|
54
|
-
id:
|
|
55
|
-
class:
|
|
75
|
+
return J(() => {
|
|
76
|
+
G();
|
|
77
|
+
}), (o, a) => (t(), r("div", {
|
|
78
|
+
id: _,
|
|
79
|
+
class: u([l(B)(), `${l(L)(l(F))}`])
|
|
56
80
|
}, [
|
|
57
|
-
|
|
58
|
-
default:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
D.value ? (t(), $(l(O), w(E({ key: 0 }, { ...s.tooltipProps })), M({
|
|
82
|
+
default: b(() => [
|
|
83
|
+
!C(o.major) || !C(o.minor) ? (t(), r(y, { key: 0 }, [
|
|
84
|
+
s.layout === "vertical" ? (t(), r(y, { key: 0 }, [
|
|
85
|
+
p("div", {
|
|
86
|
+
class: u([l(n)("major"), l(n)("ellipsis")]),
|
|
87
|
+
style: m(g.value)
|
|
88
|
+
}, i(c(o.major)), 7),
|
|
89
|
+
p("div", {
|
|
90
|
+
class: u([l(n)("minor"), l(n)("ellipsis")]),
|
|
91
|
+
style: m(S.value)
|
|
92
|
+
}, i(c(o.minor)), 7)
|
|
93
|
+
], 64)) : (t(), r("div", {
|
|
94
|
+
key: 1,
|
|
95
|
+
class: u(l(n)("ellipsis"))
|
|
96
|
+
}, [
|
|
97
|
+
p("span", {
|
|
98
|
+
class: u([l(n)("major")]),
|
|
99
|
+
style: m(g.value)
|
|
100
|
+
}, i(c(o.major)), 7),
|
|
101
|
+
p("span", {
|
|
102
|
+
class: u([l(n)("minor")]),
|
|
103
|
+
style: m(S.value)
|
|
104
|
+
}, i(c(o.minor)), 7)
|
|
105
|
+
], 2))
|
|
106
|
+
], 64)) : (t(), r("div", Y, i("--")))
|
|
81
107
|
]),
|
|
82
108
|
_: 2
|
|
83
109
|
}, [
|
|
84
|
-
|
|
110
|
+
V.value ? {
|
|
85
111
|
name: "title",
|
|
86
|
-
fn:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
112
|
+
fn: b(() => [
|
|
113
|
+
v.title ? N(o.$slots, "title", { key: 0 }) : (t(), r(y, { key: 1 }, [
|
|
114
|
+
s.tooltipProps.title ? (t(), r("div", Z, i(s.tooltipProps.title), 1)) : (t(), r("div", x, [
|
|
115
|
+
p("div", null, i(c(o.major)), 1),
|
|
116
|
+
p("div", null, i(c(o.minor)), 1)
|
|
91
117
|
]))
|
|
92
118
|
], 64))
|
|
93
119
|
]),
|
|
94
120
|
key: "0"
|
|
95
121
|
} : void 0
|
|
96
|
-
]), 1040)) :
|
|
97
|
-
|
|
98
|
-
default:
|
|
99
|
-
(t(!0),
|
|
100
|
-
key:
|
|
101
|
-
class:
|
|
122
|
+
]), 1040)) : f("", !0),
|
|
123
|
+
T.value ? (t(), $(l(O), w(E({ key: 1 }, { ...s.tooltipProps })), M({
|
|
124
|
+
default: b(() => [
|
|
125
|
+
(t(!0), r(y, null, z(s.labelValues, (e, d) => (t(), r("div", {
|
|
126
|
+
key: d,
|
|
127
|
+
class: u([l(n)("ellipsis")])
|
|
102
128
|
}, [
|
|
103
|
-
|
|
104
|
-
class:
|
|
105
|
-
style:
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
onClick: (Y) => G(o.link)
|
|
112
|
-
}, i(f(o.value)), 15, R)) : (t(), s("span", {
|
|
129
|
+
p("span", {
|
|
130
|
+
class: u(l(n)("label")),
|
|
131
|
+
style: m(e.labelColor ? { color: e.labelColor } : void 0)
|
|
132
|
+
}, [
|
|
133
|
+
K(i(e.label), 1),
|
|
134
|
+
e.label ? (t(), r("span", ee, ":")) : f("", !0)
|
|
135
|
+
], 6),
|
|
136
|
+
C(e.link) ? (t(), r("span", {
|
|
113
137
|
key: 1,
|
|
114
|
-
class:
|
|
115
|
-
style:
|
|
116
|
-
}, i(
|
|
117
|
-
|
|
138
|
+
class: u(l(n)("value")),
|
|
139
|
+
style: m(e.valueColor ? { color: e.valueColor } : void 0)
|
|
140
|
+
}, i(c(e.value, { ...e })), 7)) : (t(), r("span", {
|
|
141
|
+
key: 0,
|
|
142
|
+
class: u(l(n)("link")),
|
|
143
|
+
style: m(e.linkColor ? { color: e.linkColor } : void 0),
|
|
144
|
+
onClick: (j) => I(e.link)
|
|
145
|
+
}, i(c(e.value, { ...e })), 15, oe)),
|
|
146
|
+
e.unit ? (t(), r("span", {
|
|
118
147
|
key: 2,
|
|
119
|
-
class:
|
|
120
|
-
style:
|
|
121
|
-
}, i(
|
|
148
|
+
class: u(l(n)("unit")),
|
|
149
|
+
style: m(e.unitColor ? { color: e.unitColor } : void 0)
|
|
150
|
+
}, i(e.unit), 7)) : f("", !0)
|
|
122
151
|
], 2))), 128))
|
|
123
152
|
]),
|
|
124
153
|
_: 2
|
|
125
154
|
}, [
|
|
126
|
-
|
|
155
|
+
V.value ? {
|
|
127
156
|
name: "title",
|
|
128
|
-
fn:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
(t(!0),
|
|
132
|
-
|
|
133
|
-
|
|
157
|
+
fn: b(() => [
|
|
158
|
+
v.title ? N(o.$slots, "title", { key: 0 }) : (t(), r(y, { key: 1 }, [
|
|
159
|
+
s.tooltipProps.title ? (t(), r("div", te, i(s.tooltipProps.title), 1)) : (t(), r("div", re, [
|
|
160
|
+
(t(!0), r(y, null, z(s.labelValues, (e, d) => (t(), r("div", { key: d }, [
|
|
161
|
+
e.label ? (t(), r("span", le, i(e.label), 1)) : f("", !0),
|
|
162
|
+
e.label ? (t(), r("span", se, ":")) : f("", !0),
|
|
163
|
+
p("span", null, i(c(e.value, { ...e })), 1)
|
|
134
164
|
]))), 128))
|
|
135
165
|
]))
|
|
136
166
|
], 64))
|
|
137
167
|
]),
|
|
138
168
|
key: "0"
|
|
139
169
|
} : void 0
|
|
140
|
-
]), 1040)) :
|
|
170
|
+
]), 1040)) : f("", !0)
|
|
141
171
|
], 2));
|
|
142
172
|
}
|
|
143
173
|
});
|
|
144
174
|
export {
|
|
145
|
-
|
|
175
|
+
me as default
|
|
146
176
|
};
|
|
@@ -16,6 +16,30 @@ export interface ApLadderLabelValue {
|
|
|
16
16
|
* 值
|
|
17
17
|
*/
|
|
18
18
|
value: string | number | undefined | null;
|
|
19
|
+
/**
|
|
20
|
+
* 是否采用原始值
|
|
21
|
+
*/
|
|
22
|
+
rawValue?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* 精度 默认2位小数
|
|
25
|
+
*/
|
|
26
|
+
precision?: number;
|
|
27
|
+
/**
|
|
28
|
+
* 千分位展示
|
|
29
|
+
*/
|
|
30
|
+
thousand?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* 千分位分隔符
|
|
33
|
+
*/
|
|
34
|
+
thousandSeparator?: string;
|
|
35
|
+
/**
|
|
36
|
+
* 货币单位
|
|
37
|
+
*/
|
|
38
|
+
currency?: CurrencyCode;
|
|
39
|
+
/**
|
|
40
|
+
* 百分比展示
|
|
41
|
+
*/
|
|
42
|
+
percent?: boolean;
|
|
19
43
|
/**
|
|
20
44
|
* 自定义单位
|
|
21
45
|
*/
|
|
@@ -90,3 +114,21 @@ export interface ApLadderProps {
|
|
|
90
114
|
export interface ApLadderSlots {
|
|
91
115
|
title?: VNode;
|
|
92
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* 国际货币代码-映射-语言
|
|
119
|
+
*/
|
|
120
|
+
export interface CurrencyCodeInLocale {
|
|
121
|
+
[string: string]: Intl.LocalesArgument;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* 国际货币代码
|
|
125
|
+
* - `CNY` 人民币
|
|
126
|
+
* - `USD` 美元
|
|
127
|
+
* - `EUR` 欧元
|
|
128
|
+
* - `GBP` 英镑
|
|
129
|
+
*/
|
|
130
|
+
export type CurrencyCode = 'CNY' | 'USD' | 'EUR' | 'GBP';
|
|
131
|
+
/**
|
|
132
|
+
* 国际货币代码-映射-语言
|
|
133
|
+
*/
|
|
134
|
+
export declare const locales: CurrencyCodeInLocale;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ApTableProps } from '../../';
|
|
2
|
+
import { UseTableRefreshOption } from './useTableRefresh';
|
|
2
3
|
import { Recordable } from '../../type';
|
|
3
4
|
export interface UsePageListApTable extends ApTableProps {
|
|
4
5
|
/** 是否显示默认的行选择配置
|
|
@@ -15,6 +16,10 @@ export interface UsePageListApTable extends ApTableProps {
|
|
|
15
16
|
clearSelectionOnRequest?: boolean;
|
|
16
17
|
/** 用于覆盖默认的class */
|
|
17
18
|
class?: string;
|
|
19
|
+
/**
|
|
20
|
+
* 表格刷新相关
|
|
21
|
+
*/
|
|
22
|
+
tableRefresh?: boolean | Omit<UseTableRefreshOption, 'apTableRef'>;
|
|
18
23
|
}
|
|
19
24
|
/**
|
|
20
25
|
* 集成了列表页面的ApTable的默认配置
|
|
@@ -33,14 +38,14 @@ export declare function usePageListApTable(props?: UsePageListApTable): [ApTable
|
|
|
33
38
|
dataSource: any;
|
|
34
39
|
rowSelection?: {
|
|
35
40
|
select: (item: any) => void;
|
|
41
|
+
selectAll: () => void;
|
|
42
|
+
unSelectAll: () => void;
|
|
36
43
|
selectedRows: any[];
|
|
37
44
|
unSelect: (item: any) => void;
|
|
38
45
|
isSelected: (item: any) => boolean;
|
|
39
|
-
selectAll: () => void;
|
|
40
|
-
unSelectAll: () => void;
|
|
41
46
|
clearAll: () => void;
|
|
42
47
|
toggleSelect: (item: any) => void;
|
|
43
48
|
} | undefined;
|
|
44
|
-
} | null;
|
|
49
|
+
} | null | undefined;
|
|
45
50
|
clearSelection: () => void;
|
|
46
51
|
}];
|
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
import { merge as m } from "lodash-unified";
|
|
2
|
-
import { ref as
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { ref as b } from "vue";
|
|
3
|
+
import { useTableRefresh as d } from "./useTableRefresh.mjs";
|
|
4
|
+
function h(a) {
|
|
5
|
+
return a === !0 ? {} : a === !1 ? {
|
|
6
|
+
refreshBefore: () => !1
|
|
7
|
+
} : a;
|
|
8
|
+
}
|
|
9
|
+
function F(a) {
|
|
10
|
+
const r = b(null), {
|
|
5
11
|
isShowRowSelection: c = !0,
|
|
6
12
|
clearSelectionOnRequest: u = !0,
|
|
7
13
|
transformSearchFormValues: o,
|
|
8
|
-
api:
|
|
9
|
-
|
|
10
|
-
|
|
14
|
+
api: s,
|
|
15
|
+
tableRefresh: i = !1,
|
|
16
|
+
...f
|
|
17
|
+
} = a || {}, n = () => {
|
|
11
18
|
var e, t;
|
|
12
19
|
(t = (e = r.value) == null ? void 0 : e.rowSelection) == null || t.clearAll();
|
|
13
20
|
};
|
|
14
|
-
return
|
|
21
|
+
return d({
|
|
22
|
+
...h(i),
|
|
23
|
+
apTableRef: r
|
|
24
|
+
}), [m(
|
|
15
25
|
{
|
|
16
26
|
// scroll,tableLayout,columnResizable设置表格可拖动
|
|
17
27
|
scroll: { x: "100%", y: "100%" },
|
|
@@ -19,17 +29,17 @@ function y(n) {
|
|
|
19
29
|
columnResizable: !0,
|
|
20
30
|
// 表格header吸顶效果
|
|
21
31
|
class: "ap-table--sticky",
|
|
22
|
-
request:
|
|
32
|
+
request: s ? async (e) => {
|
|
23
33
|
const t = o ? o(e) : e;
|
|
24
34
|
try {
|
|
25
|
-
if (!
|
|
26
|
-
const { records:
|
|
27
|
-
return u &&
|
|
28
|
-
data:
|
|
35
|
+
if (!s) throw new Error("api is not defined");
|
|
36
|
+
const { records: l, total: p } = await s(t);
|
|
37
|
+
return u && n(), {
|
|
38
|
+
data: l,
|
|
29
39
|
total: p
|
|
30
40
|
};
|
|
31
|
-
} catch (
|
|
32
|
-
return console.error(
|
|
41
|
+
} catch (l) {
|
|
42
|
+
return console.error(l), {
|
|
33
43
|
data: [],
|
|
34
44
|
total: 0
|
|
35
45
|
};
|
|
@@ -44,7 +54,7 @@ function y(n) {
|
|
|
44
54
|
r.value = e;
|
|
45
55
|
}
|
|
46
56
|
},
|
|
47
|
-
|
|
57
|
+
f
|
|
48
58
|
), {
|
|
49
59
|
reload: () => {
|
|
50
60
|
var e;
|
|
@@ -60,9 +70,9 @@ function y(n) {
|
|
|
60
70
|
return o ? o(e) : e;
|
|
61
71
|
},
|
|
62
72
|
getApTableInstance: () => r.value,
|
|
63
|
-
clearSelection:
|
|
73
|
+
clearSelection: n
|
|
64
74
|
}];
|
|
65
75
|
}
|
|
66
76
|
export {
|
|
67
|
-
|
|
77
|
+
F as usePageListApTable
|
|
68
78
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { ApTableExpose } from '
|
|
3
|
-
interface UseTableRefreshOption {
|
|
2
|
+
import { ApTableExpose } from '../../';
|
|
3
|
+
export interface UseTableRefreshOption {
|
|
4
4
|
/**
|
|
5
5
|
* apTable实例
|
|
6
6
|
*/
|
|
7
|
-
apTableRef?: Ref<ApTableExpose | undefined>;
|
|
7
|
+
apTableRef?: Ref<ApTableExpose | undefined | null>;
|
|
8
8
|
/**
|
|
9
9
|
* 刷新类型,reset:重置,submit:提交
|
|
10
10
|
*/
|
|
@@ -15,4 +15,3 @@ interface UseTableRefreshOption {
|
|
|
15
15
|
refreshBefore?: () => boolean;
|
|
16
16
|
}
|
|
17
17
|
export declare function useTableRefresh(option?: UseTableRefreshOption): void;
|
|
18
|
-
export {};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
function
|
|
1
|
+
import { onMounted as c, nextTick as l, onActivated as T } from "vue";
|
|
2
|
+
function m(e) {
|
|
3
3
|
const a = (["reset", "submit", void 0].includes(e == null ? void 0 : e.refreskType) ? e == null ? void 0 : e.refreskType : "submit") ?? "submit", r = (e == null ? void 0 : e.refreshBefore) ?? (() => !0);
|
|
4
4
|
let s = !0;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
if (s) {
|
|
5
|
+
c(() => {
|
|
6
|
+
l(() => {
|
|
8
7
|
s = !1;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
});
|
|
9
|
+
}), T(() => {
|
|
10
|
+
var u, f;
|
|
11
|
+
s || r != null && r() && ((f = (u = e == null ? void 0 : e.apTableRef) == null ? void 0 : u.value) == null || f[a]());
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
m as useTableRefresh
|
|
16
16
|
};
|
|
@@ -3,7 +3,7 @@ import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOpt
|
|
|
3
3
|
import { TooltipPlacement, AdjustOverflow } from 'ant-design-vue/es/tooltip';
|
|
4
4
|
import { VueTypeValidableDef } from '../../node_modules/vue-types';
|
|
5
5
|
import { LiteralUnion, Key } from 'ant-design-vue/es/_util/type';
|
|
6
|
-
import { ApStatusProps, ApStatusGroupItemProps, ApSelectItem, ApLabelGroupItemProps, ApBatchActionGroupMenuProps } from '.';
|
|
6
|
+
import { ApStatusProps, ApStatusGroupItemProps, ApSelectItem, ApLabelGroupItemProps, ApBatchActionGroupMenuProps, ApLadderLabelValue } from '.';
|
|
7
7
|
import { ValueType } from 'ant-design-vue/es/input-number/src/utils/MiniDecimal';
|
|
8
8
|
import { ApInputRadioOptions } from './ap-input-radio';
|
|
9
9
|
import { KeyboardEventHandler, MouseEventHandler, FocusEventHandler } from 'ant-design-vue/es/_util/EventInterface';
|
|
@@ -17,7 +17,7 @@ import { accessCreate } from '@aplus-frontend/oss';
|
|
|
17
17
|
import { TriggerType } from 'ant-design-vue/es/tooltip/abstractTooltipProps';
|
|
18
18
|
import { PresetColorType } from 'ant-design-vue/es/_util/colors';
|
|
19
19
|
import { AlignType, BuildInPlacements } from 'ant-design-vue/es/vc-trigger/interface';
|
|
20
|
-
import {
|
|
20
|
+
import { ApLadderSlots } from './ap-ladder/interface';
|
|
21
21
|
import { AttachmentItemProps, ApAttachmentProps } from './ap-attachment';
|
|
22
22
|
export * from './hooks/index';
|
|
23
23
|
export type { ApTitleProps } from './title/interface';
|
|
@@ -27,7 +27,7 @@ export type { ApStatusProps, ApStatusGroupProps, ApStatusGroupItemProps } from '
|
|
|
27
27
|
export type { ApSelectItem, ApSelectLayoutProps } from './ap-select-layout/interface';
|
|
28
28
|
export type { ApInputRadioProps, ApInputValType } from './ap-input-radio/interface';
|
|
29
29
|
export type { ApExportGroupProps } from './ap-export-group/interface';
|
|
30
|
-
export type { ApLadderProps } from './ap-ladder/interface';
|
|
30
|
+
export type { ApLadderProps, ApLadderLabelValue, CurrencyCode, TooltipNeedProps } from './ap-ladder/interface';
|
|
31
31
|
export * from './ap-batch-action-group/interface';
|
|
32
32
|
export type { AttachmentItemProps, ApAttachmentProps } from './ap-attachment';
|
|
33
33
|
export declare const ApTitle: {
|
|
@@ -2748,7 +2748,7 @@ export declare const ApAttachment: DefineComponent<{
|
|
|
2748
2748
|
toolTipBgColor: {
|
|
2749
2749
|
type: StringConstructor;
|
|
2750
2750
|
};
|
|
2751
|
-
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
2751
|
+
}, () => false | import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
2752
2752
|
attachmentList: {
|
|
2753
2753
|
type: PropType<Array< AttachmentItemProps>>;
|
|
2754
2754
|
default: never[];
|
|
@@ -85,6 +85,20 @@ const e = {
|
|
|
85
85
|
totalLeftSuffix: "items",
|
|
86
86
|
totalRightPrefix: "Page",
|
|
87
87
|
totalRightSuffix: ""
|
|
88
|
+
},
|
|
89
|
+
setting: {
|
|
90
|
+
title: "Custom Table",
|
|
91
|
+
selectAll: "Select All",
|
|
92
|
+
unSelectAll: "Deselect All",
|
|
93
|
+
selectAllTip: "Please select the columns to display in the table.",
|
|
94
|
+
sizeSmall: "Small",
|
|
95
|
+
sizeNormal: "Normal",
|
|
96
|
+
selectCount: "Selected fields ({count})",
|
|
97
|
+
reset: "Reset",
|
|
98
|
+
fixToLeft: "Fixed on the left",
|
|
99
|
+
fixToRight: "Fixed on the right",
|
|
100
|
+
unFixed: "Not fixed",
|
|
101
|
+
delete: "Delete"
|
|
88
102
|
}
|
|
89
103
|
},
|
|
90
104
|
apUpload: {
|
|
@@ -85,6 +85,20 @@ const e = {
|
|
|
85
85
|
totalLeftSuffix: "条记录",
|
|
86
86
|
totalRightPrefix: "第",
|
|
87
87
|
totalRightSuffix: "页"
|
|
88
|
+
},
|
|
89
|
+
setting: {
|
|
90
|
+
title: "自定义表格",
|
|
91
|
+
selectAll: "全选",
|
|
92
|
+
unSelectAll: "取消全选",
|
|
93
|
+
selectAllTip: "请选择需要展示在表格的字段",
|
|
94
|
+
sizeSmall: "紧凑",
|
|
95
|
+
sizeNormal: "正常",
|
|
96
|
+
selectCount: "已选字段({count})",
|
|
97
|
+
reset: "重置",
|
|
98
|
+
fixToLeft: "固定在左侧",
|
|
99
|
+
fixToRight: "固定在右侧",
|
|
100
|
+
unFixed: "不固定",
|
|
101
|
+
delete: "删除"
|
|
88
102
|
}
|
|
89
103
|
},
|
|
90
104
|
apUpload: {
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
}
|
|
10
|
-
.aplus-ap-table-adaptive .ant-table-wrapper
|
|
10
|
+
.aplus-ap-table-adaptive .ant-table-wrapper {
|
|
11
|
+
flex: 1;
|
|
12
|
+
}
|
|
11
13
|
.aplus-ap-table-adaptive .ant-spin-nested-loading,
|
|
12
14
|
.aplus-ap-table-adaptive .ant-spin-container {
|
|
13
15
|
height: 100%;
|
|
@@ -35,6 +37,8 @@
|
|
|
35
37
|
.aplus-ap-table__table-wrapper {
|
|
36
38
|
flex: 1;
|
|
37
39
|
max-height: 100%;
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
38
42
|
}
|
|
39
43
|
.aplus-ap-table__table-wrapper-card {
|
|
40
44
|
padding: 16px;
|
|
@@ -98,3 +102,27 @@
|
|
|
98
102
|
.aplus-ap-table-pagination-total-wrapper {
|
|
99
103
|
color: var(--ap-table-pagination-total-color, #526A90);
|
|
100
104
|
}
|
|
105
|
+
.aplus-ap-table-header {
|
|
106
|
+
padding-bottom: 16px;
|
|
107
|
+
display: flex;
|
|
108
|
+
justify-content: space-between;
|
|
109
|
+
align-items: center;
|
|
110
|
+
flex-wrap: nowrap;
|
|
111
|
+
}
|
|
112
|
+
.aplus-ap-table-header__title {
|
|
113
|
+
flex: 1;
|
|
114
|
+
flex-shrink: 1;
|
|
115
|
+
min-width: 0;
|
|
116
|
+
}
|
|
117
|
+
.aplus-ap-table-table-header__title {
|
|
118
|
+
display: -webkit-inline-box;
|
|
119
|
+
-webkit-line-clamp: 2;
|
|
120
|
+
-webkit-box-orient: vertical;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
text-overflow: ellipsis;
|
|
123
|
+
white-space: normal;
|
|
124
|
+
max-width: 100%;
|
|
125
|
+
vertical-align: middle;
|
|
126
|
+
word-break: break-all;
|
|
127
|
+
flex: 1;
|
|
128
|
+
}
|