@aplus-frontend/ui 7.0.1 → 7.1.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/ap-descriptions/ap-descriptions.vue.mjs +39 -39
- package/es/src/ap-descriptions/style/index.mjs +16 -43
- package/es/src/ap-download/ap-download.vue.mjs +43 -43
- package/es/src/ap-download/hooks/useStyle.d.ts +1 -1
- package/es/src/ap-download/hooks/useStyle.mjs +17 -14
- package/es/src/ap-download/style/index.mjs +6 -13
- package/es/src/ap-form/modal-form/index.vue.mjs +59 -60
- package/es/src/ap-form/style/modal-form.mjs +14 -15
- package/es/src/ap-form/style/search-form-sorter.mjs +26 -26
- package/es/src/ap-form/style/token.d.ts +4 -0
- package/es/src/ap-grid/style/index.mjs +3 -3
- package/es/src/ap-pro-card/style/statistic.mjs +3 -3
- package/es/src/ap-pro-card/style/token.mjs +1 -1
- package/es/src/ap-table/style/index.mjs +2 -2
- package/es/src/ap-table/style/setting.mjs +2 -2
- package/es/src/ap-tag/ap-tag-group.vue.mjs +61 -61
- package/es/src/ap-tag/ap-tag.vue.mjs +19 -20
- package/es/src/ap-tag/style/group.mjs +2 -8
- package/es/src/ap-tag/style/index.mjs +14 -23
- package/es/src/ap-upload/apUpload.vue.mjs +39 -39
- package/es/src/ap-upload/components/MultipleFile.vue2.mjs +60 -61
- package/es/src/ap-upload/components/Picture.vue2.mjs +90 -91
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +72 -72
- package/es/src/ap-upload/style/multiple-file.mjs +13 -40
- package/es/src/ap-upload/style/picture.mjs +12 -30
- package/es/src/ap-upload/style/single-file.mjs +5 -16
- package/es/src/business/ap-appendix/style/index.mjs +1 -1
- package/es/src/business/ap-attachment/ApAttachment.mjs +42 -39
- package/es/src/business/ap-copy/style/index.mjs +1 -1
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +45 -46
- package/es/src/business/ap-ladder/ApLadder.mjs +20 -22
- package/es/src/business/ap-ladder/style/index.mjs +9 -34
- package/es/src/business/ap-product-info/ApProductInfo.mjs +21 -22
- package/es/src/business/ap-product-info/style/index.mjs +8 -24
- package/es/src/business/ap-radio-group/style/index.mjs +1 -1
- package/es/src/business/ap-size-input/ApSizeInput.mjs +1 -1
- package/es/src/business/ap-table-modal/hooks/use-table-modal.mjs +18 -19
- package/es/src/business/ap-table-modal/modal-title.vue2.mjs +13 -13
- package/es/src/business/ap-title/style/index.mjs +1 -1
- package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +38 -37
- package/es/src/business/ap-value-select-card/index.vue2.mjs +36 -37
- package/es/src/business/ap-value-select-card/style/index.mjs +7 -29
- package/es/src/business/batch-input-group/style/index.mjs +1 -1
- package/es/src/check-card/style/index.mjs +31 -31
- package/es/src/design-token/constants.mjs +4 -2
- package/es/src/design-token/interface.d.ts +36 -39
- package/es/src/scroll-bar/style/index.mjs +12 -12
- package/es/src/splitter/style/index.mjs +6 -6
- package/es/src/style/index.mjs +1 -1
- package/es/src/text/style/index.mjs +1 -1
- package/es/src/utils/cssinjs/TokenUtil.d.ts +11 -0
- package/es/src/utils/cssinjs/TokenUtil.mjs +26 -0
- package/es/src/utils/cssinjs/index.mjs +23 -22
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
- package/lib/src/ap-descriptions/style/index.js +1 -1
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/hooks/useStyle.d.ts +1 -1
- package/lib/src/ap-download/hooks/useStyle.js +1 -1
- package/lib/src/ap-download/style/index.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/style/modal-form.js +1 -1
- package/lib/src/ap-form/style/search-form-sorter.js +1 -1
- package/lib/src/ap-form/style/token.d.ts +4 -0
- package/lib/src/ap-grid/style/index.js +1 -1
- package/lib/src/ap-pro-card/style/statistic.js +1 -1
- package/lib/src/ap-pro-card/style/token.js +1 -1
- package/lib/src/ap-table/style/index.js +1 -1
- package/lib/src/ap-table/style/setting.js +1 -1
- package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/ap-tag/ap-tag.vue.js +1 -1
- package/lib/src/ap-tag/style/group.js +1 -1
- package/lib/src/ap-tag/style/index.js +1 -1
- package/lib/src/ap-upload/apUpload.vue.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/ap-upload/style/multiple-file.js +1 -1
- package/lib/src/ap-upload/style/picture.js +1 -1
- package/lib/src/ap-upload/style/single-file.js +1 -1
- package/lib/src/business/ap-appendix/style/index.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-copy/style/index.js +1 -1
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/business/ap-ladder/ApLadder.js +1 -1
- package/lib/src/business/ap-ladder/style/index.js +1 -1
- package/lib/src/business/ap-product-info/ApProductInfo.js +1 -1
- package/lib/src/business/ap-product-info/style/index.js +1 -1
- package/lib/src/business/ap-radio-group/style/index.js +1 -1
- package/lib/src/business/ap-size-input/ApSizeInput.js +1 -1
- package/lib/src/business/ap-table-modal/hooks/use-table-modal.js +1 -1
- package/lib/src/business/ap-table-modal/modal-title.vue2.js +1 -1
- package/lib/src/business/ap-title/style/index.js +1 -1
- package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.js +1 -1
- package/lib/src/business/ap-value-select-card/index.vue2.js +1 -1
- package/lib/src/business/ap-value-select-card/style/index.js +1 -1
- package/lib/src/business/batch-input-group/style/index.js +1 -1
- package/lib/src/check-card/style/index.js +1 -1
- package/lib/src/design-token/constants.js +1 -1
- package/lib/src/design-token/interface.d.ts +36 -39
- package/lib/src/scroll-bar/style/index.js +1 -1
- package/lib/src/splitter/style/index.js +1 -1
- package/lib/src/style/index.js +1 -1
- package/lib/src/text/style/index.js +1 -1
- package/lib/src/utils/cssinjs/TokenUtil.d.ts +11 -0
- package/lib/src/utils/cssinjs/TokenUtil.js +1 -0
- package/lib/src/utils/cssinjs/index.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Tooltip as
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as j, ref as x, computed as n, unref as p, watch as I, nextTick as L, onMounted as A, onUnmounted as F, createBlock as g, openBlock as a, mergeProps as w, withCtx as v, createElementVNode as t, normalizeStyle as C, normalizeClass as k, createElementBlock as _, createCommentVNode as G, Fragment as M, renderList as U, toDisplayString as b, renderSlot as q, createTextVNode as H } from "vue";
|
|
2
|
+
import { Tooltip as J } from "@aplus-frontend/antdv";
|
|
3
|
+
import K from "@ant-design/icons-vue";
|
|
4
4
|
import "./ap-tag.vue2.mjs";
|
|
5
5
|
import "../config-provider/index.mjs";
|
|
6
|
-
import { omit as
|
|
7
|
-
import { getTextWidth as
|
|
6
|
+
import { omit as O } from "lodash-unified";
|
|
7
|
+
import { getTextWidth as W } from "./utils.mjs";
|
|
8
8
|
import "../hooks/index.mjs";
|
|
9
|
-
import { useDevWarning as
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { useNamespace as
|
|
14
|
-
import { useResize as
|
|
15
|
-
import
|
|
16
|
-
const
|
|
9
|
+
import { useDevWarning as Q } from "../utils/warning.mjs";
|
|
10
|
+
import X from "./style/group.mjs";
|
|
11
|
+
import { useToken as Y } from "../config-provider/hooks/use-token.mjs";
|
|
12
|
+
import { useLocale as Z } from "../config-provider/hooks/use-locale.mjs";
|
|
13
|
+
import { useNamespace as ee } from "../config-provider/hooks/use-namespace.mjs";
|
|
14
|
+
import { useResize as te } from "../hooks/useResize.mjs";
|
|
15
|
+
import oe from "./ap-tag.vue.mjs";
|
|
16
|
+
const xe = /* @__PURE__ */ j({
|
|
17
17
|
__name: "ap-tag-group",
|
|
18
18
|
props: {
|
|
19
19
|
list: { default: () => [] },
|
|
@@ -21,92 +21,92 @@ const we = /* @__PURE__ */ G({
|
|
|
21
21
|
ellipsisColor: {},
|
|
22
22
|
ellipsis: { default: () => ({}) }
|
|
23
23
|
},
|
|
24
|
-
setup(
|
|
25
|
-
const { t:
|
|
24
|
+
setup(T) {
|
|
25
|
+
const { t: z } = Z(), l = T, { token: V } = Y(), B = Q("ApTagGroup"), { b: d } = ee("tag-group"), E = X("tag-group"), i = x(), { observe: D, unobserve: P } = te(), r = n(() => ({
|
|
26
26
|
...{
|
|
27
|
-
iconColor:
|
|
27
|
+
iconColor: V.value?.textColor1,
|
|
28
28
|
symbol: "icon",
|
|
29
|
-
text:
|
|
29
|
+
text: z("ap.common.more")
|
|
30
30
|
},
|
|
31
|
-
...
|
|
32
|
-
})), S = n(() =>
|
|
33
|
-
let e = 0,
|
|
34
|
-
if (!
|
|
35
|
-
const u =
|
|
36
|
-
for (let s of
|
|
37
|
-
const
|
|
31
|
+
...l.ellipsis
|
|
32
|
+
})), S = n(() => r.value.tooltip && typeof r.value.tooltip == "object" ? O(r.value.tooltip, ["trigger", "title"]) : {}), c = n(() => p(m) < l.list.length), m = x(0), N = n(() => l.list.map((e) => e.text).join("、")), R = n(() => [d(), E.value].filter(Boolean)), h = () => {
|
|
33
|
+
let e = 0, o = 0;
|
|
34
|
+
if (!i.value) return;
|
|
35
|
+
const u = i.value.offsetWidth;
|
|
36
|
+
for (let s of l.list) {
|
|
37
|
+
const f = s.size === "small" ? 8 : 12, y = W(
|
|
38
38
|
s.size === "large" ? 14 : 12,
|
|
39
39
|
s.text
|
|
40
|
-
) +
|
|
41
|
-
if (e +=
|
|
42
|
-
e -=
|
|
40
|
+
) + f + l.space;
|
|
41
|
+
if (e += y, e > u) {
|
|
42
|
+
e -= y;
|
|
43
43
|
break;
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
o++;
|
|
46
46
|
}
|
|
47
|
-
if (
|
|
48
|
-
const
|
|
49
|
-
|
|
47
|
+
if (o < l.list.length) {
|
|
48
|
+
const f = W(12, r.value.text);
|
|
49
|
+
l.ellipsis.symbol === "icon" ? e += 16 : e += f, e > u && o--;
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
m.value = o;
|
|
52
52
|
};
|
|
53
53
|
I(
|
|
54
|
-
() =>
|
|
55
|
-
(e,
|
|
56
|
-
e !==
|
|
57
|
-
|
|
54
|
+
() => l.list,
|
|
55
|
+
(e, o) => {
|
|
56
|
+
e !== o && L(() => {
|
|
57
|
+
h();
|
|
58
58
|
});
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
immediate: !0
|
|
62
62
|
}
|
|
63
63
|
);
|
|
64
|
-
const
|
|
65
|
-
|
|
64
|
+
const $ = () => {
|
|
65
|
+
h();
|
|
66
66
|
};
|
|
67
67
|
return A(() => {
|
|
68
68
|
[["ellipsisColor", "ellipse.color"]].forEach(
|
|
69
|
-
([e,
|
|
69
|
+
([e, o]) => {
|
|
70
70
|
B.deprecated(
|
|
71
|
-
!
|
|
71
|
+
!l[e],
|
|
72
72
|
e,
|
|
73
|
-
|
|
73
|
+
o
|
|
74
74
|
);
|
|
75
75
|
}
|
|
76
|
-
),
|
|
76
|
+
), i.value && D(i.value, $);
|
|
77
77
|
}), F(() => {
|
|
78
|
-
|
|
79
|
-
}), (e,
|
|
80
|
-
title:
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
i.value && P(i.value);
|
|
79
|
+
}), (e, o) => (a(), g(p(J), w({ trigger: "hover" }, S.value), {
|
|
80
|
+
title: v(() => [
|
|
81
|
+
q(e.$slots, "tooltip", { tags: e.list }, () => [
|
|
82
|
+
H(b(N.value), 1)
|
|
83
83
|
])
|
|
84
84
|
]),
|
|
85
|
-
default:
|
|
85
|
+
default: v(() => [
|
|
86
86
|
t("div", {
|
|
87
87
|
ref_key: "container",
|
|
88
|
-
ref:
|
|
88
|
+
ref: i,
|
|
89
89
|
class: k(R.value),
|
|
90
|
-
style:
|
|
91
|
-
pointerEvents:
|
|
90
|
+
style: C({
|
|
91
|
+
pointerEvents: c.value ? "auto" : "none"
|
|
92
92
|
// opacity: isUpdating ? '0' : '1'
|
|
93
93
|
})
|
|
94
94
|
}, [
|
|
95
|
-
(a(!0), _(
|
|
95
|
+
(a(!0), _(M, null, U(e.list, (u, s) => (a(), g(oe, w({ ref_for: !0 }, u, {
|
|
96
96
|
key: s,
|
|
97
97
|
style: {
|
|
98
|
-
display: s >=
|
|
98
|
+
display: s >= m.value ? "none" : "inline-flex",
|
|
99
99
|
marginRight: `${e.space}px`
|
|
100
100
|
}
|
|
101
101
|
}), null, 16, ["style"]))), 128)),
|
|
102
|
-
|
|
102
|
+
c.value && r.value.symbol === "icon" ? (a(), g(p(K), {
|
|
103
103
|
key: 0,
|
|
104
|
-
style:
|
|
105
|
-
color: e.ellipsisColor ||
|
|
104
|
+
style: C({
|
|
105
|
+
color: e.ellipsisColor || r.value.iconColor,
|
|
106
106
|
cursor: "pointer"
|
|
107
107
|
})
|
|
108
108
|
}, {
|
|
109
|
-
component:
|
|
109
|
+
component: v(() => o[0] || (o[0] = [
|
|
110
110
|
t("svg", {
|
|
111
111
|
xmlns: "http://www.w3.org/2000/svg",
|
|
112
112
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
@@ -162,11 +162,11 @@ const we = /* @__PURE__ */ G({
|
|
|
162
162
|
], -1)
|
|
163
163
|
])),
|
|
164
164
|
_: 1
|
|
165
|
-
}, 8, ["style"])) :
|
|
165
|
+
}, 8, ["style"])) : c.value && r.value.symbol === "text" ? (a(), _("span", {
|
|
166
166
|
key: 1,
|
|
167
|
-
class: k(
|
|
167
|
+
class: k(p(d)("ellipsis-text")),
|
|
168
168
|
style: { cursor: "pointer" }
|
|
169
|
-
},
|
|
169
|
+
}, b(r.value.text), 3)) : G("", !0)
|
|
170
170
|
], 6)
|
|
171
171
|
]),
|
|
172
172
|
_: 3
|
|
@@ -174,5 +174,5 @@ const we = /* @__PURE__ */ G({
|
|
|
174
174
|
}
|
|
175
175
|
});
|
|
176
176
|
export {
|
|
177
|
-
|
|
177
|
+
xe as default
|
|
178
178
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as S, computed as n, createElementBlock as $, openBlock as b, normalizeClass as i, normalizeStyle as w, createElementVNode as B, toDisplayString as _ } from "vue";
|
|
2
2
|
import "../config-provider/index.mjs";
|
|
3
3
|
import z from "./style/index.mjs";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const k = ["title"], G = /* @__PURE__ */ $({
|
|
4
|
+
import { useNamespace as I } from "../config-provider/hooks/use-namespace.mjs";
|
|
5
|
+
const v = ["title"], A = /* @__PURE__ */ S({
|
|
7
6
|
name: "ApTag",
|
|
8
7
|
__name: "ap-tag",
|
|
9
8
|
props: {
|
|
@@ -15,37 +14,37 @@ const k = ["title"], G = /* @__PURE__ */ $({
|
|
|
15
14
|
fixedWidth: { type: Boolean, default: !1 }
|
|
16
15
|
},
|
|
17
16
|
setup(o) {
|
|
18
|
-
const e = o,
|
|
17
|
+
const e = o, { b: a, bm: r } = I("tag"), l = z("tag");
|
|
19
18
|
function s(t, p) {
|
|
20
19
|
t.length === 4 && (t = `#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`);
|
|
21
|
-
const
|
|
22
|
-
return `#${
|
|
20
|
+
const m = parseInt(t.slice(1, 3), 16), f = parseInt(t.slice(3, 5), 16), g = parseInt(t.slice(5, 7), 16), y = Math.round(p * 255).toString(16).padStart(2, "0");
|
|
21
|
+
return `#${m.toString(16).padStart(2, "0")}${f.toString(16).padStart(2, "0")}${g.toString(16).padStart(2, "0")}${y}`;
|
|
23
22
|
}
|
|
24
|
-
const
|
|
23
|
+
const c = n(() => ({
|
|
25
24
|
"--tag-main-color": e.color,
|
|
26
25
|
"--tag-main-color-opacity": s(e.color, 0.06),
|
|
27
26
|
"--tag-main-color-background": s(e.color, 0.15)
|
|
28
|
-
})),
|
|
27
|
+
})), d = n(() => [
|
|
29
28
|
a(),
|
|
30
29
|
a("wrapper"),
|
|
31
30
|
a(`wrapper-${e.type}`),
|
|
32
31
|
r("wrapper", e.size),
|
|
33
|
-
|
|
34
|
-
].filter(Boolean)),
|
|
32
|
+
l.value
|
|
33
|
+
].filter(Boolean)), u = n(() => {
|
|
35
34
|
const t = [a("inner-wrapper"), r("inner-wrapper", e.size)];
|
|
36
|
-
return e.disabled &&
|
|
35
|
+
return e.disabled && t.push(r("inner-wrapper", "disabled")), t;
|
|
37
36
|
});
|
|
38
|
-
return (t, p) => (
|
|
39
|
-
style:
|
|
37
|
+
return (t, p) => (b(), $("span", {
|
|
38
|
+
style: w(c.value),
|
|
40
39
|
title: t.text,
|
|
41
|
-
class: i(
|
|
40
|
+
class: i(d.value)
|
|
42
41
|
}, [
|
|
43
|
-
|
|
44
|
-
class: i(
|
|
45
|
-
},
|
|
46
|
-
], 14,
|
|
42
|
+
B("span", {
|
|
43
|
+
class: i(u.value)
|
|
44
|
+
}, _(t.text), 3)
|
|
45
|
+
], 14, v));
|
|
47
46
|
}
|
|
48
47
|
});
|
|
49
48
|
export {
|
|
50
|
-
|
|
49
|
+
A as default
|
|
51
50
|
};
|
|
@@ -9,14 +9,8 @@ const n = (e) => {
|
|
|
9
9
|
whiteSpace: "nowrap",
|
|
10
10
|
alignItems: "center",
|
|
11
11
|
[`${o}-ellipsis-text`]: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
color: "#333"
|
|
15
|
-
},
|
|
16
|
-
"&--aplus": {
|
|
17
|
-
fontSize: e.fontSize,
|
|
18
|
-
color: "#182948"
|
|
19
|
-
}
|
|
12
|
+
fontSize: e.fontSize,
|
|
13
|
+
color: e.textColor1
|
|
20
14
|
}
|
|
21
15
|
}
|
|
22
16
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { genComponentStyleHook as l } from "../../utils/cssinjs/index.mjs";
|
|
2
2
|
const a = (o) => {
|
|
3
|
-
const { componentCls:
|
|
3
|
+
const { componentCls: e } = o, r = `${e}-wrapper`, i = `${e}-inner-wrapper`;
|
|
4
4
|
return {
|
|
5
|
-
[
|
|
5
|
+
[r]: {
|
|
6
6
|
textWrap: "nowrap",
|
|
7
7
|
whiteSpace: "nowrap",
|
|
8
8
|
display: "inline-flex",
|
|
9
9
|
maxWidth: "100%",
|
|
10
|
-
[
|
|
10
|
+
[i]: {
|
|
11
11
|
borderRadius: o.borderRadius,
|
|
12
12
|
boxSizing: "border-box",
|
|
13
13
|
overflow: "hidden",
|
|
@@ -31,43 +31,34 @@ const a = (o) => {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
|
-
[`${
|
|
34
|
+
[`${r}-purely`]: {
|
|
35
35
|
"& > *": {
|
|
36
36
|
backgroundColor: "var(--tag-main-color-background)",
|
|
37
|
-
color: o.
|
|
38
|
-
},
|
|
39
|
-
[`${r}--disabled`]: {
|
|
40
|
-
backgroundColor: "rgba(#8896b0,0.15)"
|
|
37
|
+
color: o.textColor1
|
|
41
38
|
},
|
|
42
|
-
[`${
|
|
43
|
-
backgroundColor:
|
|
39
|
+
[`${i}--disabled`]: {
|
|
40
|
+
backgroundColor: `color-mix(in srgb, ${o.textColor3} 15%, white)`
|
|
44
41
|
}
|
|
45
42
|
},
|
|
46
|
-
[`${
|
|
43
|
+
[`${r}-border`]: {
|
|
47
44
|
"& > *": {
|
|
48
45
|
outline: "1px solid var(--tag-main-color)",
|
|
49
46
|
outlineOffset: "-1px",
|
|
50
47
|
backgroundColor: "var(--tag-main-color-opacity)",
|
|
51
48
|
color: "var(--tag-main-color)"
|
|
52
49
|
},
|
|
53
|
-
[`${
|
|
54
|
-
outline:
|
|
50
|
+
[`${i}--disabled`]: {
|
|
51
|
+
outline: `1px solid ${o.borderColorBase}`,
|
|
55
52
|
outlineOffset: "-1px",
|
|
56
|
-
backgroundColor:
|
|
57
|
-
color:
|
|
58
|
-
},
|
|
59
|
-
[`${r}--disabled-admin`]: {
|
|
60
|
-
outline: "1px solid #d9d9d9",
|
|
61
|
-
outlineOffset: "-1px",
|
|
62
|
-
backgroundColor: "#9999990f",
|
|
63
|
-
color: "#999"
|
|
53
|
+
backgroundColor: `color-mix(in srgb, ${o.textColor2} 6%, white)`,
|
|
54
|
+
color: o.textColor2
|
|
64
55
|
}
|
|
65
56
|
}
|
|
66
57
|
};
|
|
67
|
-
},
|
|
58
|
+
}, n = l("ApTag", (o) => [
|
|
68
59
|
a(o)
|
|
69
60
|
]);
|
|
70
61
|
export {
|
|
71
|
-
|
|
62
|
+
n as default,
|
|
72
63
|
a as genApTagStyle
|
|
73
64
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as h, ref as m, computed as c, provide as t, createElementBlock as N, openBlock as d, normalizeClass as U, unref as a, createBlock as O, resolveDynamicComponent as R, mergeProps as z, createSlots as j, renderList as A, withCtx as $, renderSlot as k, normalizeProps as B, guardReactiveProps as T } from "vue";
|
|
2
2
|
import "../config-provider/index.mjs";
|
|
3
3
|
import "./components/SingleFile.vue.mjs";
|
|
4
4
|
import "./components/MultipleFile.vue.mjs";
|
|
5
5
|
import "./components/Picture.vue.mjs";
|
|
6
|
-
import { injectLocaleToAccept as
|
|
7
|
-
import { injectLocaleToOss as
|
|
8
|
-
import { Form as
|
|
9
|
-
import
|
|
10
|
-
import { useLocale as
|
|
11
|
-
import { useNamespace as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { useGlobalConfig as
|
|
16
|
-
const
|
|
6
|
+
import { injectLocaleToAccept as w } from "./utils/accept.mjs";
|
|
7
|
+
import { injectLocaleToOss as I } from "./hooks/useOss.mjs";
|
|
8
|
+
import { Form as L } from "@aplus-frontend/antdv";
|
|
9
|
+
import q from "./style/index.mjs";
|
|
10
|
+
import { useLocale as P } from "../config-provider/hooks/use-locale.mjs";
|
|
11
|
+
import { useNamespace as V } from "../config-provider/hooks/use-namespace.mjs";
|
|
12
|
+
import D from "./components/Picture.vue2.mjs";
|
|
13
|
+
import G from "./components/MultipleFile.vue2.mjs";
|
|
14
|
+
import H from "./components/SingleFile.vue2.mjs";
|
|
15
|
+
import { useGlobalConfig as J } from "../config-provider/hooks/use-global-config.mjs";
|
|
16
|
+
const K = ["id"], me = /* @__PURE__ */ h({
|
|
17
17
|
name: "AplusFileUpload",
|
|
18
18
|
__name: "apUpload",
|
|
19
19
|
props: {
|
|
@@ -91,22 +91,22 @@ const Q = ["id"], ce = /* @__PURE__ */ U({
|
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
emits: ["update:value"],
|
|
94
|
-
setup(
|
|
95
|
-
const { t: n, lang:
|
|
96
|
-
|
|
97
|
-
const { b:
|
|
98
|
-
singleFile:
|
|
99
|
-
multipleFile:
|
|
100
|
-
picture:
|
|
101
|
-
}, i =
|
|
94
|
+
setup(f, { expose: g, emit: v }) {
|
|
95
|
+
const { t: n, lang: y } = P();
|
|
96
|
+
w(n), I(n, y);
|
|
97
|
+
const { b: C } = V("ap-upload"), S = q("ap-upload"), s = m(null), e = f, x = v, b = {
|
|
98
|
+
singleFile: H,
|
|
99
|
+
multipleFile: G,
|
|
100
|
+
picture: D
|
|
101
|
+
}, i = L.useInjectFormItemContext(), E = c({
|
|
102
102
|
get() {
|
|
103
103
|
return e.value;
|
|
104
104
|
},
|
|
105
105
|
set(o) {
|
|
106
|
-
|
|
106
|
+
x("update:value", o), i?.onFieldChange(), e.onChange?.(o);
|
|
107
107
|
}
|
|
108
|
-
}),
|
|
109
|
-
t("
|
|
108
|
+
}), r = J("apUpload");
|
|
109
|
+
t("value", E), t("dirName", e.dirName ?? r.value?.dirName), t(
|
|
110
110
|
"needName",
|
|
111
111
|
e.needName ?? r.value?.needName ?? !1
|
|
112
112
|
), t("accept", e.accept ?? r.value?.accept ?? ""), t("maxSize", e.maxSize), t("title", e.title), t("subTitle", e.subTitle), t("maxCount", e.maxCount), t("beforeUpload", e.beforeUpload), t("customRequest", e.customRequest), t(
|
|
@@ -115,34 +115,34 @@ const Q = ["id"], ce = /* @__PURE__ */ U({
|
|
|
115
115
|
), t("maxSizeErrorMsg", e.maxSizeErrorMsg), t("maxCountErrorMsg", e.maxCountErrorMsg), t("acceptErrorMsg", e.acceptErrorMsg), t("onRemove", e.onRemove), t("showUploadErrorMsg", e.showUploadErrorMsg);
|
|
116
116
|
const F = c(() => l.value === 0), l = m(0);
|
|
117
117
|
t("uploadingCount", l);
|
|
118
|
-
function
|
|
119
|
-
|
|
118
|
+
function M() {
|
|
119
|
+
p(void 0);
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function p(o) {
|
|
122
122
|
s?.value?.setValue?.(o);
|
|
123
123
|
}
|
|
124
|
-
return
|
|
124
|
+
return g({
|
|
125
125
|
done: F,
|
|
126
|
-
clear:
|
|
127
|
-
setValue:
|
|
128
|
-
}), (o,
|
|
126
|
+
clear: M,
|
|
127
|
+
setValue: p
|
|
128
|
+
}), (o, Q) => (d(), N("div", {
|
|
129
129
|
id: a(i)?.id.value,
|
|
130
|
-
class:
|
|
130
|
+
class: U([a(C)(), a(S)])
|
|
131
131
|
}, [
|
|
132
|
-
(d(),
|
|
132
|
+
(d(), O(R(b[e.type]), z(o.$attrs, {
|
|
133
133
|
ref_key: "uploadRef",
|
|
134
134
|
ref: s
|
|
135
|
-
}),
|
|
136
|
-
|
|
137
|
-
name:
|
|
138
|
-
fn:
|
|
139
|
-
|
|
135
|
+
}), j({ _: 2 }, [
|
|
136
|
+
A(Object.keys(o.$slots), (u) => ({
|
|
137
|
+
name: u,
|
|
138
|
+
fn: $((_) => [
|
|
139
|
+
k(o.$slots, u, B(T(_ || {})))
|
|
140
140
|
])
|
|
141
141
|
}))
|
|
142
142
|
]), 1040))
|
|
143
|
-
], 10,
|
|
143
|
+
], 10, K));
|
|
144
144
|
}
|
|
145
145
|
});
|
|
146
146
|
export {
|
|
147
|
-
|
|
147
|
+
me as default
|
|
148
148
|
};
|