@aplus-frontend/ui 0.6.0-beta.7 → 0.6.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/src/ap-form/interface.d.ts +4 -0
- package/es/src/ap-form/search-form/components/popover-filter.vue.d.ts +131 -2
- package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +40 -36
- package/es/src/ap-form/search-form/components/popover-sorter/index.vue2.mjs +89 -75
- package/es/src/ap-form/search-form/index.vue.d.ts +6 -2
- package/es/src/ap-form/search-form/index.vue.mjs +76 -75
- package/es/src/ap-grid/constants.d.ts +3 -3
- package/es/src/ap-grid/constants.mjs +9 -9
- package/es/src/ap-grid/index.vue.mjs +44 -46
- package/es/src/ap-grid/interface.d.ts +1 -1
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -1
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +1 -1
- package/es/src/ap-tag/ap-tag-group.vue.mjs +32 -28
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +89 -70
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +18 -17
- package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +27 -25
- package/es/src/business/ap-label/constans.mjs +1 -1
- package/es/src/business/ap-view/ap-view.vue2.mjs +121 -118
- package/es/src/business/ap-view/components/main-button-content.vue2.mjs +55 -51
- package/es/src/business/hooks/usePageListApGrid.mjs +1 -1
- package/lib/src/ap-form/interface.d.ts +4 -0
- package/lib/src/ap-form/search-form/components/popover-filter.vue.d.ts +131 -2
- package/lib/src/ap-form/search-form/components/popover-filter.vue2.js +1 -1
- package/lib/src/ap-form/search-form/components/popover-sorter/index.vue2.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.d.ts +6 -2
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-grid/constants.d.ts +3 -3
- package/lib/src/ap-grid/constants.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-input-radio/ApInputRadio.vue2.js +1 -1
- package/lib/src/business/ap-label/constans.js +1 -1
- package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
- package/lib/src/business/ap-view/components/main-button-content.vue2.js +1 -1
- package/lib/src/business/hooks/usePageListApGrid.js +1 -1
- package/package.json +1 -1
- package/theme/ap-action/item-dropdown.css +1 -1
- package/theme/ap-action/item.css +2 -2
- package/theme/ap-appendix/ap-appendix.css +3 -3
- package/theme/ap-appendix/ap-appendix.less +2 -2
- package/theme/ap-attachment/ap-attachment.css +3 -2
- package/theme/ap-attachment/ap-attachment.less +2 -2
- package/theme/ap-batch-action/ap-batch-action.css +1 -1
- package/theme/ap-button/ap-button.css +1 -1
- package/theme/ap-card/ap-card.css +1 -1
- package/theme/ap-descriptions/ap-descriptions.css +1 -1
- package/theme/ap-download/ap-download.css +1 -1
- package/theme/ap-expand-alert/ap-expand-alert.css +2 -2
- package/theme/ap-expand-alert/ap-expand-alert.less +2 -1
- package/theme/ap-field/checkbox.css +1 -1
- package/theme/ap-field/index.css +1 -1
- package/theme/ap-field/number.css +1 -1
- package/theme/ap-field/radio.css +1 -1
- package/theme/ap-field/text-area.css +1 -1
- package/theme/ap-form/ap-form-item-group.css +1 -1
- package/theme/ap-form/ap-form-item.css +1 -1
- package/theme/ap-form/drawer-form.css +1 -1
- package/theme/ap-form/index.css +14 -5
- package/theme/ap-form/item-text-group.css +1 -1
- package/theme/ap-form/item-text.css +1 -1
- package/theme/ap-form/modal-form.css +1 -1
- package/theme/ap-form/search-form-sorter.css +6 -5
- package/theme/ap-form/search-form-sorter.less +1 -0
- package/theme/ap-form/search-form.css +14 -5
- package/theme/ap-form/search-form.less +8 -0
- package/theme/ap-grid/editable.css +1 -1
- package/theme/ap-grid/index.css +26 -7
- package/theme/ap-grid/index.less +11 -1
- package/theme/ap-group-search/ap-extension-select.css +1 -1
- package/theme/ap-group-search/ap-group-search.css +1 -1
- package/theme/ap-group-search/ap-popover-select.css +1 -1
- package/theme/ap-image/ap-image.css +1 -1
- package/theme/ap-input-radio/ap-input-radio.css +1 -1
- package/theme/ap-label/ap-label.css +1 -1
- package/theme/ap-ladder/ap-ladder.css +2 -1
- package/theme/ap-ladder/ap-ladder.less +1 -0
- package/theme/ap-layout/ap-info-layout.css +1 -1
- package/theme/ap-list/index.css +1 -1
- package/theme/ap-product-info/ap-product-info.css +1 -1
- package/theme/ap-select-layout/ap-select-layout.css +1 -1
- package/theme/ap-size-input/ap-size-input.css +1 -1
- package/theme/ap-status/ap-status.css +2 -2
- package/theme/ap-status/ap-status.less +1 -1
- package/theme/ap-summary/index.css +1 -1
- package/theme/ap-table/ap-table-index.css +1 -1
- package/theme/ap-table/ap-table-paragraph-ellipsis.css +1 -1
- package/theme/ap-table/ap-table.css +20 -12
- package/theme/ap-table/ap-table.less +4 -4
- package/theme/ap-table/setting/index.css +2 -3
- package/theme/ap-table/setting/modal.css +2 -2
- package/theme/ap-table/setting/select-group.css +1 -1
- package/theme/ap-table/setting/sortable-item-meta.css +1 -1
- package/theme/ap-table/setting/sortable-item.css +1 -1
- package/theme/ap-table/setting/sorter.css +1 -2
- package/theme/ap-table-modal/index.css +20 -12
- package/theme/ap-tag/ap-tag-group.css +3 -3
- package/theme/ap-tag/ap-tag-group.less +2 -3
- package/theme/ap-tag/ap-tag.css +4 -4
- package/theme/ap-tag/ap-tag.less +3 -3
- package/theme/ap-title/ap-title.css +6 -4
- package/theme/ap-title/ap-title.less +5 -3
- package/theme/ap-upload/index.css +6 -6
- package/theme/ap-upload/multiple-file.css +2 -2
- package/theme/ap-upload/multiple-file.less +1 -1
- package/theme/ap-upload/picture.css +3 -3
- package/theme/ap-upload/picture.less +2 -2
- package/theme/ap-upload/single-file.css +3 -3
- package/theme/ap-upload/single-file.less +2 -2
- package/theme/ap-upload/upload.css +1 -1
- package/theme/ap-upload-single/index.css +1 -1
- package/theme/ap-view/ap-view.css +1 -1
- package/theme/batch-input-group/index.css +2 -1
- package/theme/batch-input-group/popover-input.css +2 -1
- package/theme/batch-input-group/popover-input.less +1 -0
- package/theme/check-card/index.css +4 -4
- package/theme/editable-table/index.css +15 -6
- package/theme/full-screen/index.css +1 -1
- package/theme/index.css +60 -37
- package/theme/mask/index.css +1 -1
- package/theme/mixins/config.less +1 -1
- package/theme/mixins/mixins.css +1 -1
- package/theme/scroll-bar/index.css +1 -1
- package/theme/scroll-view/index.css +1 -1
- package/theme/splitter/index.css +3 -3
- package/theme/text/group.css +1 -1
- package/theme/text/index.css +2 -2
- package/theme/work-order-modal/index.css +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as D, ref as
|
|
1
|
+
import { defineComponent as D, ref as b, computed as n, unref as f, watch as N, nextTick as S, onMounted as j, onUnmounted as G, createBlock as d, openBlock as u, mergeProps as k, withCtx as g, createElementVNode as o, normalizeStyle as W, normalizeClass as _, createElementBlock as T, createCommentVNode as R, Fragment as A, renderList as F, toDisplayString as E, renderSlot as I, createTextVNode as U } from "vue";
|
|
2
2
|
import { Tooltip as q } from "@aplus-frontend/antdv";
|
|
3
3
|
import H from "@ant-design/icons-vue";
|
|
4
4
|
import "./ap-tag.vue2.mjs";
|
|
@@ -8,7 +8,7 @@ import { useLocale as K } from "../config-provider/hooks/use-locale.mjs";
|
|
|
8
8
|
import { useGlobalConfig as O } from "../config-provider/hooks/use-global-config.mjs";
|
|
9
9
|
import { useNamespace as Q } from "../config-provider/hooks/use-namespace.mjs";
|
|
10
10
|
import X from "./ap-tag.vue.mjs";
|
|
11
|
-
const
|
|
11
|
+
const ce = /* @__PURE__ */ D({
|
|
12
12
|
__name: "ap-tag-group",
|
|
13
13
|
props: {
|
|
14
14
|
list: { default: () => [] },
|
|
@@ -16,15 +16,15 @@ const ue = /* @__PURE__ */ D({
|
|
|
16
16
|
ellipsisColor: {},
|
|
17
17
|
ellipsis: { default: () => ({}) }
|
|
18
18
|
},
|
|
19
|
-
setup(
|
|
20
|
-
const { t:
|
|
19
|
+
setup(z) {
|
|
20
|
+
const { t: V } = K(), i = z, v = O("uiMode"), { b: $, bm: h } = Q("tag-group"), c = b(), r = n(() => ({
|
|
21
21
|
...{
|
|
22
|
-
iconColor: "#
|
|
22
|
+
iconColor: v.value === "aplus" ? "#182948" : "#333",
|
|
23
23
|
symbol: "icon",
|
|
24
|
-
text:
|
|
24
|
+
text: V("ap.common.more")
|
|
25
25
|
},
|
|
26
26
|
...i.ellipsis
|
|
27
|
-
})),
|
|
27
|
+
})), B = n(() => r.value.tooltip && typeof r.value.tooltip == "object" ? J(r.value.tooltip, ["trigger", "title"]) : {}), p = n(() => f(m) < i.list.length), m = b(0), L = n(() => i.list.map((e) => e.text).join("、")), M = n(() => [$()].filter(Boolean)), P = n(() => v.value === "aplus" ? [h("ellipsis-text", "aplus")] : [h("ellipsis-text", "admin")]), y = (e, t) => {
|
|
28
28
|
let s = document.createElement("canvas");
|
|
29
29
|
const l = s.getContext("2d");
|
|
30
30
|
l.font = `${e}px system-ui`;
|
|
@@ -34,21 +34,21 @@ const ue = /* @__PURE__ */ D({
|
|
|
34
34
|
}, 0), a.width;
|
|
35
35
|
}, x = () => {
|
|
36
36
|
let e = 0, t = 0;
|
|
37
|
-
if (!
|
|
38
|
-
const s =
|
|
37
|
+
if (!c.value) return;
|
|
38
|
+
const s = c.value.offsetWidth;
|
|
39
39
|
for (let l of i.list) {
|
|
40
|
-
const a = l.size === "large" ? 16 : 12,
|
|
40
|
+
const a = l.size === "large" ? 16 : 12, C = y(
|
|
41
41
|
l.size === "large" ? 14 : 12,
|
|
42
42
|
l.text
|
|
43
43
|
) + a + 2 + i.space;
|
|
44
|
-
if (e +=
|
|
45
|
-
e -=
|
|
44
|
+
if (e += C, e > s) {
|
|
45
|
+
e -= C;
|
|
46
46
|
break;
|
|
47
47
|
}
|
|
48
48
|
t++;
|
|
49
49
|
}
|
|
50
50
|
if (t < i.list.length) {
|
|
51
|
-
const a =
|
|
51
|
+
const a = y(12, r.value.text);
|
|
52
52
|
i.ellipsis.symbol === "icon" ? e += 16 : e += a, e > s && t--;
|
|
53
53
|
}
|
|
54
54
|
m.value = t;
|
|
@@ -64,7 +64,7 @@ const ue = /* @__PURE__ */ D({
|
|
|
64
64
|
immediate: !0
|
|
65
65
|
}
|
|
66
66
|
);
|
|
67
|
-
const
|
|
67
|
+
const w = () => {
|
|
68
68
|
x();
|
|
69
69
|
};
|
|
70
70
|
return j(() => {
|
|
@@ -74,35 +74,38 @@ const ue = /* @__PURE__ */ D({
|
|
|
74
74
|
`[ApTagGroup]: \`${e}\` is deprecated, please use \`${t}\` instead.`
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
|
-
), window.addEventListener("resize",
|
|
77
|
+
), window.addEventListener("resize", w);
|
|
78
78
|
}), G(() => {
|
|
79
|
-
window.removeEventListener("resize",
|
|
80
|
-
}), (e, t) => (
|
|
79
|
+
window.removeEventListener("resize", w);
|
|
80
|
+
}), (e, t) => (u(), d(f(q), k({ trigger: "hover" }, B.value), {
|
|
81
81
|
title: g(() => [
|
|
82
82
|
I(e.$slots, "tooltip", { tags: e.list }, () => [
|
|
83
|
-
U(
|
|
83
|
+
U(E(L.value), 1)
|
|
84
84
|
])
|
|
85
85
|
]),
|
|
86
86
|
default: g(() => [
|
|
87
87
|
o("div", {
|
|
88
88
|
ref_key: "container",
|
|
89
|
-
ref:
|
|
90
|
-
class:
|
|
91
|
-
style:
|
|
89
|
+
ref: c,
|
|
90
|
+
class: _(M.value),
|
|
91
|
+
style: W({
|
|
92
92
|
pointerEvents: p.value ? "auto" : "none"
|
|
93
93
|
// opacity: isUpdating ? '0' : '1'
|
|
94
94
|
})
|
|
95
95
|
}, [
|
|
96
|
-
(
|
|
96
|
+
(u(!0), T(A, null, F(e.list, (s, l) => (u(), d(X, k({ ref_for: !0 }, s, {
|
|
97
97
|
key: l,
|
|
98
98
|
style: {
|
|
99
99
|
display: l >= m.value ? "none" : "inline-block",
|
|
100
100
|
marginRight: `${e.space}px`
|
|
101
101
|
}
|
|
102
102
|
}), null, 16, ["style"]))), 128)),
|
|
103
|
-
p.value && r.value.symbol === "icon" ? (
|
|
103
|
+
p.value && r.value.symbol === "icon" ? (u(), d(f(H), {
|
|
104
104
|
key: 0,
|
|
105
|
-
style:
|
|
105
|
+
style: W({
|
|
106
|
+
color: e.ellipsisColor || r.value.iconColor,
|
|
107
|
+
cursor: "pointer"
|
|
108
|
+
})
|
|
106
109
|
}, {
|
|
107
110
|
component: g(() => t[0] || (t[0] = [
|
|
108
111
|
o("svg", {
|
|
@@ -160,10 +163,11 @@ const ue = /* @__PURE__ */ D({
|
|
|
160
163
|
], -1)
|
|
161
164
|
])),
|
|
162
165
|
_: 1
|
|
163
|
-
}, 8, ["style"])) : p.value && r.value.symbol === "text" ? (
|
|
166
|
+
}, 8, ["style"])) : p.value && r.value.symbol === "text" ? (u(), T("span", {
|
|
164
167
|
key: 1,
|
|
165
|
-
class:
|
|
166
|
-
|
|
168
|
+
class: _(P.value),
|
|
169
|
+
style: { cursor: "pointer" }
|
|
170
|
+
}, E(r.value.text), 3)) : R("", !0)
|
|
167
171
|
], 6)
|
|
168
172
|
]),
|
|
169
173
|
_: 3
|
|
@@ -171,5 +175,5 @@ const ue = /* @__PURE__ */ D({
|
|
|
171
175
|
}
|
|
172
176
|
});
|
|
173
177
|
export {
|
|
174
|
-
|
|
178
|
+
ce as default
|
|
175
179
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as K, computed as c, ref as w, watch as x, nextTick as f, createElementBlock as i, openBlock as a, normalizeClass as n, unref as t, createVNode as b, withCtx as m, createElementVNode as S, normalizeStyle as y, renderSlot as H, createBlock as $, toDisplayString as u, resolveDynamicComponent as I, Fragment as C, renderList as W, createCommentVNode as L, createTextVNode as j } from "vue";
|
|
2
2
|
import { DownOutlined as J } from "@ant-design/icons-vue";
|
|
3
|
-
import { Alert as
|
|
4
|
-
import { ApActionItem as
|
|
3
|
+
import { Alert as P, Tooltip as Q } from "@aplus-frontend/antdv";
|
|
4
|
+
import { ApActionItem as U } from "../../ap-action/index.mjs";
|
|
5
5
|
import "../../config-provider/index.mjs";
|
|
6
|
-
import { isString as E } from "lodash-unified";
|
|
7
|
-
import { useLocale as
|
|
8
|
-
import { useNamespace as
|
|
9
|
-
import { useGlobalConfig as
|
|
10
|
-
const
|
|
6
|
+
import { isNil as X, isString as E } from "lodash-unified";
|
|
7
|
+
import { useLocale as Y } from "../../config-provider/hooks/use-locale.mjs";
|
|
8
|
+
import { useNamespace as Z } from "../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
import { useGlobalConfig as _ } from "../../config-provider/hooks/use-global-config.mjs";
|
|
10
|
+
const ee = ["onClick"], de = /* @__PURE__ */ K({
|
|
11
11
|
__name: "ApExpandAlert",
|
|
12
12
|
props: {
|
|
13
13
|
type: { default: "warning" },
|
|
@@ -24,124 +24,143 @@ const Z = ["onClick"], ie = /* @__PURE__ */ W({
|
|
|
24
24
|
showIcon: { type: Boolean, default: !0 }
|
|
25
25
|
},
|
|
26
26
|
emits: ["choose", "expand"],
|
|
27
|
-
setup(
|
|
28
|
-
const
|
|
29
|
-
if (
|
|
30
|
-
return
|
|
31
|
-
}), l =
|
|
27
|
+
setup(z, { expose: D, emit: V }) {
|
|
28
|
+
const A = V, p = z, { t: B } = Y(), M = c(() => {
|
|
29
|
+
if (p.type != "card")
|
|
30
|
+
return p.type;
|
|
31
|
+
}), l = w(""), d = w(null), R = c(() => ({
|
|
32
32
|
fontWeight: "400",
|
|
33
33
|
wordBreak: "break-all",
|
|
34
34
|
overflow: "hidden",
|
|
35
35
|
display: "-webkit-box",
|
|
36
36
|
webkitLineClamp: l.value,
|
|
37
|
-
webkitBoxOrient: "vertical"
|
|
37
|
+
webkitBoxOrient: "vertical",
|
|
38
|
+
lineHeight: "18px"
|
|
38
39
|
}));
|
|
39
|
-
function
|
|
40
|
-
l.value === "1" ? (l.value = "",
|
|
40
|
+
function q() {
|
|
41
|
+
l.value === "1" ? (l.value = "", A("expand", "expand")) : (l.value = "1", A("expand", "collapse"));
|
|
41
42
|
}
|
|
42
|
-
const
|
|
43
|
+
const F = c(() => l.value === "1" ? B("ap.apExpandAlert.expand") : B("ap.apExpandAlert.collapse")), h = w(!0), N = c(() => l.value !== "1");
|
|
43
44
|
function v(e) {
|
|
44
45
|
e ? l.value = "" : l.value = "1";
|
|
45
46
|
}
|
|
46
|
-
|
|
47
|
-
() =>
|
|
47
|
+
x(
|
|
48
|
+
() => p.data,
|
|
48
49
|
() => {
|
|
49
|
-
l.value = "",
|
|
50
|
-
if (
|
|
51
|
-
const e = Number(
|
|
52
|
-
parseInt(
|
|
50
|
+
l.value = "", f(() => {
|
|
51
|
+
if (d.value) {
|
|
52
|
+
const e = Number(d.value.clientHeight), s = Number(
|
|
53
|
+
parseInt(d.value.style.lineHeight)
|
|
53
54
|
);
|
|
54
|
-
e <
|
|
55
|
+
e < s * Number(p.rows) && N.value ? h.value = !1 : h.value = !0;
|
|
55
56
|
}
|
|
56
57
|
});
|
|
57
58
|
},
|
|
58
59
|
{
|
|
59
60
|
immediate: !0
|
|
60
61
|
}
|
|
61
|
-
),
|
|
62
|
-
() =>
|
|
62
|
+
), x(
|
|
63
|
+
() => p.defaultExpand,
|
|
63
64
|
(e) => {
|
|
64
|
-
e ?
|
|
65
|
+
e ? f(() => {
|
|
65
66
|
v(e);
|
|
66
|
-
}) :
|
|
67
|
+
}) : f(() => {
|
|
67
68
|
v(e);
|
|
68
69
|
});
|
|
69
70
|
},
|
|
70
71
|
{ immediate: !0 }
|
|
72
|
+
), x(
|
|
73
|
+
() => p.contentStyle,
|
|
74
|
+
(e) => {
|
|
75
|
+
X(e.lineHeight) || f(() => {
|
|
76
|
+
const s = document.querySelector(
|
|
77
|
+
`#${k} .ant-alert-action`
|
|
78
|
+
), r = document.querySelector(
|
|
79
|
+
`#${k} .ant-alert-icon`
|
|
80
|
+
);
|
|
81
|
+
console.log(s), s && s.setAttribute("style", `line-height: ${e.lineHeight}`), r && r.setAttribute("style", `line-height: ${e.lineHeight}`);
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
deep: !0,
|
|
86
|
+
immediate: !0,
|
|
87
|
+
flush: "post"
|
|
88
|
+
}
|
|
71
89
|
);
|
|
72
|
-
const { b:
|
|
73
|
-
return
|
|
90
|
+
const { b: T, e: o, m: O } = Z("ap-expand-alert"), k = `${T()}-key-${Date.now()}-${(Math.random() * 1e6).toFixed(0)}`, G = _("uiMode", "aplus");
|
|
91
|
+
return D({
|
|
74
92
|
setExpand: v
|
|
75
|
-
}), (e,
|
|
76
|
-
|
|
93
|
+
}), (e, s) => (a(), i("div", {
|
|
94
|
+
id: k,
|
|
95
|
+
class: n([t(T)(), `${t(O)(t(G))}`])
|
|
77
96
|
}, [
|
|
78
|
-
|
|
79
|
-
type:
|
|
97
|
+
b(t(P), {
|
|
98
|
+
type: M.value,
|
|
80
99
|
"show-icon": e.showIcon,
|
|
81
|
-
class:
|
|
100
|
+
class: n([t(o)("antAlert"), e.type == "card" ? "card-alert" : ""])
|
|
82
101
|
}, {
|
|
83
102
|
action: m(() => [
|
|
84
|
-
|
|
103
|
+
h.value ? (a(), $(t(U), {
|
|
85
104
|
key: 0,
|
|
86
105
|
size: "small",
|
|
87
106
|
style: { "font-size": "12px", "padding-left": "16px" },
|
|
88
|
-
onClick:
|
|
107
|
+
onClick: s[0] || (s[0] = (r) => q())
|
|
89
108
|
}, {
|
|
90
109
|
default: m(() => [
|
|
91
|
-
|
|
92
|
-
class:
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
class:
|
|
110
|
+
S("span", {
|
|
111
|
+
class: n(t(o)("expandText"))
|
|
112
|
+
}, u(F.value), 3),
|
|
113
|
+
b(t(J), {
|
|
114
|
+
class: n(N.value ? t(o)("expandIcon") : t(o)("collapseIcon"))
|
|
96
115
|
}, null, 8, ["class"])
|
|
97
116
|
]),
|
|
98
117
|
_: 1
|
|
99
118
|
})) : L("", !0)
|
|
100
119
|
]),
|
|
101
120
|
message: m(() => [
|
|
102
|
-
|
|
121
|
+
S("div", {
|
|
103
122
|
ref_key: "ellipsisBoxRef",
|
|
104
|
-
ref:
|
|
105
|
-
style:
|
|
106
|
-
class:
|
|
123
|
+
ref: d,
|
|
124
|
+
style: y({ ...R.value, ...e.contentStyle }),
|
|
125
|
+
class: n(t(o)("alertContent"))
|
|
107
126
|
}, [
|
|
108
|
-
|
|
109
|
-
t(E)(e.prefix) ? (a(),
|
|
127
|
+
H(e.$slots, "default", {}, () => [
|
|
128
|
+
t(E)(e.prefix) ? (a(), i("span", {
|
|
110
129
|
key: 0,
|
|
111
|
-
class:
|
|
112
|
-
style:
|
|
113
|
-
},
|
|
130
|
+
class: n(t(o)("prefix")),
|
|
131
|
+
style: y(e.prefixStyle)
|
|
132
|
+
}, u(e.prefix), 7)) : (a(), $(I(e.prefix), {
|
|
114
133
|
key: 1,
|
|
115
|
-
style:
|
|
134
|
+
style: y(e.prefixStyle)
|
|
116
135
|
}, null, 8, ["style"])),
|
|
117
|
-
t(E)(e.data) ? (a(),
|
|
136
|
+
t(E)(e.data) ? (a(), i("span", {
|
|
118
137
|
key: 2,
|
|
119
|
-
class:
|
|
120
|
-
},
|
|
121
|
-
|
|
138
|
+
class: n(t(o)("text"))
|
|
139
|
+
}, u(e.data), 3)) : (a(!0), i(C, { key: 3 }, W(e.data, (r, g) => (a(), i(C, { key: g }, [
|
|
140
|
+
b(t(Q), {
|
|
122
141
|
title: e.tipTitle ? e.tipTitle : null
|
|
123
142
|
}, {
|
|
124
143
|
default: m(() => [
|
|
125
|
-
|
|
126
|
-
record:
|
|
127
|
-
index:
|
|
144
|
+
H(e.$slots, "item", {
|
|
145
|
+
record: r,
|
|
146
|
+
index: g
|
|
128
147
|
}, () => [
|
|
129
|
-
|
|
130
|
-
class:
|
|
131
|
-
onClick: (
|
|
132
|
-
},
|
|
148
|
+
S("span", {
|
|
149
|
+
class: n(t(o)("showItem")),
|
|
150
|
+
onClick: (te) => e.$emit("choose", r)
|
|
151
|
+
}, u(e.mapLabel ? r[e.mapLabel] : r), 11, ee)
|
|
133
152
|
])
|
|
134
153
|
]),
|
|
135
154
|
_: 2
|
|
136
155
|
}, 1032, ["title"]),
|
|
137
|
-
|
|
156
|
+
g !== e.data.length - 1 ? (a(), i("span", {
|
|
138
157
|
key: 0,
|
|
139
|
-
class:
|
|
140
|
-
style:
|
|
158
|
+
class: n(t(o)("spliter")),
|
|
159
|
+
style: y(e.separatorStyle)
|
|
141
160
|
}, [
|
|
142
|
-
t(E)(e.separator) ? (a(),
|
|
143
|
-
|
|
144
|
-
], 64)) : (a(),
|
|
161
|
+
t(E)(e.separator) ? (a(), i(C, { key: 0 }, [
|
|
162
|
+
j(u(e.separator), 1)
|
|
163
|
+
], 64)) : (a(), $(I(e.separator), { key: 1 }))
|
|
145
164
|
], 6)) : L("", !0)
|
|
146
165
|
], 64))), 128))
|
|
147
166
|
])
|
|
@@ -153,5 +172,5 @@ const Z = ["onClick"], ie = /* @__PURE__ */ W({
|
|
|
153
172
|
}
|
|
154
173
|
});
|
|
155
174
|
export {
|
|
156
|
-
|
|
175
|
+
de as default
|
|
157
176
|
};
|
|
@@ -2,7 +2,7 @@ import { defineComponent as O, ref as A, computed as s, watch as V, createElemen
|
|
|
2
2
|
import { DownOutlined as U } from "@ant-design/icons-vue";
|
|
3
3
|
import { message as H, Dropdown as J, Menu as Q, MenuItem as G } from "@aplus-frontend/antdv";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
|
-
import { ApExportGroupActionType as
|
|
5
|
+
import { ApExportGroupActionType as i } from "./interface.mjs";
|
|
6
6
|
import { usePermission as W } from "@aplus-frontend/hooks";
|
|
7
7
|
import { handleExportDownload as X } from "./handleExportDownload.mjs";
|
|
8
8
|
import { useInjectApTable as Y } from "../../ap-table/context.mjs";
|
|
@@ -30,10 +30,10 @@ const ge = /* @__PURE__ */ O({
|
|
|
30
30
|
exportField: { type: [Boolean, Object], default: void 0 }
|
|
31
31
|
},
|
|
32
32
|
setup(K) {
|
|
33
|
-
const { hasPermission: T } = W(), e = K, { columns: c, dataSource: f } = Y(), { b: D } = ee("ap-export-group"), { t:
|
|
33
|
+
const { hasPermission: T } = W(), e = K, { columns: c, dataSource: f } = Y(), { b: D } = ee("ap-export-group"), { t: r } = te(), C = ae("exportField"), u = A(!1), p = A(!1), m = s(
|
|
34
34
|
() => {
|
|
35
35
|
var t;
|
|
36
|
-
return !!(e != null && e.disabled) || (f !== void 0 ? !((t = f == null ? void 0 : f.value) != null && t.length) : !1) ||
|
|
36
|
+
return !!(e != null && e.disabled) || (f !== void 0 ? !((t = f == null ? void 0 : f.value) != null && t.length) : !1) || u.value;
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
39
|
V(
|
|
@@ -45,7 +45,7 @@ const ge = /* @__PURE__ */ O({
|
|
|
45
45
|
immediate: !0
|
|
46
46
|
}
|
|
47
47
|
);
|
|
48
|
-
const R = s(() => (e == null ? void 0 : e.successMessage) === !0 ?
|
|
48
|
+
const R = s(() => (e == null ? void 0 : e.successMessage) === !0 ? r("ap.apExportGroup.exportSuccess") : e != null && e.successMessage ? e.successMessage : ""), b = s(() => {
|
|
49
49
|
const t = "exportFieldList", l = (e == null ? void 0 : e.exportField) ?? (C.value === "" ? !0 : C.value) ?? !1;
|
|
50
50
|
return l === !0 ? {
|
|
51
51
|
key: t
|
|
@@ -60,18 +60,18 @@ const ge = /* @__PURE__ */ O({
|
|
|
60
60
|
return !(e != null && e.ifShow) && (e != null && e.auth) && (t = () => T(e.auth)), (t == null ? void 0 : t()) ?? !0;
|
|
61
61
|
});
|
|
62
62
|
async function I() {
|
|
63
|
-
k.value.length > 0 ? w({ key:
|
|
63
|
+
k.value.length > 0 ? w({ key: i.SELECT }) : w({ key: i.ALL });
|
|
64
64
|
}
|
|
65
65
|
async function w({ key: t }) {
|
|
66
66
|
var F, S, _;
|
|
67
67
|
const { getRequestParams: l, request: o } = e || {};
|
|
68
68
|
let E = {};
|
|
69
|
-
t ===
|
|
69
|
+
t === i.SELECT ? E = {
|
|
70
70
|
[(e == null ? void 0 : e.idKey) || "ids"]: k.value
|
|
71
|
-
} : t ===
|
|
71
|
+
} : t === i.ALL && (E = (l == null ? void 0 : l()) || {});
|
|
72
72
|
const N = ((F = e == null ? void 0 : e.getInitialParams) == null ? void 0 : F.call(e)) || {};
|
|
73
73
|
try {
|
|
74
|
-
|
|
74
|
+
u.value = !0;
|
|
75
75
|
let v = Object.assign(
|
|
76
76
|
{
|
|
77
77
|
...E,
|
|
@@ -86,7 +86,7 @@ const ge = /* @__PURE__ */ O({
|
|
|
86
86
|
);
|
|
87
87
|
v = ((_ = e == null ? void 0 : e.beforeRequest) == null ? void 0 : _.call(e, v)) || v, await X(async () => await (o == null ? void 0 : o(v))), e != null && e.successMessage && H.success(R.value);
|
|
88
88
|
} finally {
|
|
89
|
-
|
|
89
|
+
u.value = !1;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
return (t, l) => (d(), $(q, null, [
|
|
@@ -94,11 +94,12 @@ const ge = /* @__PURE__ */ O({
|
|
|
94
94
|
...t.$attrs
|
|
95
95
|
}, {
|
|
96
96
|
disabled: m.value,
|
|
97
|
-
loading:
|
|
97
|
+
loading: u.value,
|
|
98
|
+
"min-width": "",
|
|
98
99
|
onClick: I
|
|
99
100
|
}), {
|
|
100
101
|
default: n(() => [
|
|
101
|
-
x(g((e == null ? void 0 : e.text) ?? a(
|
|
102
|
+
x(g((e == null ? void 0 : e.text) ?? a(r)("ap.apExportGroup.export")), 1)
|
|
102
103
|
]),
|
|
103
104
|
_: 1
|
|
104
105
|
}, 16, ["disabled", "loading"])) : M("", !0),
|
|
@@ -116,19 +117,19 @@ const ge = /* @__PURE__ */ O({
|
|
|
116
117
|
var o;
|
|
117
118
|
return [
|
|
118
119
|
(d(), y(a(G), {
|
|
119
|
-
key: a(
|
|
120
|
+
key: a(i).SELECT,
|
|
120
121
|
disabled: ((o = k.value) == null ? void 0 : o.length) === 0
|
|
121
122
|
}, {
|
|
122
123
|
default: n(() => [
|
|
123
|
-
x(g(a(
|
|
124
|
+
x(g(a(r)("ap.apExportGroup.exportSelected")), 1)
|
|
124
125
|
]),
|
|
125
126
|
_: 1
|
|
126
127
|
}, 8, ["disabled"])),
|
|
127
128
|
(d(), y(a(G), {
|
|
128
|
-
key: a(
|
|
129
|
+
key: a(i).ALL
|
|
129
130
|
}, {
|
|
130
131
|
default: n(() => [
|
|
131
|
-
x(g(a(
|
|
132
|
+
x(g(a(r)("ap.apExportGroup.exportAll")), 1)
|
|
132
133
|
]),
|
|
133
134
|
_: 1
|
|
134
135
|
}))
|
|
@@ -140,9 +141,9 @@ const ge = /* @__PURE__ */ O({
|
|
|
140
141
|
default: n(() => [
|
|
141
142
|
h(a(P), B({
|
|
142
143
|
...t.$attrs
|
|
143
|
-
}, { loading:
|
|
144
|
+
}, { loading: u.value }), {
|
|
144
145
|
default: n(() => [
|
|
145
|
-
x(g((e == null ? void 0 : e.text) ?? a(
|
|
146
|
+
x(g((e == null ? void 0 : e.text) ?? a(r)("ap.apExportGroup.export")) + " ", 1),
|
|
146
147
|
h(a(U))
|
|
147
148
|
]),
|
|
148
149
|
_: 1
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as g, onMounted as R, createElementBlock as V, openBlock as h, normalizeClass as b, unref as t, createVNode as i, mergeProps as I } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
|
-
import { Form as
|
|
3
|
+
import { Form as B, InputNumber as k, RadioGroup as x } from "@aplus-frontend/antdv";
|
|
4
4
|
import { omit as _ } from "lodash-unified";
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import { useLocale as y } from "../../config-provider/hooks/use-locale.mjs";
|
|
6
|
+
import { useNamespace as F } from "../../config-provider/hooks/use-namespace.mjs";
|
|
7
|
+
const S = /* @__PURE__ */ g({
|
|
7
8
|
name: "ApInputRadio",
|
|
8
9
|
__name: "ApInputRadio",
|
|
9
10
|
props: {
|
|
@@ -31,36 +32,37 @@ const G = /* @__PURE__ */ f({
|
|
|
31
32
|
},
|
|
32
33
|
emits: ["update:value", "InputRadioChange"],
|
|
33
34
|
setup(p, { emit: s }) {
|
|
34
|
-
const
|
|
35
|
-
let
|
|
36
|
-
u("update:value",
|
|
37
|
-
},
|
|
38
|
-
n({ inputVal:
|
|
39
|
-
}, v = (
|
|
40
|
-
const
|
|
35
|
+
const c = B.useInjectFormItemContext(), e = p, { t: d } = y(), { b: m, e: C } = F("ap-input-radio"), u = s, n = (o) => {
|
|
36
|
+
let a = { ...e.value, ...o };
|
|
37
|
+
u("update:value", a), u("InputRadioChange", a), c.onFieldChange();
|
|
38
|
+
}, f = (o) => {
|
|
39
|
+
n({ inputVal: o });
|
|
40
|
+
}, v = (o) => {
|
|
41
|
+
const a = o.target.value;
|
|
41
42
|
if (e.setRadioValCallback) {
|
|
42
|
-
let l = e.setRadioValCallback(
|
|
43
|
-
n({ inputVal: l, radioVal:
|
|
43
|
+
let l = e.setRadioValCallback(a);
|
|
44
|
+
n({ inputVal: l, radioVal: a });
|
|
44
45
|
} else
|
|
45
|
-
n({ radioVal:
|
|
46
|
+
n({ radioVal: a });
|
|
46
47
|
};
|
|
47
|
-
return
|
|
48
|
+
return R(() => {
|
|
48
49
|
if (e.setRadioValCallback) {
|
|
49
|
-
let
|
|
50
|
-
n({ inputVal:
|
|
50
|
+
let o = e.setRadioValCallback(e.value.radioVal);
|
|
51
|
+
n({ inputVal: o });
|
|
51
52
|
}
|
|
52
|
-
}), (
|
|
53
|
+
}), (o, a) => {
|
|
53
54
|
var l, r;
|
|
54
|
-
return
|
|
55
|
+
return h(), V("div", {
|
|
55
56
|
class: b([t(m)()])
|
|
56
57
|
}, [
|
|
57
|
-
i(t(
|
|
58
|
-
class: t(
|
|
58
|
+
i(t(k), I({
|
|
59
|
+
class: t(C)("input-number")
|
|
59
60
|
}, t(_)(e, ["value", "options"]), {
|
|
60
61
|
value: e.value ? (l = e.value) == null ? void 0 : l.inputVal : "",
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
placeholder: t(d)("ap.common.inputText"),
|
|
63
|
+
onChange: f
|
|
64
|
+
}), null, 16, ["class", "value", "placeholder"]),
|
|
65
|
+
i(t(x), {
|
|
64
66
|
value: e.value ? (r = e.value) == null ? void 0 : r.radioVal : "",
|
|
65
67
|
options: e.options,
|
|
66
68
|
onChange: v
|
|
@@ -70,5 +72,5 @@ const G = /* @__PURE__ */ f({
|
|
|
70
72
|
}
|
|
71
73
|
});
|
|
72
74
|
export {
|
|
73
|
-
|
|
75
|
+
S as default
|
|
74
76
|
};
|