@aplus-frontend/ui 7.0.0-beta.1 → 7.0.0-beta.3
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/index.mjs +216 -218
- package/es/src/ag-grid/editable/form-item.vue.mjs +68 -63
- package/es/src/ag-grid/editable/index.vue.mjs +66 -61
- package/es/src/ag-grid/editable/interface.d.ts +3 -1
- package/es/src/ag-grid/hooks/use-editable-form-item-api.mjs +65 -63
- package/es/src/ag-grid/style/index.d.ts +28 -1
- package/es/src/ag-grid/style/index.mjs +56 -43
- package/es/src/ag-grid/theme.mjs +12 -11
- package/es/src/ap-action/item/index.vue2.mjs +14 -12
- package/es/src/ap-action/style/dropdown-item.mjs +4 -4
- package/es/src/ap-action/style/index.d.ts +5 -2
- package/es/src/ap-action/style/index.mjs +29 -23
- package/es/src/ap-button/ap-button.vue.mjs +45 -49
- package/es/src/ap-button/style/index.mjs +5 -4
- package/es/src/ap-download/hooks/useStyle.mjs +9 -9
- package/es/src/ap-form/style/item.d.ts +1 -2
- package/es/src/ap-form/style/item.mjs +12 -16
- package/es/src/ap-form/style/modal-form.d.ts +2 -1
- package/es/src/ap-form/style/modal-form.mjs +26 -13
- package/es/src/ap-form/style/search-form-sorter.d.ts +2 -1
- package/es/src/ap-form/style/search-form-sorter.mjs +20 -13
- package/es/src/ap-form/style/token.d.ts +25 -1
- package/es/src/ap-grid/hooks/use-table-style.mjs +1 -1
- package/es/src/ap-grid/index.vue.mjs +2 -2
- package/es/src/ap-grid/style/index.d.ts +4 -1
- package/es/src/ap-grid/style/index.mjs +10 -7
- package/es/src/ap-table/ap-table.vue2.mjs +2 -2
- package/es/src/ap-table/utils.mjs +14 -11
- package/es/src/ap-tag/ap-tag.vue.mjs +7 -6
- package/es/src/business/ap-appendix/style/index.d.ts +3 -2
- package/es/src/business/ap-appendix/style/index.mjs +19 -16
- package/es/src/business/ap-appendix/style/token.d.ts +4 -0
- package/es/src/business/ap-appendix/style/token.mjs +6 -0
- package/es/src/business/ap-attachment/ApAttachment.mjs +73 -73
- package/es/src/business/ap-attachment/style/index.mjs +1 -0
- package/es/src/business/ap-batch-action/style/index.mjs +3 -3
- package/es/src/business/ap-radio-group/style/index.mjs +3 -3
- package/es/src/business/ap-view/style/index.mjs +18 -21
- package/es/src/business/batch-input-group/style/index.d.ts +3 -0
- package/es/src/business/batch-input-group/style/index.mjs +9 -5
- package/es/src/check-card/style/index.mjs +37 -31
- package/es/src/config-provider/config-provider.d.ts +1 -2
- package/es/src/config-provider/hooks/use-global-config.d.ts +1 -2
- package/es/src/config-provider/hooks/use-global-config.mjs +42 -33
- package/es/src/config-provider/hooks/use-token.d.ts +7 -2
- package/es/src/config-provider/hooks/use-token.mjs +6 -3
- package/es/src/config-provider/index.d.ts +1 -2
- package/es/src/design-token/constants.d.ts +1 -6
- package/es/src/design-token/constants.mjs +2 -100
- package/es/src/design-token/index.d.ts +1 -1
- package/es/src/design-token/index.mjs +5 -6
- package/es/src/design-token/interface.d.ts +9 -1
- package/es/src/design-token/interface.mjs +1 -0
- package/es/src/full-screen/index.vue.mjs +31 -30
- package/es/src/index.mjs +196 -198
- package/es/src/mask/style/index.mjs +2 -2
- package/es/src/scroll-bar/style/index.mjs +17 -17
- package/es/src/splitter/style/index.d.ts +9 -1
- package/es/src/splitter/style/index.mjs +1 -2
- package/es/src/text/style/index.d.ts +4 -1
- package/es/src/text/style/index.mjs +22 -18
- package/es/src/utils/cssinjs/index.d.ts +1 -5
- package/es/src/utils/cssinjs/index.mjs +49 -39
- package/es/src/utils/cssinjs/instance.mjs +7 -7
- package/es/src/utils/cssinjs/plugin-append-cssvar.d.ts +6 -0
- package/es/src/utils/cssinjs/plugin-append-cssvar.mjs +6 -0
- package/es/src/utils/cssinjs/utils.d.ts +6 -0
- package/es/src/utils/cssinjs/utils.mjs +15 -0
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ag-grid/editable/index.vue.js +1 -1
- package/lib/src/ag-grid/editable/interface.d.ts +3 -1
- package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -1
- package/lib/src/ag-grid/style/index.d.ts +28 -1
- package/lib/src/ag-grid/style/index.js +1 -1
- package/lib/src/ag-grid/theme.js +1 -1
- package/lib/src/ap-action/item/index.vue2.js +1 -1
- package/lib/src/ap-action/style/dropdown-item.js +1 -1
- package/lib/src/ap-action/style/index.d.ts +5 -2
- package/lib/src/ap-action/style/index.js +1 -1
- package/lib/src/ap-button/ap-button.vue.js +1 -1
- package/lib/src/ap-button/style/index.js +1 -1
- package/lib/src/ap-download/hooks/useStyle.js +1 -1
- package/lib/src/ap-form/style/item.d.ts +1 -2
- package/lib/src/ap-form/style/item.js +1 -1
- package/lib/src/ap-form/style/modal-form.d.ts +2 -1
- package/lib/src/ap-form/style/modal-form.js +1 -1
- package/lib/src/ap-form/style/search-form-sorter.d.ts +2 -1
- package/lib/src/ap-form/style/search-form-sorter.js +1 -1
- package/lib/src/ap-form/style/token.d.ts +25 -1
- package/lib/src/ap-grid/hooks/use-table-style.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/style/index.d.ts +4 -1
- package/lib/src/ap-grid/style/index.js +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/ap-tag/ap-tag.vue.js +1 -1
- package/lib/src/business/ap-appendix/style/index.d.ts +3 -2
- package/lib/src/business/ap-appendix/style/index.js +1 -1
- package/lib/src/business/ap-appendix/style/token.d.ts +4 -0
- package/lib/src/business/ap-appendix/style/token.js +1 -0
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-attachment/style/index.js +1 -1
- package/lib/src/business/ap-batch-action/style/index.js +1 -1
- package/lib/src/business/ap-radio-group/style/index.js +1 -1
- package/lib/src/business/ap-view/style/index.js +1 -1
- package/lib/src/business/batch-input-group/style/index.d.ts +3 -0
- 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/config-provider/config-provider.d.ts +1 -2
- package/lib/src/config-provider/hooks/use-global-config.d.ts +1 -2
- package/lib/src/config-provider/hooks/use-global-config.js +1 -1
- package/lib/src/config-provider/hooks/use-token.d.ts +7 -2
- package/lib/src/config-provider/hooks/use-token.js +1 -1
- package/lib/src/config-provider/index.d.ts +1 -2
- package/lib/src/design-token/constants.d.ts +1 -6
- package/lib/src/design-token/constants.js +1 -1
- package/lib/src/design-token/index.d.ts +1 -1
- package/lib/src/design-token/index.js +1 -1
- package/lib/src/design-token/interface.d.ts +9 -1
- package/lib/src/design-token/interface.js +1 -0
- package/lib/src/full-screen/index.vue.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/mask/style/index.js +2 -2
- package/lib/src/scroll-bar/style/index.js +1 -1
- package/lib/src/splitter/style/index.d.ts +9 -1
- package/lib/src/splitter/style/index.js +1 -1
- package/lib/src/text/style/index.d.ts +4 -1
- package/lib/src/text/style/index.js +1 -1
- package/lib/src/utils/cssinjs/index.d.ts +1 -5
- package/lib/src/utils/cssinjs/index.js +1 -1
- package/lib/src/utils/cssinjs/instance.js +1 -1
- package/lib/src/utils/cssinjs/plugin-append-cssvar.d.ts +6 -0
- package/lib/src/utils/cssinjs/plugin-append-cssvar.js +1 -0
- package/lib/src/utils/cssinjs/utils.d.ts +6 -0
- package/lib/src/utils/cssinjs/utils.js +1 -0
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
- package/es/src/utils/cssinjs/plugin-specificity.mjs +0 -13
- package/lib/src/utils/cssinjs/plugin-specificity.js +0 -1
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Tooltip as
|
|
1
|
+
import { defineComponent as U, ref as F, useSlots as W, computed as n, cloneVNode as _, toRaw as v, unref as j, createVNode as t, createTextVNode as K } from "vue";
|
|
2
|
+
import { Tooltip as B, Popover as G } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../config-provider/index.mjs";
|
|
4
|
-
import { ApAttachmentProps as
|
|
5
|
-
import { getHexWithOpacity as
|
|
6
|
-
import { useOssInit as
|
|
7
|
-
import { debounce as
|
|
8
|
-
import { LoadingOutlined as
|
|
9
|
-
import { warning as
|
|
10
|
-
import
|
|
11
|
-
import { useNamespace as
|
|
12
|
-
import { useGlobalConfig as
|
|
13
|
-
import { useLocale as
|
|
14
|
-
const
|
|
4
|
+
import { ApAttachmentProps as H } from "./constans.mjs";
|
|
5
|
+
import { getHexWithOpacity as R, getFileInfo as b } from "../../ap-download/utils/getFileInfo.mjs";
|
|
6
|
+
import { useOssInit as q } from "../../ap-download/hooks/index.mjs";
|
|
7
|
+
import { debounce as D, isArray as E } from "lodash-unified";
|
|
8
|
+
import { LoadingOutlined as h } from "@ant-design/icons-vue";
|
|
9
|
+
import { warning as J } from "../../utils/warning.mjs";
|
|
10
|
+
import Q from "./style/index.mjs";
|
|
11
|
+
import { useNamespace as X } from "../../config-provider/hooks/use-namespace.mjs";
|
|
12
|
+
import { useGlobalConfig as g } from "../../config-provider/hooks/use-global-config.mjs";
|
|
13
|
+
import { useLocale as Y } from "../../config-provider/hooks/use-locale.mjs";
|
|
14
|
+
const me = /* @__PURE__ */ U({
|
|
15
15
|
name: "ApAttachment",
|
|
16
|
-
props:
|
|
16
|
+
props: H(),
|
|
17
17
|
setup(e) {
|
|
18
18
|
const {
|
|
19
|
-
b:
|
|
20
|
-
e:
|
|
21
|
-
} =
|
|
22
|
-
lang:
|
|
23
|
-
t:
|
|
24
|
-
} =
|
|
25
|
-
"--download-main-color":
|
|
26
|
-
"--download-main-color-opacity":
|
|
27
|
-
})),
|
|
28
|
-
const
|
|
29
|
-
return
|
|
19
|
+
b: x,
|
|
20
|
+
e: l
|
|
21
|
+
} = X("ap-attachment"), p = Q("ap-attachment"), O = g("uiMode"), L = g("apUpload"), N = g("downloadCenterTriggerConfig"), {
|
|
22
|
+
lang: T,
|
|
23
|
+
t: r
|
|
24
|
+
} = Y(), c = F(!1), s = F(""), m = W(), P = n(() => T.value === "zh-cn" ? "zh_CN" : "en_US"), i = n(() => e.needName ?? L?.value?.needName), d = n(() => e.attachmentList.length === 1), y = n(() => i.value ? e.attachmentList.length > 0 && i.value && i.value?.nameKey ? e.attachmentList[0][i.value.nameKey] : "" : e.attachmentList.length > 0 ? e.attachmentList[0].fileName : ""), k = n(() => d.value ? y.value : r("ap.apAttachment.downloadall")), A = n(() => e.color ? e.color : O.value === "aplus" ? "#0070FF" : "#1890FF"), C = n(() => ({
|
|
25
|
+
"--download-main-color": A.value,
|
|
26
|
+
"--download-main-color-opacity": R(A.value, 0.6)
|
|
27
|
+
})), I = n(() => e.getOssAccess || L.value?.getOssAccess), S = n(() => {
|
|
28
|
+
const a = m.default ? m.default()[0] : null;
|
|
29
|
+
return a ? _(a, {
|
|
30
30
|
style: {
|
|
31
31
|
"font-size": "16px"
|
|
32
32
|
}
|
|
33
33
|
}) : null;
|
|
34
|
-
}),
|
|
34
|
+
}), f = D(async (a, u) => {
|
|
35
35
|
if (!e.disabled) {
|
|
36
|
-
|
|
36
|
+
c.value = !0, u && (s.value = u);
|
|
37
37
|
try {
|
|
38
|
-
const
|
|
38
|
+
const o = E(v(a)) ? v(a) : [v(a)];
|
|
39
39
|
if (N.value?.trigger) {
|
|
40
|
-
const
|
|
41
|
-
objectName:
|
|
42
|
-
fileName:
|
|
40
|
+
const M = b(i.value, o).map((w) => ({
|
|
41
|
+
objectName: w.path,
|
|
42
|
+
fileName: w.fileName
|
|
43
43
|
}));
|
|
44
|
-
N.value?.trigger(
|
|
44
|
+
N.value?.trigger(M);
|
|
45
45
|
} else
|
|
46
|
-
await (await
|
|
47
|
-
} catch (
|
|
48
|
-
|
|
46
|
+
await (await q(I.value, j(P))).downloadFile(b(i.value, o));
|
|
47
|
+
} catch (o) {
|
|
48
|
+
J(!1, o);
|
|
49
49
|
} finally {
|
|
50
|
-
|
|
50
|
+
c.value = !1, s.value = "";
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
}, 500),
|
|
54
|
-
class: [
|
|
55
|
-
style:
|
|
56
|
-
}, [
|
|
57
|
-
key:
|
|
58
|
-
class: [
|
|
59
|
-
onClick: () =>
|
|
60
|
-
}, [
|
|
61
|
-
class: [
|
|
62
|
-
}, [t(
|
|
53
|
+
}, 500), V = (a) => a && a.length > 0 ? t("ul", {
|
|
54
|
+
class: [l("file-list"), p.value],
|
|
55
|
+
style: C.value
|
|
56
|
+
}, [a.map((u, o) => t("li", {
|
|
57
|
+
key: o,
|
|
58
|
+
class: [l("file-item")],
|
|
59
|
+
onClick: () => f(u, o + 1)
|
|
60
|
+
}, [c.value && s.value === o + 1 ? t("span", {
|
|
61
|
+
class: [l("spin")]
|
|
62
|
+
}, [t(h, {
|
|
63
63
|
spin: !0
|
|
64
|
-
}, null)]) : null,
|
|
65
|
-
class: [
|
|
66
|
-
onClick: () =>
|
|
67
|
-
}, [
|
|
68
|
-
class: [
|
|
69
|
-
}, [t(
|
|
64
|
+
}, null)]) : null, u.fileName])), t("li", {
|
|
65
|
+
class: [l("download-all")],
|
|
66
|
+
onClick: () => f(e.attachmentList, "all")
|
|
67
|
+
}, [c.value && s.value === "all" ? t("span", {
|
|
68
|
+
class: [l("spin")]
|
|
69
|
+
}, [t(h, {
|
|
70
70
|
spin: !0
|
|
71
|
-
}, null)]) : null,
|
|
71
|
+
}, null)]) : null, r("ap.apAttachment.downloadall")])]) : null;
|
|
72
72
|
return () => e.attachmentList?.length > 0 && t("div", {
|
|
73
|
-
class: [
|
|
74
|
-
style: [
|
|
75
|
-
}, [t(
|
|
76
|
-
title:
|
|
73
|
+
class: [x(), p.value],
|
|
74
|
+
style: [C.value]
|
|
75
|
+
}, [t(B, {
|
|
76
|
+
title: k.value,
|
|
77
77
|
placement: e.textToolTipPlacement,
|
|
78
78
|
color: e.toolTipBgColor
|
|
79
79
|
}, {
|
|
80
80
|
default: () => [t("div", {
|
|
81
|
-
class: [
|
|
82
|
-
onClick: () => d
|
|
83
|
-
}, [
|
|
84
|
-
class: [
|
|
85
|
-
}, [t(
|
|
81
|
+
class: [l("content")],
|
|
82
|
+
onClick: () => f(d.value ? e.attachmentList[0] : e.attachmentList, "global")
|
|
83
|
+
}, [c.value && s.value === "global" ? t("div", {
|
|
84
|
+
class: [l("spin")]
|
|
85
|
+
}, [t(h, {
|
|
86
86
|
spin: !0
|
|
87
|
-
}, null)]) : null,
|
|
88
|
-
class: [
|
|
89
|
-
}, [
|
|
90
|
-
class: [
|
|
87
|
+
}, null)]) : null, m.default ? t("div", {
|
|
88
|
+
class: [l("text-render")]
|
|
89
|
+
}, [S.value, K(" ")]) : null, t("div", {
|
|
90
|
+
class: [l("text-inner")],
|
|
91
91
|
style: {
|
|
92
92
|
"max-width": e.maxWidth ? e.maxWidth + "px" : "auto"
|
|
93
93
|
}
|
|
94
|
-
}, [
|
|
95
|
-
}), t(
|
|
96
|
-
content:
|
|
94
|
+
}, [y.value])])]
|
|
95
|
+
}), t(G, {
|
|
96
|
+
content: V(e.attachmentList),
|
|
97
97
|
placement: e.fileMorePopoverPlacement,
|
|
98
98
|
color: "#fff"
|
|
99
99
|
}, {
|
|
100
|
-
default: () => [!
|
|
101
|
-
class: [
|
|
102
|
-
}, [
|
|
100
|
+
default: () => [!d.value && t("div", {
|
|
101
|
+
class: [l("more")]
|
|
102
|
+
}, [r("ap.apAttachment.more")])]
|
|
103
103
|
})]);
|
|
104
104
|
}
|
|
105
105
|
});
|
|
106
106
|
export {
|
|
107
|
-
|
|
107
|
+
me as default
|
|
108
108
|
};
|
|
@@ -8,7 +8,7 @@ const n = (t) => {
|
|
|
8
8
|
width: "100%",
|
|
9
9
|
paddingBottom: "8px",
|
|
10
10
|
marginBottom: "8px",
|
|
11
|
-
borderBottom:
|
|
11
|
+
borderBottom: `1px solid ${t.colorBg1}`
|
|
12
12
|
},
|
|
13
13
|
[`${e}-body`]: {
|
|
14
14
|
width: "100%",
|
|
@@ -23,9 +23,9 @@ const n = (t) => {
|
|
|
23
23
|
display: "flex",
|
|
24
24
|
alignItems: "center",
|
|
25
25
|
fontSize: t.fontSize,
|
|
26
|
-
color:
|
|
26
|
+
color: t.textColor3,
|
|
27
27
|
span: {
|
|
28
|
-
color:
|
|
28
|
+
color: t.colorPrimary,
|
|
29
29
|
fontWeight: "bold",
|
|
30
30
|
minWidth: "10px",
|
|
31
31
|
textAlign: "center",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { genComponentStyleHook as a } from "../../../utils/cssinjs/index.mjs";
|
|
2
|
-
const
|
|
2
|
+
const i = (o) => {
|
|
3
3
|
const { componentCls: r } = o;
|
|
4
4
|
return {
|
|
5
5
|
[r]: {
|
|
@@ -24,8 +24,8 @@ const e = (o) => {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
}, l = a(
|
|
27
|
-
"
|
|
28
|
-
(o) => [
|
|
27
|
+
"ApRadioGroup",
|
|
28
|
+
(o) => [i(o)],
|
|
29
29
|
{
|
|
30
30
|
apRadioGroupItemActiveBgColor: "rgba(0, 112, 255, 0.12)"
|
|
31
31
|
}
|
|
@@ -1,28 +1,25 @@
|
|
|
1
1
|
import { genComponentStyleHook as n } from "../../../utils/cssinjs/index.mjs";
|
|
2
|
-
const o = (
|
|
3
|
-
const { componentCls:
|
|
2
|
+
const o = (t) => {
|
|
3
|
+
const { componentCls: e } = t;
|
|
4
4
|
return {
|
|
5
|
-
[
|
|
6
|
-
".ant-btn-default:has(&-main-content-disabled)": {
|
|
7
|
-
borderColor: "var(--ap-border-color-base) !important"
|
|
8
|
-
},
|
|
5
|
+
[e]: {
|
|
9
6
|
"& > .ant-btn": {
|
|
10
7
|
padding: 0
|
|
11
8
|
},
|
|
12
9
|
"& > .ant-dropdown-trigger": {
|
|
13
|
-
color:
|
|
10
|
+
color: t.textColor3
|
|
14
11
|
},
|
|
15
|
-
[`${
|
|
12
|
+
[`${e}-main-content`]: {
|
|
16
13
|
padding: "4px 8px",
|
|
17
14
|
display: "flex",
|
|
18
15
|
alignItems: "center",
|
|
19
16
|
justifyContent: "center",
|
|
20
17
|
"&-disabled": {
|
|
21
|
-
color:
|
|
18
|
+
color: t.textColor4,
|
|
22
19
|
cursor: "not-allowed"
|
|
23
20
|
}
|
|
24
21
|
},
|
|
25
|
-
[`${
|
|
22
|
+
[`${e}-icon`]: {
|
|
26
23
|
width: "100%",
|
|
27
24
|
height: "100%",
|
|
28
25
|
fontSize: "14px",
|
|
@@ -31,7 +28,7 @@ const o = (e) => {
|
|
|
31
28
|
alignItems: "center"
|
|
32
29
|
}
|
|
33
30
|
},
|
|
34
|
-
[`${
|
|
31
|
+
[`${e}-main-content-popover`]: {
|
|
35
32
|
width: "340px",
|
|
36
33
|
"&-title-content": {
|
|
37
34
|
display: "flex",
|
|
@@ -55,7 +52,7 @@ const o = (e) => {
|
|
|
55
52
|
}
|
|
56
53
|
}
|
|
57
54
|
},
|
|
58
|
-
[`${
|
|
55
|
+
[`${e}-overlay`]: {
|
|
59
56
|
".ant-dropdown-menu": {
|
|
60
57
|
padding: "8px",
|
|
61
58
|
"&-item": {
|
|
@@ -65,7 +62,7 @@ const o = (e) => {
|
|
|
65
62
|
}
|
|
66
63
|
}
|
|
67
64
|
},
|
|
68
|
-
[`${
|
|
65
|
+
[`${e}-menu-list-content`]: {
|
|
69
66
|
width: "250px",
|
|
70
67
|
display: "flex",
|
|
71
68
|
padding: "6px 8px",
|
|
@@ -94,13 +91,13 @@ const o = (e) => {
|
|
|
94
91
|
fontSize: "12px",
|
|
95
92
|
display: "flex",
|
|
96
93
|
alignItems: "center",
|
|
97
|
-
color:
|
|
94
|
+
color: t.colorPrimary
|
|
98
95
|
},
|
|
99
96
|
"&-delete": {
|
|
100
97
|
cursor: "pointer",
|
|
101
98
|
display: "flex",
|
|
102
99
|
alignItems: "center",
|
|
103
|
-
color:
|
|
100
|
+
color: t.textColor3,
|
|
104
101
|
svg: {
|
|
105
102
|
outline: "none",
|
|
106
103
|
boxShadow: "none"
|
|
@@ -123,23 +120,23 @@ const o = (e) => {
|
|
|
123
120
|
cursor: "default"
|
|
124
121
|
},
|
|
125
122
|
"&:hover": {
|
|
126
|
-
background:
|
|
123
|
+
background: t.colorBg1,
|
|
127
124
|
".menu-list-content-action": {
|
|
128
125
|
display: "block"
|
|
129
126
|
}
|
|
130
127
|
}
|
|
131
128
|
},
|
|
132
|
-
[`${
|
|
129
|
+
[`${e}-menu-list-content-active`]: {
|
|
133
130
|
".menu-list-content-name": {
|
|
134
|
-
color:
|
|
131
|
+
color: t.colorPrimary
|
|
135
132
|
}
|
|
136
133
|
}
|
|
137
134
|
}
|
|
138
135
|
};
|
|
139
|
-
},
|
|
140
|
-
o(
|
|
136
|
+
}, r = n("ApView", (t) => [
|
|
137
|
+
o(t)
|
|
141
138
|
]);
|
|
142
139
|
export {
|
|
143
|
-
|
|
140
|
+
r as default,
|
|
144
141
|
o as genProCardStyle
|
|
145
142
|
};
|
|
@@ -17,9 +17,9 @@ const a = (o) => {
|
|
|
17
17
|
},
|
|
18
18
|
"&--disabled": {
|
|
19
19
|
cursor: "not-allowed",
|
|
20
|
-
color:
|
|
20
|
+
color: o.batchInputGroupTriggerColorDisabled,
|
|
21
21
|
"&:hover": {
|
|
22
|
-
color:
|
|
22
|
+
color: o.batchInputGroupTriggerColorDisabled
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -45,9 +45,13 @@ const a = (o) => {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
-
}, c = i(
|
|
49
|
-
|
|
50
|
-
]
|
|
48
|
+
}, c = i(
|
|
49
|
+
"BatchInputGroup",
|
|
50
|
+
(o) => [a(o)],
|
|
51
|
+
{
|
|
52
|
+
batchInputGroupTriggerColorDisabled: "rgba(24, 41, 72, 0.25)"
|
|
53
|
+
}
|
|
54
|
+
);
|
|
51
55
|
export {
|
|
52
56
|
c as default
|
|
53
57
|
};
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import { resetComponent as
|
|
2
|
-
import { genComponentStyleHook as
|
|
1
|
+
import { resetComponent as t } from "../../style/index.mjs";
|
|
2
|
+
import { genComponentStyleHook as a } from "../../utils/cssinjs/index.mjs";
|
|
3
3
|
const c = (r) => {
|
|
4
|
-
const {
|
|
4
|
+
const {
|
|
5
|
+
componentCls: o,
|
|
6
|
+
checkCardDisabledOutlineColor: l,
|
|
7
|
+
checkCardIndicatorSize: e,
|
|
8
|
+
checkCardOutlineWidth: d,
|
|
9
|
+
checkCardIndicatorOffset: i
|
|
10
|
+
} = r;
|
|
5
11
|
return {
|
|
6
|
-
[`${
|
|
7
|
-
...
|
|
12
|
+
[`${o}`]: {
|
|
13
|
+
...t(r),
|
|
8
14
|
borderRadius: r.borderRadius,
|
|
9
15
|
position: "relative",
|
|
10
16
|
"&--disabled": {
|
|
@@ -14,7 +20,7 @@ const c = (r) => {
|
|
|
14
20
|
"&--bordered": {
|
|
15
21
|
outline: `1px solid ${r.borderColorBase}`
|
|
16
22
|
},
|
|
17
|
-
[`&:hover:not(${
|
|
23
|
+
[`&:hover:not(${o}--disabled)`]: {
|
|
18
24
|
cursor: "pointer",
|
|
19
25
|
outline: `1px solid ${r.colorPrimary}`
|
|
20
26
|
},
|
|
@@ -24,32 +30,32 @@ const c = (r) => {
|
|
|
24
30
|
width: 0,
|
|
25
31
|
height: 0,
|
|
26
32
|
opacity: 0,
|
|
27
|
-
insetBlockStart:
|
|
28
|
-
insetInlineEnd:
|
|
29
|
-
borderInlineStart:
|
|
30
|
-
borderBlockEnd:
|
|
33
|
+
insetBlockStart: i,
|
|
34
|
+
insetInlineEnd: i,
|
|
35
|
+
borderInlineStart: e,
|
|
36
|
+
borderBlockEnd: e,
|
|
31
37
|
borderRadius: r.borderRadius
|
|
32
38
|
},
|
|
33
39
|
"&--checked": {
|
|
34
|
-
outline: `${
|
|
35
|
-
[`&:hover:not(${
|
|
36
|
-
outline: `${
|
|
40
|
+
outline: `${d} solid ${r.colorPrimary}`,
|
|
41
|
+
[`&:hover:not(${o}--disabled)`]: {
|
|
42
|
+
outline: `${d} solid ${r.colorPrimary}`
|
|
37
43
|
},
|
|
38
44
|
"&::after": {
|
|
39
45
|
opacity: 1,
|
|
40
|
-
border: `${
|
|
41
|
-
borderInlineStart: `${
|
|
42
|
-
borderBlockEnd: `${
|
|
43
|
-
insetBlockStart:
|
|
44
|
-
insetInlineEnd:
|
|
46
|
+
border: `${e} solid ${r.colorPrimary}`,
|
|
47
|
+
borderInlineStart: `${e} solid transparent`,
|
|
48
|
+
borderBlockEnd: `${e} solid transparent`,
|
|
49
|
+
insetBlockStart: i,
|
|
50
|
+
insetInlineEnd: i,
|
|
45
51
|
transition: "all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)"
|
|
46
52
|
},
|
|
47
|
-
[`&${
|
|
48
|
-
outlineColor:
|
|
53
|
+
[`&${o}--disabled`]: {
|
|
54
|
+
outlineColor: l,
|
|
49
55
|
"&::after": {
|
|
50
|
-
border: `${
|
|
51
|
-
borderInlineStart: `${
|
|
52
|
-
borderBlockEnd: `${
|
|
56
|
+
border: `${e} solid ${l}`,
|
|
57
|
+
borderInlineStart: `${e} solid transparent`,
|
|
58
|
+
borderBlockEnd: `${e} solid transparent`
|
|
53
59
|
}
|
|
54
60
|
}
|
|
55
61
|
},
|
|
@@ -59,8 +65,8 @@ const c = (r) => {
|
|
|
59
65
|
"&--small": {
|
|
60
66
|
padding: `${r.spaceSM} ${r.spaceLG}`
|
|
61
67
|
},
|
|
62
|
-
[`${
|
|
63
|
-
...
|
|
68
|
+
[`${o}__title`]: {
|
|
69
|
+
...t(r),
|
|
64
70
|
marginBottom: r.spaceXS,
|
|
65
71
|
color: "#333",
|
|
66
72
|
fontWeight: "bold",
|
|
@@ -68,14 +74,14 @@ const c = (r) => {
|
|
|
68
74
|
color: r.textColor4
|
|
69
75
|
}
|
|
70
76
|
},
|
|
71
|
-
[`${
|
|
72
|
-
...
|
|
77
|
+
[`${o}__content`]: {
|
|
78
|
+
...t(r),
|
|
73
79
|
color: "#333",
|
|
74
80
|
"&--disabled": {
|
|
75
81
|
color: r.textColor4
|
|
76
82
|
}
|
|
77
83
|
},
|
|
78
|
-
[`${
|
|
84
|
+
[`${o}__checked-icon`]: {
|
|
79
85
|
position: "absolute",
|
|
80
86
|
top: 0,
|
|
81
87
|
right: 0,
|
|
@@ -83,13 +89,13 @@ const c = (r) => {
|
|
|
83
89
|
lineHeight: 1,
|
|
84
90
|
userSelect: "none",
|
|
85
91
|
"& > img": {
|
|
86
|
-
width: `calc(${
|
|
92
|
+
width: `calc(${e} - ${d})`,
|
|
87
93
|
verticalAlign: "top"
|
|
88
94
|
}
|
|
89
95
|
}
|
|
90
96
|
}
|
|
91
97
|
};
|
|
92
|
-
},
|
|
98
|
+
}, b = a(
|
|
93
99
|
"CheckCard",
|
|
94
100
|
(r) => [c(r)],
|
|
95
101
|
{
|
|
@@ -101,5 +107,5 @@ const c = (r) => {
|
|
|
101
107
|
}
|
|
102
108
|
);
|
|
103
109
|
export {
|
|
104
|
-
|
|
110
|
+
b as default
|
|
105
111
|
};
|
|
@@ -6,10 +6,9 @@ import { CSPConfig } from '@aplus-frontend/antdv/es/config-provider';
|
|
|
6
6
|
import { Locale } from '@aplus-frontend/antdv/es/locale';
|
|
7
7
|
import { ButtonSize } from '@aplus-frontend/antdv/es/button';
|
|
8
8
|
import { ThemeConfig, InputConfig, PaginationConfig, FormConfig, SelectConfig, CascaderConfig, DatePickerConfig, RangePickerConfig, TreeSelectConfig, TextAreaConfig, InputNumberConfig, MentionsConfig, TimePickerConfig, CardConfig } from '@aplus-frontend/antdv/es/config-provider/context';
|
|
9
|
-
import { ApGridRowSelection, AgGridRowSelection, ViewCacheOption } from '..';
|
|
9
|
+
import { ApGridRowSelection, AgGridRowSelection, FullToken, ViewCacheOption } from '..';
|
|
10
10
|
import { LocaleType } from '../locale';
|
|
11
11
|
import { RecursivePartial } from '../type';
|
|
12
|
-
import { FullToken } from '../design-token/interface';
|
|
13
12
|
import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField, SearchFormGlobalConfig } from './constants';
|
|
14
13
|
export declare const globalConfigCached: Ref<ConfigProviderProps>;
|
|
15
14
|
export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
@@ -7,10 +7,9 @@ import { CSPConfig } from '@aplus-frontend/antdv/es/config-provider';
|
|
|
7
7
|
import { Locale } from '@aplus-frontend/antdv/es/locale';
|
|
8
8
|
import { ButtonSize } from '@aplus-frontend/antdv/es/button';
|
|
9
9
|
import { ThemeConfig, InputConfig, PaginationConfig, FormConfig, SelectConfig, CascaderConfig, DatePickerConfig, RangePickerConfig, TreeSelectConfig, TextAreaConfig, InputNumberConfig, MentionsConfig, TimePickerConfig, CardConfig } from '@aplus-frontend/antdv/es/config-provider/context';
|
|
10
|
-
import { ApGridRowSelection, AgGridRowSelection, ViewCacheOption } from '../..';
|
|
10
|
+
import { ApGridRowSelection, AgGridRowSelection, FullToken, ViewCacheOption } from '../..';
|
|
11
11
|
import { LocaleType } from '../../locale';
|
|
12
12
|
import { RecursivePartial } from '../../type';
|
|
13
|
-
import { FullToken } from '../../design-token/interface';
|
|
14
13
|
import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField, SearchFormGlobalConfig } from '..';
|
|
15
14
|
export declare const keysOf: <T extends Record<string, any>>(arr: T) => Array<keyof T>;
|
|
16
15
|
export declare function useGlobalConfig<K extends keyof ConfigProviderContext, D extends ConfigProviderContext[K]>(key: K, defaultValue?: D): Ref<Exclude<ConfigProviderContext[K], undefined> | D>;
|
|
@@ -1,39 +1,48 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { configProviderContextKey as
|
|
3
|
-
import { localeContextKey as
|
|
4
|
-
import { namespaceContextKey as
|
|
5
|
-
import { designTokenContextKey as
|
|
6
|
-
import { merge as
|
|
7
|
-
import { defaultToken as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { ref as p, getCurrentInstance as v, inject as k, computed as c, provide as y, unref as x, watch as T } from "vue";
|
|
2
|
+
import { configProviderContextKey as d } from "../constants.mjs";
|
|
3
|
+
import { localeContextKey as b } from "./use-locale.mjs";
|
|
4
|
+
import { namespaceContextKey as K } from "./use-namespace.mjs";
|
|
5
|
+
import { designTokenContextKey as j } from "./use-token.mjs";
|
|
6
|
+
import { merge as w, cloneDeep as G, omit as O } from "lodash-unified";
|
|
7
|
+
import { defaultToken as S } from "../../design-token/constants.mjs";
|
|
8
|
+
import { css as V } from "@emotion/css";
|
|
9
|
+
import { generateCssVar as h } from "../../utils/cssinjs/utils.mjs";
|
|
10
|
+
const m = (e) => Object.keys(e), u = p();
|
|
11
|
+
function D(e, o = void 0) {
|
|
12
|
+
const n = v() ? k(d, u) : u;
|
|
13
|
+
return e ? c(() => n.value?.[e] ?? o) : n;
|
|
12
14
|
}
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
if (!
|
|
15
|
+
const J = (e, o, n = !1) => {
|
|
16
|
+
const s = !!v(), t = s ? D() : void 0, i = o?.provide ?? (s ? y : void 0);
|
|
17
|
+
if (!i)
|
|
16
18
|
return;
|
|
17
|
-
const r =
|
|
18
|
-
const
|
|
19
|
-
return
|
|
19
|
+
const r = c(() => {
|
|
20
|
+
const a = x(e);
|
|
21
|
+
return t?.value ? F(t.value, a) : a;
|
|
20
22
|
});
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
23
|
+
i(d, r), i(
|
|
24
|
+
b,
|
|
25
|
+
c(() => r.value.aplusLocale)
|
|
26
|
+
), i(K, r.value.namespace);
|
|
27
|
+
const f = c(() => ({
|
|
28
|
+
...w(G(S), r.value.aplusToken || {})
|
|
29
|
+
})), g = c(() => O(f.value, ["components"])), l = p();
|
|
30
|
+
return T(
|
|
31
|
+
() => g.value,
|
|
32
|
+
(a) => {
|
|
33
|
+
const C = h(a);
|
|
34
|
+
l.value = V(C);
|
|
35
|
+
},
|
|
36
|
+
{ deep: !0, immediate: !0 }
|
|
37
|
+
), i(j, { token: f, rootCls: l }), (n || !u.value) && (u.value = r.value), r;
|
|
38
|
+
}, F = (e, o) => {
|
|
39
|
+
const n = [.../* @__PURE__ */ new Set([...m(e), ...m(o)])], s = {};
|
|
40
|
+
for (const t of n)
|
|
41
|
+
s[t] = o[t] !== void 0 ? o[t] : e[t];
|
|
42
|
+
return s;
|
|
34
43
|
};
|
|
35
44
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
45
|
+
m as keysOf,
|
|
46
|
+
J as provideGlobalConfig,
|
|
47
|
+
D as useGlobalConfig
|
|
39
48
|
};
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { InjectionKey, Ref } from 'vue';
|
|
2
2
|
import { FullToken } from '../../design-token/interface';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type DesignTokenContextType = {
|
|
4
|
+
token: Ref<Partial<FullToken>>;
|
|
5
|
+
rootCls: Ref<string | undefined>;
|
|
6
|
+
};
|
|
7
|
+
export declare const designTokenContextKey: InjectionKey<DesignTokenContextType>;
|
|
8
|
+
export declare const useToken: () => DesignTokenContextType;
|
|
9
|
+
export {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
const
|
|
1
|
+
import { inject as o, ref as e } from "vue";
|
|
2
|
+
const n = Symbol("designTokenContextKey"), r = () => o(n, {
|
|
3
|
+
token: e({}),
|
|
4
|
+
rootCls: e()
|
|
5
|
+
});
|
|
3
6
|
export {
|
|
4
|
-
|
|
7
|
+
n as designTokenContextKey,
|
|
5
8
|
r as useToken
|
|
6
9
|
};
|