@aplus-frontend/ui 6.15.0 → 6.16.0
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/business/ap-batch-action/ApBatchAction.vue.d.ts +3 -1
- package/es/src/business/ap-batch-action/ApBatchAction.vue2.mjs +35 -31
- package/es/src/business/ap-batch-action/index.d.ts +9 -3
- package/es/src/business/ap-batch-action/interface.d.ts +4 -0
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +82 -82
- package/es/src/text/index.vue.d.ts +1 -1
- package/es/src/text/index.vue.mjs +49 -43
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/es/test/setup.d.ts +1 -5
- package/lib/src/business/ap-batch-action/ApBatchAction.vue.d.ts +3 -1
- package/lib/src/business/ap-batch-action/ApBatchAction.vue2.js +1 -1
- package/lib/src/business/ap-batch-action/index.d.ts +9 -3
- package/lib/src/business/ap-batch-action/interface.d.ts +4 -0
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/text/index.vue.d.ts +1 -1
- package/lib/src/text/index.vue.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/lib/test/setup.d.ts +1 -5
- package/package.json +1 -1
- package/theme/index.css +3 -0
- package/theme/text/index.css +3 -0
- package/theme/text/index.less +3 -0
|
@@ -17,7 +17,9 @@ declare function __VLS_template(): {
|
|
|
17
17
|
rootEl: HTMLDivElement;
|
|
18
18
|
};
|
|
19
19
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
|
-
declare const __VLS_component: DefineComponent<ApBatchActionProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApBatchActionProps> & Readonly<{}>, {
|
|
20
|
+
declare const __VLS_component: DefineComponent<ApBatchActionProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApBatchActionProps> & Readonly<{}>, {
|
|
21
|
+
showSelected: boolean;
|
|
22
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
21
23
|
headerRef: HTMLDivElement;
|
|
22
24
|
}, HTMLDivElement>;
|
|
23
25
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1,73 +1,77 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Button as
|
|
1
|
+
import { defineComponent as x, useSlots as D, computed as E, ref as N, watch as K, createElementBlock as R, openBlock as V, normalizeClass as f, unref as t, withDirectives as T, createElementVNode as c, renderSlot as m, vShow as z, createCommentVNode as O, createTextVNode as v, toDisplayString as n, createVNode as j, withCtx as q } from "vue";
|
|
2
|
+
import { Button as F } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../config-provider/index.mjs";
|
|
4
|
-
import { useNamespace as
|
|
5
|
-
import { useLocale as
|
|
6
|
-
const
|
|
4
|
+
import { useNamespace as G } from "../../config-provider/hooks/use-namespace.mjs";
|
|
5
|
+
import { useLocale as I } from "../../config-provider/hooks/use-locale.mjs";
|
|
6
|
+
const J = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "selected-desc"
|
|
9
|
+
}, M = { class: "selected-desc-conut" }, P = { class: "selected-desc-clean" }, Z = /* @__PURE__ */ x({
|
|
7
10
|
__name: "ApBatchAction",
|
|
8
11
|
props: {
|
|
9
12
|
selectedRowKeys: {},
|
|
10
|
-
clearAll: {
|
|
13
|
+
clearAll: {},
|
|
14
|
+
showSelected: { type: Boolean, default: !0 }
|
|
11
15
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const { b:
|
|
16
|
+
setup($) {
|
|
17
|
+
const { b: r } = G("ap-batch-action"), { t: d } = I(), o = $, s = D(), b = E(() => {
|
|
14
18
|
var e;
|
|
15
|
-
return ((e =
|
|
16
|
-
}),
|
|
17
|
-
return
|
|
19
|
+
return ((e = o.selectedRowKeys) == null ? void 0 : e.length) || 0;
|
|
20
|
+
}), i = N(!1), p = N();
|
|
21
|
+
return K(
|
|
18
22
|
() => s.header,
|
|
19
23
|
() => {
|
|
20
24
|
setTimeout(() => {
|
|
21
|
-
var l, h, y, A, _,
|
|
25
|
+
var l, h, y, A, _, w, a, B, S, g, k;
|
|
22
26
|
const e = (l = s.header) == null ? void 0 : l.call(s);
|
|
23
|
-
(e == null ? void 0 : e.length) === 1 && ((y = (h = e == null ? void 0 : e[0]) == null ? void 0 : h.type) == null ? void 0 : y.name) === "ASpace" ?
|
|
27
|
+
(e == null ? void 0 : e.length) === 1 && ((y = (h = e == null ? void 0 : e[0]) == null ? void 0 : h.type) == null ? void 0 : y.name) === "ASpace" ? i.value = !!((S = (B = (a = Array.prototype.slice.call((w = (_ = (A = p.value) == null ? void 0 : A.children) == null ? void 0 : _[0]) == null ? void 0 : w.children)) == null ? void 0 : a.filter) == null ? void 0 : B.call(a, (u) => {
|
|
24
28
|
var C;
|
|
25
29
|
return (C = u == null ? void 0 : u.children) == null ? void 0 : C.length;
|
|
26
|
-
})) != null &&
|
|
30
|
+
})) != null && S.length) : i.value = !!((k = (g = p.value) == null ? void 0 : g.children) != null && k.length);
|
|
27
31
|
});
|
|
28
32
|
},
|
|
29
33
|
{
|
|
30
34
|
immediate: !0
|
|
31
35
|
}
|
|
32
|
-
), (e, l) => (
|
|
33
|
-
class: f([t(
|
|
36
|
+
), (e, l) => (V(), R("div", {
|
|
37
|
+
class: f([t(r)()])
|
|
34
38
|
}, [
|
|
35
39
|
T(c("div", {
|
|
36
40
|
ref_key: "headerRef",
|
|
37
41
|
ref: p,
|
|
38
|
-
class: f(t(
|
|
42
|
+
class: f(t(r)("header"))
|
|
39
43
|
}, [
|
|
40
44
|
m(e.$slots, "header")
|
|
41
45
|
], 2), [
|
|
42
|
-
[z,
|
|
46
|
+
[z, i.value]
|
|
43
47
|
]),
|
|
44
48
|
c("div", {
|
|
45
|
-
class: f(t(
|
|
49
|
+
class: f(t(r)("body"))
|
|
46
50
|
}, [
|
|
47
51
|
m(e.$slots, "prefix"),
|
|
48
|
-
|
|
49
|
-
c("div", J, [
|
|
50
|
-
v(a(t(r)("ap.apBatchAction.selected")) + " ", 1),
|
|
51
|
-
c("span", null, a($.value), 1),
|
|
52
|
-
v(" " + a(t(r)("ap.apBatchAction.piecesOfData")), 1)
|
|
53
|
-
]),
|
|
52
|
+
o.showSelected ? (V(), R("div", J, [
|
|
54
53
|
c("div", M, [
|
|
55
|
-
|
|
54
|
+
v(n(t(d)("ap.apBatchAction.selected")) + " ", 1),
|
|
55
|
+
c("span", null, n(b.value), 1),
|
|
56
|
+
v(" " + n(t(d)("ap.apBatchAction.piecesOfData")), 1)
|
|
57
|
+
]),
|
|
58
|
+
c("div", P, [
|
|
59
|
+
j(t(F), {
|
|
56
60
|
type: "link",
|
|
57
|
-
onClick: l[0] || (l[0] = (h) =>
|
|
61
|
+
onClick: l[0] || (l[0] = (h) => o.clearAll && o.clearAll())
|
|
58
62
|
}, {
|
|
59
|
-
default:
|
|
60
|
-
v(
|
|
63
|
+
default: q(() => [
|
|
64
|
+
v(n(t(d)("ap.apBatchAction.empty")), 1)
|
|
61
65
|
]),
|
|
62
66
|
_: 1
|
|
63
67
|
})
|
|
64
68
|
])
|
|
65
|
-
]),
|
|
69
|
+
])) : O("", !0),
|
|
66
70
|
m(e.$slots, "suffix")
|
|
67
71
|
], 2)
|
|
68
72
|
], 2));
|
|
69
73
|
}
|
|
70
74
|
});
|
|
71
75
|
export {
|
|
72
|
-
|
|
76
|
+
Z as default
|
|
73
77
|
};
|
|
@@ -2,7 +2,9 @@ import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicP
|
|
|
2
2
|
import { ApBatchActionProps } from './interface';
|
|
3
3
|
export * from './interface';
|
|
4
4
|
declare const ApBatchAction: {
|
|
5
|
-
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
5
|
+
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
6
|
+
showSelected: boolean;
|
|
7
|
+
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
6
8
|
headerRef: HTMLDivElement;
|
|
7
9
|
}, HTMLDivElement, ComponentProvideOptions, {
|
|
8
10
|
P: {};
|
|
@@ -11,11 +13,15 @@ declare const ApBatchAction: {
|
|
|
11
13
|
C: {};
|
|
12
14
|
M: {};
|
|
13
15
|
Defaults: {};
|
|
14
|
-
}, Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, {
|
|
16
|
+
}, Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, {
|
|
17
|
+
showSelected: boolean;
|
|
18
|
+
}>;
|
|
15
19
|
__isFragment?: never;
|
|
16
20
|
__isTeleport?: never;
|
|
17
21
|
__isSuspense?: never;
|
|
18
|
-
} & ComponentOptionsBase<Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
22
|
+
} & ComponentOptionsBase<Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
23
|
+
showSelected: boolean;
|
|
24
|
+
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
19
25
|
$slots: Readonly<{
|
|
20
26
|
header: () => any[];
|
|
21
27
|
prefix: () => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as z, ref as
|
|
1
|
+
import { defineComponent as z, ref as M, computed as v, watch as U, createElementBlock as H, openBlock as c, Fragment as J, createBlock as m, createCommentVNode as S, unref as o, mergeProps as A, withCtx as u, createTextVNode as h, toDisplayString as E, normalizeClass as Q, createVNode as F } from "vue";
|
|
2
2
|
import { DownOutlined as W } from "@ant-design/icons-vue";
|
|
3
|
-
import { message as X, Dropdown as Y, Menu as Z, MenuItem as
|
|
3
|
+
import { message as X, Dropdown as Y, Menu as Z, MenuItem as T } from "@aplus-frontend/antdv";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
|
-
import { ApExportGroupActionType as
|
|
5
|
+
import { ApExportGroupActionType as s } from "./interface.mjs";
|
|
6
6
|
import { usePermission as _ } from "@aplus-frontend/hooks";
|
|
7
7
|
import { handleExportDownload as ee } from "./handleExportDownload.mjs";
|
|
8
8
|
import { useInjectApTable as te } from "../../ap-table/context.mjs";
|
|
@@ -11,9 +11,9 @@ import "../../ap-button/index.mjs";
|
|
|
11
11
|
import { ApBatchActionGroup as le } from "../ap-batch-action-group/index.mjs";
|
|
12
12
|
import { useNamespace as oe } from "../../config-provider/hooks/use-namespace.mjs";
|
|
13
13
|
import { useLocale as re } from "../../config-provider/hooks/use-locale.mjs";
|
|
14
|
-
import { useGlobalConfig as
|
|
15
|
-
import
|
|
16
|
-
const
|
|
14
|
+
import { useGlobalConfig as se } from "../../config-provider/hooks/use-global-config.mjs";
|
|
15
|
+
import K from "../../ap-button/ap-button.vue.mjs";
|
|
16
|
+
const Ee = /* @__PURE__ */ z({
|
|
17
17
|
__name: "ApExportGroup",
|
|
18
18
|
props: {
|
|
19
19
|
type: { default: "button" },
|
|
@@ -32,128 +32,128 @@ const we = /* @__PURE__ */ z({
|
|
|
32
32
|
successMessage: { type: [Boolean, String], default: !1 },
|
|
33
33
|
exportField: { type: [Boolean, Object], default: void 0 }
|
|
34
34
|
},
|
|
35
|
-
setup(
|
|
36
|
-
const { hasPermission:
|
|
35
|
+
setup(D) {
|
|
36
|
+
const { hasPermission: R } = _(), e = D, { columns: g, dataSource: b } = te(), { b: j } = oe("ap-export-group"), { t: n } = re(), P = se("exportField"), d = M(!1), w = M(!1), f = v(
|
|
37
37
|
() => {
|
|
38
38
|
var l;
|
|
39
|
-
return !!(e != null && e.disabled) || (b !== void 0 ? !((l = b == null ? void 0 : b.value) != null && l.length) : !1) ||
|
|
39
|
+
return !!(e != null && e.disabled) || (b !== void 0 ? !((l = b == null ? void 0 : b.value) != null && l.length) : !1) || d.value;
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
42
|
U(
|
|
43
|
-
() =>
|
|
43
|
+
() => f.value,
|
|
44
44
|
() => {
|
|
45
|
-
|
|
45
|
+
f.value && (w.value = !1);
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
immediate: !0
|
|
49
49
|
}
|
|
50
50
|
);
|
|
51
|
-
const
|
|
52
|
-
const
|
|
51
|
+
const I = v(() => (e == null ? void 0 : e.successMessage) === !0 ? n("ap.apExportGroup.exportSuccess") : e != null && e.successMessage ? e.successMessage : ""), N = (l = e == null ? void 0 : e.exportField) => {
|
|
52
|
+
const a = "exportFieldList", t = l ?? (P.value === "" ? !0 : P.value) ?? !1;
|
|
53
53
|
return t === !0 ? {
|
|
54
|
-
key:
|
|
54
|
+
key: a
|
|
55
55
|
} : typeof t == "object" ? {
|
|
56
56
|
...t,
|
|
57
|
-
key: t.key ??
|
|
57
|
+
key: t.key ?? a
|
|
58
58
|
} : t;
|
|
59
|
-
}
|
|
59
|
+
}, $ = {
|
|
60
60
|
textAlign: "center"
|
|
61
|
-
},
|
|
61
|
+
}, x = v(() => (e == null ? void 0 : e.selectedRowKeys) || []), L = v(() => {
|
|
62
62
|
let l = e == null ? void 0 : e.ifShow;
|
|
63
|
-
return !(e != null && e.ifShow) && (e != null && e.auth) && (l = () =>
|
|
63
|
+
return !(e != null && e.ifShow) && (e != null && e.auth) && (l = () => R(e.auth)), (l == null ? void 0 : l()) ?? !0;
|
|
64
64
|
});
|
|
65
65
|
async function O() {
|
|
66
|
-
|
|
66
|
+
x.value.length > 0 ? p({ key: s.SELECT }) : p({ key: s.ALL });
|
|
67
67
|
}
|
|
68
|
-
async function
|
|
69
|
-
var G, B
|
|
70
|
-
const
|
|
68
|
+
async function p({ key: l, option: a }) {
|
|
69
|
+
var G, B;
|
|
70
|
+
const t = a || e, { getRequestParams: i, request: r } = t || {}, y = N(t == null ? void 0 : t.exportField);
|
|
71
71
|
let C = {};
|
|
72
|
-
l ===
|
|
73
|
-
[(
|
|
74
|
-
} : l ===
|
|
75
|
-
const q = ((G =
|
|
72
|
+
l === s.SELECT ? C = {
|
|
73
|
+
[(t == null ? void 0 : t.idKey) || "ids"]: x.value
|
|
74
|
+
} : l === s.ALL && (C = (i == null ? void 0 : i()) || {});
|
|
75
|
+
const q = ((G = t == null ? void 0 : t.getInitialParams) == null ? void 0 : G.call(t)) || {};
|
|
76
76
|
try {
|
|
77
|
-
|
|
78
|
-
let
|
|
77
|
+
d.value = !0;
|
|
78
|
+
let k = Object.assign(
|
|
79
79
|
{
|
|
80
80
|
...C,
|
|
81
81
|
...q
|
|
82
82
|
},
|
|
83
|
-
|
|
84
|
-
[
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
y && (g != null && g.value) ? {
|
|
84
|
+
[y.key]: ae(
|
|
85
|
+
g.value,
|
|
86
|
+
y == null ? void 0 : y.convertField
|
|
87
87
|
)
|
|
88
88
|
} : {}
|
|
89
89
|
);
|
|
90
|
-
|
|
90
|
+
k = ((B = t == null ? void 0 : t.beforeRequest) == null ? void 0 : B.call(t, k)) || k, await ee(async () => await (r == null ? void 0 : r(k))), t != null && t.successMessage && X.success(I.value);
|
|
91
91
|
} finally {
|
|
92
|
-
|
|
92
|
+
d.value = !1;
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
const V =
|
|
95
|
+
const V = v(() => {
|
|
96
96
|
var l;
|
|
97
|
-
return ((l = e == null ? void 0 : e.groupList) == null ? void 0 : l.map((
|
|
98
|
-
key:
|
|
99
|
-
content:
|
|
100
|
-
auth:
|
|
101
|
-
ifShow:
|
|
102
|
-
disabled:
|
|
97
|
+
return ((l = e == null ? void 0 : e.groupList) == null ? void 0 : l.map((a, t) => ({
|
|
98
|
+
key: t,
|
|
99
|
+
content: a == null ? void 0 : a.text,
|
|
100
|
+
auth: a == null ? void 0 : a.auth,
|
|
101
|
+
ifShow: a == null ? void 0 : a.ifShow,
|
|
102
|
+
disabled: a == null ? void 0 : a.disabled,
|
|
103
103
|
onClick: () => {
|
|
104
|
-
|
|
105
|
-
key:
|
|
106
|
-
option:
|
|
107
|
-
}) :
|
|
108
|
-
key:
|
|
109
|
-
option:
|
|
104
|
+
x.value.length > 0 ? p({
|
|
105
|
+
key: s.SELECT,
|
|
106
|
+
option: a
|
|
107
|
+
}) : p({
|
|
108
|
+
key: s.ALL,
|
|
109
|
+
option: a
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
}))) || [];
|
|
113
113
|
});
|
|
114
|
-
return (l,
|
|
115
|
-
var
|
|
116
|
-
return
|
|
117
|
-
L.value && e.type === "button" ? (
|
|
114
|
+
return (l, a) => {
|
|
115
|
+
var t, i;
|
|
116
|
+
return c(), H(J, null, [
|
|
117
|
+
L.value && e.type === "button" ? (c(), m(o(K), A({ key: 0 }, {
|
|
118
118
|
...l.$attrs
|
|
119
119
|
}, {
|
|
120
|
-
disabled:
|
|
121
|
-
loading:
|
|
120
|
+
disabled: f.value,
|
|
121
|
+
loading: d.value,
|
|
122
122
|
"min-width": "",
|
|
123
123
|
onClick: O
|
|
124
124
|
}), {
|
|
125
|
-
default:
|
|
126
|
-
|
|
125
|
+
default: u(() => [
|
|
126
|
+
h(E((e == null ? void 0 : e.text) ?? o(n)("ap.apExportGroup.export")), 1)
|
|
127
127
|
]),
|
|
128
128
|
_: 1
|
|
129
129
|
}, 16, ["disabled", "loading"])) : S("", !0),
|
|
130
|
-
L.value && e.type === "dropdown" ? (
|
|
130
|
+
L.value && e.type === "dropdown" ? (c(), m(o(Y), {
|
|
131
131
|
key: 1,
|
|
132
132
|
open: w.value,
|
|
133
|
-
"onUpdate:open":
|
|
134
|
-
class: Q([o(
|
|
133
|
+
"onUpdate:open": a[0] || (a[0] = (r) => w.value = r),
|
|
134
|
+
class: Q([o(j)()]),
|
|
135
135
|
"overlay-style": $,
|
|
136
|
-
disabled:
|
|
136
|
+
disabled: f.value
|
|
137
137
|
}, {
|
|
138
|
-
overlay:
|
|
139
|
-
F(o(Z), { onClick:
|
|
140
|
-
default:
|
|
138
|
+
overlay: u(() => [
|
|
139
|
+
F(o(Z), { onClick: p }, {
|
|
140
|
+
default: u(() => {
|
|
141
141
|
var r;
|
|
142
142
|
return [
|
|
143
|
-
(
|
|
144
|
-
key: o(
|
|
145
|
-
disabled: ((r =
|
|
143
|
+
(c(), m(o(T), {
|
|
144
|
+
key: o(s).SELECT,
|
|
145
|
+
disabled: ((r = x.value) == null ? void 0 : r.length) === 0
|
|
146
146
|
}, {
|
|
147
|
-
default:
|
|
148
|
-
|
|
147
|
+
default: u(() => [
|
|
148
|
+
h(E(o(n)("ap.apExportGroup.exportSelected")), 1)
|
|
149
149
|
]),
|
|
150
150
|
_: 1
|
|
151
151
|
}, 8, ["disabled"])),
|
|
152
|
-
(
|
|
153
|
-
key: o(
|
|
152
|
+
(c(), m(o(T), {
|
|
153
|
+
key: o(s).ALL
|
|
154
154
|
}, {
|
|
155
|
-
default:
|
|
156
|
-
|
|
155
|
+
default: u(() => [
|
|
156
|
+
h(E(o(n)("ap.apExportGroup.exportAll")), 1)
|
|
157
157
|
]),
|
|
158
158
|
_: 1
|
|
159
159
|
}))
|
|
@@ -162,12 +162,12 @@ const we = /* @__PURE__ */ z({
|
|
|
162
162
|
_: 1
|
|
163
163
|
})
|
|
164
164
|
]),
|
|
165
|
-
default:
|
|
166
|
-
F(o(
|
|
165
|
+
default: u(() => [
|
|
166
|
+
F(o(K), A({
|
|
167
167
|
...l.$attrs
|
|
168
|
-
}, { loading:
|
|
169
|
-
default:
|
|
170
|
-
|
|
168
|
+
}, { loading: d.value }), {
|
|
169
|
+
default: u(() => [
|
|
170
|
+
h(E((e == null ? void 0 : e.text) ?? o(n)("ap.apExportGroup.export")) + " ", 1),
|
|
171
171
|
F(o(W))
|
|
172
172
|
]),
|
|
173
173
|
_: 1
|
|
@@ -175,15 +175,15 @@ const we = /* @__PURE__ */ z({
|
|
|
175
175
|
]),
|
|
176
176
|
_: 1
|
|
177
177
|
}, 8, ["open", "class", "disabled"])) : S("", !0),
|
|
178
|
-
L.value && e.type === "group" ? (
|
|
178
|
+
L.value && e.type === "group" ? (c(), m(o(le), A({ key: 2 }, {
|
|
179
179
|
...l.$attrs
|
|
180
180
|
}, {
|
|
181
|
-
disabled:
|
|
182
|
-
loading:
|
|
181
|
+
disabled: f.value,
|
|
182
|
+
loading: d.value,
|
|
183
183
|
"button-props": {
|
|
184
184
|
...e.buttonProps,
|
|
185
|
-
content: ((
|
|
186
|
-
type: ((
|
|
185
|
+
content: ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.content) ?? o(n)("ap.apExportGroup.export"),
|
|
186
|
+
type: ((i = e == null ? void 0 : e.buttonProps) == null ? void 0 : i.type) ?? "default"
|
|
187
187
|
},
|
|
188
188
|
"menu-list": V.value
|
|
189
189
|
}), null, 16, ["disabled", "loading", "button-props", "menu-list"])) : S("", !0)
|
|
@@ -192,5 +192,5 @@ const we = /* @__PURE__ */ z({
|
|
|
192
192
|
}
|
|
193
193
|
});
|
|
194
194
|
export {
|
|
195
|
-
|
|
195
|
+
Ee as default
|
|
196
196
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApTextProps } from './interface';
|
|
2
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, CSSProperties, ComponentProvideOptions } from 'vue';
|
|
3
2
|
import { LinkProps } from '@aplus-frontend/antdv/es/typography/Link';
|
|
3
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, CSSProperties, ComponentProvideOptions } from 'vue';
|
|
4
4
|
type ApTextSlots = {
|
|
5
5
|
default: any;
|
|
6
6
|
ellipsisSymbol: any;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { TypographyLink as
|
|
3
|
-
import { isUndefined as
|
|
1
|
+
import { defineComponent as L, useSlots as O, computed as n, unref as o, createVNode as $, isVNode as z, Fragment as D, createElementBlock as d, openBlock as t, normalizeClass as s, createCommentVNode as v, createElementVNode as x, normalizeStyle as E, createBlock as u, resolveDynamicComponent as U, mergeProps as C, withCtx as m, renderSlot as i, createSlots as w, createTextVNode as F, toDisplayString as G, renderList as I, normalizeProps as R, guardReactiveProps as _ } from "vue";
|
|
2
|
+
import { TypographyLink as q, TypographyText as H } from "@aplus-frontend/antdv";
|
|
3
|
+
import { isUndefined as p, omit as f, isString as J } from "lodash-unified";
|
|
4
4
|
import "../config-provider/index.mjs";
|
|
5
|
-
import { useInjectApTextGroup as
|
|
5
|
+
import { useInjectApTextGroup as K } from "./context.mjs";
|
|
6
|
+
import { isDef as M } from "../utils/index.mjs";
|
|
6
7
|
import { useNamespace as Q } from "../config-provider/hooks/use-namespace.mjs";
|
|
7
|
-
const
|
|
8
|
+
const ae = /* @__PURE__ */ L({
|
|
8
9
|
name: "ApText",
|
|
9
10
|
__name: "index",
|
|
10
11
|
props: {
|
|
@@ -65,60 +66,65 @@ const te = /* @__PURE__ */ A({
|
|
|
65
66
|
style: {}
|
|
66
67
|
},
|
|
67
68
|
setup(B) {
|
|
68
|
-
const
|
|
69
|
+
const y = O(), e = B, {
|
|
69
70
|
b: g,
|
|
70
|
-
e:
|
|
71
|
+
e: c,
|
|
71
72
|
em: S,
|
|
72
|
-
m:
|
|
73
|
+
m: P
|
|
73
74
|
} = Q("ap-text"), {
|
|
74
|
-
colon:
|
|
75
|
-
vertical:
|
|
76
|
-
labelStyle:
|
|
77
|
-
} =
|
|
78
|
-
const
|
|
79
|
-
return Object.assign(
|
|
80
|
-
}),
|
|
81
|
-
if (
|
|
82
|
-
return
|
|
75
|
+
colon: a,
|
|
76
|
+
vertical: r,
|
|
77
|
+
labelStyle: N
|
|
78
|
+
} = K(), T = n(() => p(e.colon) ? p(a == null ? void 0 : a.value) ? !0 : a.value : e.colon), V = n(() => p(e.vertical) ? p(r == null ? void 0 : r.value) ? !1 : r.value : e.vertical), h = n(() => {
|
|
79
|
+
const l = o(N) || {};
|
|
80
|
+
return Object.assign(l, e.labelStyle || {}), l;
|
|
81
|
+
}), k = n(() => {
|
|
82
|
+
if (e.label)
|
|
83
|
+
return z(e.label) ? e.label : $(D, null, [e.label]);
|
|
84
|
+
}), j = n(() => {
|
|
85
|
+
const l = M(e.linkProps.ellipsis) ? e.linkProps.ellipsis : !!e.ellipsis;
|
|
86
|
+
return {
|
|
87
|
+
href: J(e.link) ? e.link : void 0,
|
|
88
|
+
...f(e, ["linkProps"]),
|
|
89
|
+
...e.linkProps,
|
|
90
|
+
ellipsis: l
|
|
91
|
+
};
|
|
83
92
|
});
|
|
84
|
-
return (
|
|
85
|
-
class: s([
|
|
86
|
-
[
|
|
93
|
+
return (l, W) => (t(), d("div", {
|
|
94
|
+
class: s([o(g)(), {
|
|
95
|
+
[o(P)("vertical")]: V.value
|
|
87
96
|
}])
|
|
88
|
-
}, [
|
|
97
|
+
}, [k.value ? (t(), d("span", {
|
|
89
98
|
key: 0,
|
|
90
|
-
class: s([
|
|
91
|
-
[
|
|
99
|
+
class: s([o(c)("label"), {
|
|
100
|
+
[o(S)("label", "no-colon")]: !T.value
|
|
92
101
|
}]),
|
|
93
102
|
style: E(h.value)
|
|
94
|
-
}, [(
|
|
95
|
-
class: s(
|
|
96
|
-
}, [
|
|
103
|
+
}, [(t(), u(U(k.value)))], 6)) : v("", !0), x("div", {
|
|
104
|
+
class: s(o(c)("content"))
|
|
105
|
+
}, [l.link ? (t(), u(o(q), C({
|
|
97
106
|
key: 0
|
|
98
|
-
}, {
|
|
99
|
-
|
|
100
|
-
...e.linkProps
|
|
101
|
-
}, {
|
|
102
|
-
onClick: e.onClickContent
|
|
107
|
+
}, j.value, {
|
|
108
|
+
onClick: l.onClickContent
|
|
103
109
|
}), {
|
|
104
|
-
default: m(() => [i(
|
|
110
|
+
default: m(() => [i(l.$slots, "default")]),
|
|
105
111
|
_: 3
|
|
106
|
-
}, 16, ["onClick"])) : (
|
|
112
|
+
}, 16, ["onClick"])) : (t(), u(o(H), C({
|
|
107
113
|
key: 1
|
|
108
|
-
},
|
|
109
|
-
onClick:
|
|
114
|
+
}, o(f)(e, ["label", "colon", "link", "linkProps", "vertical", "labelStyle"]), {
|
|
115
|
+
onClick: l.onClickContent
|
|
110
116
|
}), w({
|
|
111
|
-
default: m(() => [i(
|
|
117
|
+
default: m(() => [i(l.$slots, "default", {}, () => [F(G(l.content || "--"), 1)])]),
|
|
112
118
|
_: 2
|
|
113
|
-
}, [I(
|
|
114
|
-
name:
|
|
115
|
-
fn: m((
|
|
116
|
-
}))]), 1040, ["onClick"])),
|
|
119
|
+
}, [I(o(f)(y, ["default", "addonAfter"]), (X, b) => ({
|
|
120
|
+
name: b,
|
|
121
|
+
fn: m((A) => [i(l.$slots, b, R(_(A || {})))])
|
|
122
|
+
}))]), 1040, ["onClick"])), y.addonAfter ? (t(), d("div", {
|
|
117
123
|
key: 2,
|
|
118
|
-
class: s(
|
|
119
|
-
}, [i(
|
|
124
|
+
class: s(o(c)("content-addon-after"))
|
|
125
|
+
}, [i(l.$slots, "addonAfter")], 2)) : v("", !0)], 2)], 2));
|
|
120
126
|
}
|
|
121
127
|
});
|
|
122
128
|
export {
|
|
123
|
-
|
|
129
|
+
ae as default
|
|
124
130
|
};
|
package/es/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "6.
|
|
1
|
+
declare const _default: "6.16.0";
|
|
2
2
|
export default _default;
|
package/es/src/version.mjs
CHANGED
package/es/test/setup.d.ts
CHANGED
|
@@ -17,7 +17,9 @@ declare function __VLS_template(): {
|
|
|
17
17
|
rootEl: HTMLDivElement;
|
|
18
18
|
};
|
|
19
19
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
|
-
declare const __VLS_component: DefineComponent<ApBatchActionProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApBatchActionProps> & Readonly<{}>, {
|
|
20
|
+
declare const __VLS_component: DefineComponent<ApBatchActionProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApBatchActionProps> & Readonly<{}>, {
|
|
21
|
+
showSelected: boolean;
|
|
22
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
21
23
|
headerRef: HTMLDivElement;
|
|
22
24
|
}, HTMLDivElement>;
|
|
23
25
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),B=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const V=require("../../config-provider/hooks/use-namespace.js"),k=require("../../config-provider/hooks/use-locale.js"),w={key:0,class:"selected-desc"},C={class:"selected-desc-conut"},E={class:"selected-desc-clean"},D=e.defineComponent({__name:"ApBatchAction",props:{selectedRowKeys:{},clearAll:{},showSelected:{type:Boolean,default:!0}},setup(_){const{b:o}=V.useNamespace("ap-batch-action"),{t:r}=k.useLocale(),a=_,c=e.useSlots(),A=e.computed(()=>{var t;return((t=a.selectedRowKeys)==null?void 0:t.length)||0}),s=e.ref(!1),d=e.ref();return e.watch(()=>c.header,()=>{setTimeout(()=>{var l,i,p,h,f,m,n,v,y,S,N;const t=(l=c.header)==null?void 0:l.call(c);(t==null?void 0:t.length)===1&&((p=(i=t==null?void 0:t[0])==null?void 0:i.type)==null?void 0:p.name)==="ASpace"?s.value=!!((y=(v=(n=Array.prototype.slice.call((m=(f=(h=d.value)==null?void 0:h.children)==null?void 0:f[0])==null?void 0:m.children))==null?void 0:n.filter)==null?void 0:v.call(n,u=>{var g;return(g=u==null?void 0:u.children)==null?void 0:g.length}))!=null&&y.length):s.value=!!((N=(S=d.value)==null?void 0:S.children)!=null&&N.length)})},{immediate:!0}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(o)()])},[e.withDirectives(e.createElementVNode("div",{ref_key:"headerRef",ref:d,class:e.normalizeClass(e.unref(o)("header"))},[e.renderSlot(t.$slots,"header")],2),[[e.vShow,s.value]]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(o)("body"))},[e.renderSlot(t.$slots,"prefix"),a.showSelected?(e.openBlock(),e.createElementBlock("div",w,[e.createElementVNode("div",C,[e.createTextVNode(e.toDisplayString(e.unref(r)("ap.apBatchAction.selected"))+" ",1),e.createElementVNode("span",null,e.toDisplayString(A.value),1),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("ap.apBatchAction.piecesOfData")),1)]),e.createElementVNode("div",E,[e.createVNode(e.unref(B.Button),{type:"link",onClick:l[0]||(l[0]=i=>a.clearAll&&a.clearAll())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("ap.apBatchAction.empty")),1)]),_:1})])])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"suffix")],2)],2))}});exports.default=D;
|
|
@@ -2,7 +2,9 @@ import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicP
|
|
|
2
2
|
import { ApBatchActionProps } from './interface';
|
|
3
3
|
export * from './interface';
|
|
4
4
|
declare const ApBatchAction: {
|
|
5
|
-
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
5
|
+
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
6
|
+
showSelected: boolean;
|
|
7
|
+
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
6
8
|
headerRef: HTMLDivElement;
|
|
7
9
|
}, HTMLDivElement, ComponentProvideOptions, {
|
|
8
10
|
P: {};
|
|
@@ -11,11 +13,15 @@ declare const ApBatchAction: {
|
|
|
11
13
|
C: {};
|
|
12
14
|
M: {};
|
|
13
15
|
Defaults: {};
|
|
14
|
-
}, Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, {
|
|
16
|
+
}, Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, {
|
|
17
|
+
showSelected: boolean;
|
|
18
|
+
}>;
|
|
15
19
|
__isFragment?: never;
|
|
16
20
|
__isTeleport?: never;
|
|
17
21
|
__isSuspense?: never;
|
|
18
|
-
} & ComponentOptionsBase<Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
22
|
+
} & ComponentOptionsBase<Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
23
|
+
showSelected: boolean;
|
|
24
|
+
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
19
25
|
$slots: Readonly<{
|
|
20
26
|
header: () => any[];
|
|
21
27
|
prefix: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),M=require("@ant-design/icons-vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),M=require("@ant-design/icons-vue"),f=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const n=require("./interface.js"),N=require("@aplus-frontend/hooks"),V=require("./handleExportDownload.js"),D=require("../../ap-table/context.js"),I=require("./convertExportField.js");require("../../ap-button/index.js");const K=require("../ap-batch-action-group/index.js"),j=require("../../config-provider/hooks/use-namespace.js"),R=require("../../config-provider/hooks/use-locale.js"),O=require("../../config-provider/hooks/use-global-config.js"),C=require("../../ap-button/ap-button.vue.js"),_=e.defineComponent({__name:"ApExportGroup",props:{type:{default:"button"},selectedRowKeys:{},groupList:{},buttonProps:{},disabled:{type:Boolean},auth:{},ifShow:{},text:{},idKey:{},request:{},getRequestParams:{},getInitialParams:{},beforeRequest:{},successMessage:{type:[Boolean,String],default:!1},exportField:{type:[Boolean,Object],default:void 0}},setup(B){const{hasPermission:L}=N.usePermission(),t=B,{columns:y,dataSource:x}=D.useInjectApTable(),{b:G}=j.useNamespace("ap-export-group"),{t:l}=R.useLocale(),E=O.useGlobalConfig("exportField"),s=e.ref(!1),b=e.ref(!1),i=e.computed(()=>{var a;return!!(t!=null&&t.disabled)||(x!==void 0?!((a=x==null?void 0:x.value)!=null&&a.length):!1)||s.value});e.watch(()=>i.value,()=>{i.value&&(b.value=!1)},{immediate:!0});const S=e.computed(()=>(t==null?void 0:t.successMessage)===!0?l("ap.apExportGroup.exportSuccess"):t!=null&&t.successMessage?t.successMessage:""),T=(a=t==null?void 0:t.exportField)=>{const r="exportFieldList",o=a??(E.value===""?!0:E.value)??!1;return o===!0?{key:r}:typeof o=="object"?{...o,key:o.key??r}:o},m={textAlign:"center"},v=e.computed(()=>(t==null?void 0:t.selectedRowKeys)||[]),k=e.computed(()=>{let a=t==null?void 0:t.ifShow;return!(t!=null&&t.ifShow)&&(t!=null&&t.auth)&&(a=()=>L(t.auth)),(a==null?void 0:a())??!0});async function q(){v.value.length>0?d({key:n.ApExportGroupActionType.SELECT}):d({key:n.ApExportGroupActionType.ALL})}async function d({key:a,option:r}){var w,A;const o=r||t,{getRequestParams:c,request:u}=o||{},p=T(o==null?void 0:o.exportField);let h={};a===n.ApExportGroupActionType.SELECT?h={[(o==null?void 0:o.idKey)||"ids"]:v.value}:a===n.ApExportGroupActionType.ALL&&(h=(c==null?void 0:c())||{});const F=((w=o==null?void 0:o.getInitialParams)==null?void 0:w.call(o))||{};try{s.value=!0;let g=Object.assign({...h,...F},p&&(y!=null&&y.value)?{[p.key]:I.convertExportField(y.value,p==null?void 0:p.convertField)}:{});g=((A=o==null?void 0:o.beforeRequest)==null?void 0:A.call(o,g))||g,await V.handleExportDownload(async()=>await(u==null?void 0:u(g))),o!=null&&o.successMessage&&f.message.success(S.value)}finally{s.value=!1}}const P=e.computed(()=>{var a;return((a=t==null?void 0:t.groupList)==null?void 0:a.map((r,o)=>({key:o,content:r==null?void 0:r.text,auth:r==null?void 0:r.auth,ifShow:r==null?void 0:r.ifShow,disabled:r==null?void 0:r.disabled,onClick:()=>{v.value.length>0?d({key:n.ApExportGroupActionType.SELECT,option:r}):d({key:n.ApExportGroupActionType.ALL,option:r})}})))||[]});return(a,r)=>{var o,c;return e.openBlock(),e.createElementBlock(e.Fragment,null,[k.value&&t.type==="button"?(e.openBlock(),e.createBlock(e.unref(C.default),e.mergeProps({key:0},{...a.$attrs},{disabled:i.value,loading:s.value,"min-width":"",onClick:q}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((t==null?void 0:t.text)??e.unref(l)("ap.apExportGroup.export")),1)]),_:1},16,["disabled","loading"])):e.createCommentVNode("",!0),k.value&&t.type==="dropdown"?(e.openBlock(),e.createBlock(e.unref(f.Dropdown),{key:1,open:b.value,"onUpdate:open":r[0]||(r[0]=u=>b.value=u),class:e.normalizeClass([e.unref(G)()]),"overlay-style":m,disabled:i.value},{overlay:e.withCtx(()=>[e.createVNode(e.unref(f.Menu),{onClick:d},{default:e.withCtx(()=>{var u;return[(e.openBlock(),e.createBlock(e.unref(f.MenuItem),{key:e.unref(n.ApExportGroupActionType).SELECT,disabled:((u=v.value)==null?void 0:u.length)===0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("ap.apExportGroup.exportSelected")),1)]),_:1},8,["disabled"])),(e.openBlock(),e.createBlock(e.unref(f.MenuItem),{key:e.unref(n.ApExportGroupActionType).ALL},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("ap.apExportGroup.exportAll")),1)]),_:1}))]}),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(C.default),e.mergeProps({...a.$attrs},{loading:s.value}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((t==null?void 0:t.text)??e.unref(l)("ap.apExportGroup.export"))+" ",1),e.createVNode(e.unref(M.DownOutlined))]),_:1},16,["loading"])]),_:1},8,["open","class","disabled"])):e.createCommentVNode("",!0),k.value&&t.type==="group"?(e.openBlock(),e.createBlock(e.unref(K.ApBatchActionGroup),e.mergeProps({key:2},{...a.$attrs},{disabled:i.value,loading:s.value,"button-props":{...t.buttonProps,content:((o=t==null?void 0:t.buttonProps)==null?void 0:o.content)??e.unref(l)("ap.apExportGroup.export"),type:((c=t==null?void 0:t.buttonProps)==null?void 0:c.type)??"default"},"menu-list":P.value}),null,16,["disabled","loading","button-props","menu-list"])):e.createCommentVNode("",!0)],64)}}});exports.default=_;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApTextProps } from './interface';
|
|
2
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, CSSProperties, ComponentProvideOptions } from 'vue';
|
|
3
2
|
import { LinkProps } from '@aplus-frontend/antdv/es/typography/Link';
|
|
3
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, CSSProperties, ComponentProvideOptions } from 'vue';
|
|
4
4
|
type ApTextSlots = {
|
|
5
5
|
default: any;
|
|
6
6
|
ellipsisSymbol: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@aplus-frontend/antdv"),t=require("lodash-unified");require("../config-provider/index.js");const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@aplus-frontend/antdv"),t=require("lodash-unified");require("../config-provider/index.js");const g=require("./context.js"),S=require("../utils/index.js"),P=require("../config-provider/hooks/use-namespace.js"),N=e.defineComponent({name:"ApText",__name:"index",props:{ellipsis:{type:[Boolean,Object]},delete:{type:Boolean},type:{},code:{type:Boolean},mark:{type:Boolean},strong:{type:Boolean},content:{},underline:{type:Boolean},disabled:{type:Boolean},prefixCls:{},editable:{type:[Boolean,Object]},keyboard:{type:Boolean},copyable:{type:[Boolean,Object]},"onUpdate:content":{},label:{},colon:{type:Boolean,default:void 0},vertical:{type:Boolean,default:void 0},labelStyle:{default:void 0},link:{type:[Boolean,String]},linkProps:{default:()=>({})},onClickContent:{},class:{},style:{}},setup(d){const s=e.useSlots(),n=d,{b:p,e:a,em:f,m}=P.useNamespace("ap-text"),{colon:o,vertical:r,labelStyle:k}=g.useInjectApTextGroup(),y=e.computed(()=>t.isUndefined(n.colon)?t.isUndefined(o==null?void 0:o.value)?!0:o.value:n.colon),b=e.computed(()=>t.isUndefined(n.vertical)?t.isUndefined(r==null?void 0:r.value)?!1:r.value:n.vertical),B=e.computed(()=>{const l=e.unref(k)||{};return Object.assign(l,n.labelStyle||{}),l}),i=e.computed(()=>{if(n.label)return e.isVNode(n.label)?n.label:e.createVNode(e.Fragment,null,[n.label])}),v=e.computed(()=>{const l=S.isDef(n.linkProps.ellipsis)?n.linkProps.ellipsis:!!n.ellipsis;return{href:t.isString(n.link)?n.link:void 0,...t.omit(n,["linkProps"]),...n.linkProps,ellipsis:l}});return(l,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(p)(),{[e.unref(m)("vertical")]:b.value}])},[i.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(a)("label"),{[e.unref(f)("label","no-colon")]:!y.value}]),style:e.normalizeStyle(B.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value)))],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a)("content"))},[l.link?(e.openBlock(),e.createBlock(e.unref(u.TypographyLink),e.mergeProps({key:0},v.value,{onClick:l.onClickContent}),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},16,["onClick"])):(e.openBlock(),e.createBlock(e.unref(u.TypographyText),e.mergeProps({key:1},e.unref(t.omit)(n,["label","colon","link","linkProps","vertical","labelStyle"]),{onClick:l.onClickContent}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(l.content||"--"),1)])]),_:2},[e.renderList(e.unref(t.omit)(s,["default","addonAfter"]),(q,c)=>({name:c,fn:e.withCtx(C=>[e.renderSlot(l.$slots,c,e.normalizeProps(e.guardReactiveProps(C||{})))])}))]),1040,["onClick"])),s.addonAfter?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(a)("content-addon-after"))},[e.renderSlot(l.$slots,"addonAfter")],2)):e.createCommentVNode("",!0)],2)],2))}});exports.default=N;
|
package/lib/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "6.
|
|
1
|
+
declare const _default: "6.16.0";
|
|
2
2
|
export default _default;
|
package/lib/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="6.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="6.16.0";exports.default=e;
|
package/lib/test/setup.d.ts
CHANGED
package/package.json
CHANGED
package/theme/index.css
CHANGED
|
@@ -3605,6 +3605,9 @@ div.aplus-ap-info-layout-admin__header-shadow.aplus-ap-info-layout-admin__sticky
|
|
|
3605
3605
|
flex-direction: column;
|
|
3606
3606
|
align-items: flex-start;
|
|
3607
3607
|
}
|
|
3608
|
+
.aplus-ap-text--vertical > .aplus-ap-text__content {
|
|
3609
|
+
max-width: 100%;
|
|
3610
|
+
}
|
|
3608
3611
|
.aplus-ap-text__label {
|
|
3609
3612
|
display: inline-flex;
|
|
3610
3613
|
align-items: baseline;
|
package/theme/text/index.css
CHANGED