@aplus-frontend/ui 7.0.1 → 7.1.1
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/ag-grid/hooks/use-columns-def.mjs +20 -19
- package/es/src/ag-grid/interface.d.ts +4 -0
- 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 +12 -12
- 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/ag-grid/hooks/use-columns-def.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +4 -0
- 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 +3 -3
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { resetComponent as
|
|
2
|
-
import { genComponentStyleHook as
|
|
3
|
-
const
|
|
1
|
+
import { resetComponent as o } from "../../style/index.mjs";
|
|
2
|
+
import { genComponentStyleHook as t } from "../../utils/cssinjs/index.mjs";
|
|
3
|
+
const s = (e) => {
|
|
4
4
|
const {
|
|
5
|
-
componentCls:
|
|
6
|
-
checkCardDisabledOutlineColor:
|
|
7
|
-
checkCardIndicatorSize:
|
|
8
|
-
checkCardOutlineWidth:
|
|
9
|
-
checkCardIndicatorOffset:
|
|
10
|
-
} = e;
|
|
5
|
+
componentCls: i,
|
|
6
|
+
checkCardDisabledOutlineColor: c,
|
|
7
|
+
checkCardIndicatorSize: d,
|
|
8
|
+
checkCardOutlineWidth: r,
|
|
9
|
+
checkCardIndicatorOffset: l
|
|
10
|
+
} = e, a = e.calc(d).mul(2).equal();
|
|
11
11
|
return {
|
|
12
|
-
[`${
|
|
13
|
-
...
|
|
12
|
+
[`${i}`]: {
|
|
13
|
+
...o(e),
|
|
14
14
|
borderRadius: e.borderRadius,
|
|
15
15
|
position: "relative",
|
|
16
16
|
"&--disabled": {
|
|
@@ -20,7 +20,7 @@ const a = (e) => {
|
|
|
20
20
|
"&--bordered": {
|
|
21
21
|
outline: `1px solid ${e.borderColorBase}`
|
|
22
22
|
},
|
|
23
|
-
[`&:hover:not(${
|
|
23
|
+
[`&:hover:not(${i}--disabled)`]: {
|
|
24
24
|
cursor: "pointer",
|
|
25
25
|
outline: `1px solid ${e.colorPrimary}`
|
|
26
26
|
},
|
|
@@ -33,24 +33,24 @@ const a = (e) => {
|
|
|
33
33
|
insetInlineEnd: 0,
|
|
34
34
|
clipPath: "polygon(100% 0, 100% 100%, 0 0)",
|
|
35
35
|
background: e.colorPrimary,
|
|
36
|
-
borderRadius:
|
|
36
|
+
borderRadius: e.calc(e.borderRadius).add("2px").equal()
|
|
37
37
|
},
|
|
38
38
|
"&--checked": {
|
|
39
|
-
outline: `${
|
|
40
|
-
[`&:hover:not(${
|
|
41
|
-
outline: `${
|
|
39
|
+
outline: `${r} solid ${e.colorPrimary}`,
|
|
40
|
+
[`&:hover:not(${i}--disabled)`]: {
|
|
41
|
+
outline: `${r} solid ${e.colorPrimary}`
|
|
42
42
|
},
|
|
43
43
|
"&::after": {
|
|
44
|
-
width:
|
|
45
|
-
height:
|
|
46
|
-
insetBlockStart:
|
|
47
|
-
insetInlineEnd:
|
|
44
|
+
width: a,
|
|
45
|
+
height: a,
|
|
46
|
+
insetBlockStart: l,
|
|
47
|
+
insetInlineEnd: l,
|
|
48
48
|
transition: "width 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), height 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), inset 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)"
|
|
49
49
|
},
|
|
50
|
-
[`&${
|
|
51
|
-
outlineColor:
|
|
50
|
+
[`&${i}--disabled`]: {
|
|
51
|
+
outlineColor: c,
|
|
52
52
|
"&::after": {
|
|
53
|
-
backgroundColor:
|
|
53
|
+
backgroundColor: c
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
},
|
|
@@ -60,8 +60,8 @@ const a = (e) => {
|
|
|
60
60
|
"&--small": {
|
|
61
61
|
padding: `${e.spaceSM} ${e.spaceLG}`
|
|
62
62
|
},
|
|
63
|
-
[`${
|
|
64
|
-
...
|
|
63
|
+
[`${i}__title`]: {
|
|
64
|
+
...o(e),
|
|
65
65
|
marginBottom: e.spaceXS,
|
|
66
66
|
color: "#333",
|
|
67
67
|
fontWeight: "bold",
|
|
@@ -69,14 +69,14 @@ const a = (e) => {
|
|
|
69
69
|
color: e.textColor4
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
|
-
[`${
|
|
73
|
-
...
|
|
72
|
+
[`${i}__content`]: {
|
|
73
|
+
...o(e),
|
|
74
74
|
color: "#333",
|
|
75
75
|
"&--disabled": {
|
|
76
76
|
color: e.textColor4
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
|
-
[`${
|
|
79
|
+
[`${i}__checked-icon`]: {
|
|
80
80
|
position: "absolute",
|
|
81
81
|
top: 0,
|
|
82
82
|
right: 0,
|
|
@@ -84,15 +84,15 @@ const a = (e) => {
|
|
|
84
84
|
lineHeight: 1,
|
|
85
85
|
userSelect: "none",
|
|
86
86
|
"& > img": {
|
|
87
|
-
width:
|
|
87
|
+
width: e.calc(d).sub(r).equal(),
|
|
88
88
|
verticalAlign: "top"
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
|
-
}, h =
|
|
93
|
+
}, h = t(
|
|
94
94
|
"CheckCard",
|
|
95
|
-
(e) => [
|
|
95
|
+
(e) => [s(e)],
|
|
96
96
|
{
|
|
97
97
|
checkCardDisabledBg: "#F9F9FA",
|
|
98
98
|
checkCardDisabledOutlineColor: "#E9EDF3",
|
|
@@ -13,14 +13,16 @@ const o = {
|
|
|
13
13
|
colorErrorDisabled: "#ffdbdc",
|
|
14
14
|
colorWarn: "#ffa940",
|
|
15
15
|
colorWarnDisabled: "#ffeed9",
|
|
16
|
-
textColor1: "#
|
|
17
|
-
textColor2: "#
|
|
16
|
+
textColor1: "#182948",
|
|
17
|
+
textColor2: "#526a90",
|
|
18
18
|
textColor3: "#8896b0",
|
|
19
19
|
textColor4: "#abb7cc",
|
|
20
20
|
colorBg1: "#e9edf3",
|
|
21
21
|
colorBg2: "#f6f9fa",
|
|
22
22
|
colorBg3: "#f3f5f8",
|
|
23
23
|
colorBgDisabled: "#f2f6f9",
|
|
24
|
+
colorBgLayout: "#f2f6f9",
|
|
25
|
+
colorBgControl: "#F5F9FF",
|
|
24
26
|
fontSizeSM: 10,
|
|
25
27
|
fontSize: 12,
|
|
26
28
|
fontSizeLG: 14,
|
|
@@ -12,6 +12,8 @@ import { AgGridToken } from '../ag-grid/style';
|
|
|
12
12
|
import { BatchInputGroupToken } from '../business/batch-input-group/style';
|
|
13
13
|
import { ApRadioGroupToken } from '../business/ap-radio-group/style';
|
|
14
14
|
import { ApGridToken } from '../ap-grid/style';
|
|
15
|
+
import { TokenUtil } from '../utils/cssinjs/TokenUtil';
|
|
16
|
+
/** 基础token */
|
|
15
17
|
export type BaseToken = {
|
|
16
18
|
/**
|
|
17
19
|
* 基础边框色
|
|
@@ -101,6 +103,14 @@ export type BaseToken = {
|
|
|
101
103
|
* 背景禁用色
|
|
102
104
|
*/
|
|
103
105
|
colorBgDisabled: string;
|
|
106
|
+
/**
|
|
107
|
+
* 布局背景色
|
|
108
|
+
*/
|
|
109
|
+
colorBgLayout: string;
|
|
110
|
+
/**
|
|
111
|
+
* 控件背景色(一般同主系,但是更浅,适用块选中效果)
|
|
112
|
+
*/
|
|
113
|
+
colorBgControl: string;
|
|
104
114
|
fontSizeXL: number;
|
|
105
115
|
fontSizeLG: number;
|
|
106
116
|
fontSize: number;
|
|
@@ -127,53 +137,40 @@ export type BaseToken = {
|
|
|
127
137
|
*/
|
|
128
138
|
lineClamp: number;
|
|
129
139
|
};
|
|
130
|
-
/**
|
|
131
|
-
|
|
132
|
-
|
|
140
|
+
/** 组件token */
|
|
141
|
+
export type ComponentsToken = {
|
|
142
|
+
ApAction: ActionToken;
|
|
143
|
+
CheckCard: CheckCardToken;
|
|
144
|
+
ApForm: ApFormToken;
|
|
145
|
+
ApList: ApListToken;
|
|
146
|
+
Scrollbar: ScrollbarToken;
|
|
147
|
+
Mask: MaskToken;
|
|
148
|
+
Splitter: SplitterToken;
|
|
149
|
+
ProCard: ProCardToken;
|
|
150
|
+
StatisticsCard: ProCardToken;
|
|
151
|
+
AgGrid: AgGridToken;
|
|
152
|
+
BatchInputGroup: BatchInputGroupToken;
|
|
153
|
+
ApRadioGroup: ApRadioGroupToken;
|
|
154
|
+
ApGrid: ApGridToken;
|
|
155
|
+
};
|
|
156
|
+
/** 全量token */
|
|
133
157
|
export type FullToken = BaseToken & {
|
|
134
|
-
components:
|
|
135
|
-
ApAction: ActionToken;
|
|
136
|
-
CheckCard: CheckCardToken;
|
|
137
|
-
ApForm: ApFormToken;
|
|
138
|
-
ApList: ApListToken;
|
|
139
|
-
Scrollbar: ScrollbarToken;
|
|
140
|
-
Mask: MaskToken;
|
|
141
|
-
Splitter: SplitterToken;
|
|
142
|
-
ProCard: ProCardToken;
|
|
143
|
-
StatisticsCard: ProCardToken;
|
|
144
|
-
AgGrid: AgGridToken;
|
|
145
|
-
BatchInputGroup: BatchInputGroupToken;
|
|
146
|
-
ApRadioGroup: ApRadioGroupToken;
|
|
147
|
-
ApGrid: ApGridToken;
|
|
148
|
-
};
|
|
158
|
+
components: ComponentsToken;
|
|
149
159
|
};
|
|
150
|
-
/**
|
|
151
|
-
* 上下文token(基础token+部分组件token)
|
|
152
|
-
*/
|
|
160
|
+
/** 上下文token(基础token+部分组件token) */
|
|
153
161
|
export type ContextToken = BaseToken & RecursivePartial<{
|
|
154
|
-
components:
|
|
155
|
-
ApAction: ActionToken;
|
|
156
|
-
CheckCard: CheckCardToken;
|
|
157
|
-
ApForm: ApFormToken;
|
|
158
|
-
ApList: ApListToken;
|
|
159
|
-
Scrollbar: ScrollbarToken;
|
|
160
|
-
Mask: MaskToken;
|
|
161
|
-
Splitter: SplitterToken;
|
|
162
|
-
ProCard: ProCardToken;
|
|
163
|
-
StatisticsCard: ProCardToken;
|
|
164
|
-
AgGrid: AgGridToken;
|
|
165
|
-
BatchInputGroup: BatchInputGroupToken;
|
|
166
|
-
ApRadioGroup: ApRadioGroupToken;
|
|
167
|
-
ApGrid: ApGridToken;
|
|
168
|
-
};
|
|
162
|
+
components: ComponentsToken;
|
|
169
163
|
}>;
|
|
170
164
|
export type TokenWithComponentCls<Token> = Token & {
|
|
171
165
|
componentCls: string;
|
|
172
166
|
namespace: string;
|
|
173
167
|
};
|
|
168
|
+
export type TokenWithUtil<Token> = TokenWithComponentCls<Token> & {
|
|
169
|
+
calc: (cssVar: any) => InstanceType<typeof TokenUtil>;
|
|
170
|
+
};
|
|
174
171
|
export type CssVarToken<Token = Recordable> = {
|
|
175
172
|
[key in keyof Token]: Token[key] | string;
|
|
176
173
|
};
|
|
177
|
-
export type GenStyleFunc<Token = object> = (token:
|
|
178
|
-
export type StyleMixin<Token = object> = (token:
|
|
179
|
-
export type GenStyleCallback<Token> = (
|
|
174
|
+
export type GenStyleFunc<Token = object> = (token: TokenWithUtil<Token & BaseToken>) => CSSInterpolation;
|
|
175
|
+
export type StyleMixin<Token = object> = (token: TokenWithUtil<Token & BaseToken>) => CSSObject;
|
|
176
|
+
export type GenStyleCallback<Token> = (calc: TokenWithUtil<Token>, rawToken: TokenWithComponentCls<Token>) => CSSInterpolation[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { genComponentStyleHook as
|
|
2
|
-
const
|
|
3
|
-
const { componentCls:
|
|
1
|
+
import { genComponentStyleHook as t } from "../../utils/cssinjs/index.mjs";
|
|
2
|
+
const c = (r) => {
|
|
3
|
+
const { componentCls: a, scrollBarTrackWidth: l, scrollBarBarWidth: o } = r;
|
|
4
4
|
return {
|
|
5
|
-
[
|
|
5
|
+
[a]: {
|
|
6
6
|
position: "relative",
|
|
7
7
|
"&--horizontal": {
|
|
8
8
|
width: "100%",
|
|
@@ -12,7 +12,7 @@ const e = (r) => {
|
|
|
12
12
|
width: l,
|
|
13
13
|
height: "100%"
|
|
14
14
|
},
|
|
15
|
-
[`${
|
|
15
|
+
[`${a}__track`]: {
|
|
16
16
|
position: "absolute",
|
|
17
17
|
width: "100%",
|
|
18
18
|
height: "100%",
|
|
@@ -29,7 +29,7 @@ const e = (r) => {
|
|
|
29
29
|
backgroundColor: "transparent"
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
-
[`${
|
|
32
|
+
[`${a}__bar`]: {
|
|
33
33
|
position: "absolute",
|
|
34
34
|
borderRadius: o,
|
|
35
35
|
backgroundColor: r.scrollBarBarColor,
|
|
@@ -40,18 +40,18 @@ const e = (r) => {
|
|
|
40
40
|
},
|
|
41
41
|
"&--horizontal": {
|
|
42
42
|
height: o,
|
|
43
|
-
top:
|
|
43
|
+
top: r.calc(l).div(2).sub(r.calc(o).div(2)).equal()
|
|
44
44
|
},
|
|
45
45
|
"&--vertical": {
|
|
46
46
|
width: o,
|
|
47
|
-
left:
|
|
47
|
+
left: r.calc(l).div(2).sub(r.calc(o).div(2)).equal()
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
},
|
|
52
|
+
}, e = t(
|
|
53
53
|
"Scrollbar",
|
|
54
|
-
(r) => [
|
|
54
|
+
(r) => [c(r)],
|
|
55
55
|
{
|
|
56
56
|
scrollBarBarColor: "#c7c8cc",
|
|
57
57
|
scrollBarTrackColor: "#F2F2F2",
|
|
@@ -61,6 +61,6 @@ const e = (r) => {
|
|
|
61
61
|
}
|
|
62
62
|
);
|
|
63
63
|
export {
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
e as default,
|
|
65
|
+
c as genScrollbarStyle
|
|
66
66
|
};
|
|
@@ -19,7 +19,7 @@ const t = () => ({
|
|
|
19
19
|
boxSizing: "border-box",
|
|
20
20
|
margin: 0,
|
|
21
21
|
padding: 0,
|
|
22
|
-
color: r.
|
|
22
|
+
color: r.textColor1,
|
|
23
23
|
fontSize: r.fontSize,
|
|
24
24
|
lineHeight: r.lineHeight,
|
|
25
25
|
listStyle: "none",
|
|
@@ -79,7 +79,7 @@ const t = () => ({
|
|
|
79
79
|
background: "rgba(0,0,0,0.04)",
|
|
80
80
|
fontSize: r.fontSizeSM,
|
|
81
81
|
borderRadius: "2px",
|
|
82
|
-
color: r.
|
|
82
|
+
color: r.textColor1,
|
|
83
83
|
cursor: "pointer",
|
|
84
84
|
opacity: 0,
|
|
85
85
|
display: "flex",
|
|
@@ -140,11 +140,11 @@ const t = () => ({
|
|
|
140
140
|
height: "24px",
|
|
141
141
|
"&-start": {
|
|
142
142
|
left: "auto",
|
|
143
|
-
right:
|
|
143
|
+
right: r.calc(r.splitterTriggerSize).div(2).equal(),
|
|
144
144
|
transform: "translateY(-50%)"
|
|
145
145
|
},
|
|
146
146
|
"&-end": {
|
|
147
|
-
left:
|
|
147
|
+
left: r.calc(r.splitterTriggerSize).div(2).equal(),
|
|
148
148
|
right: "auto",
|
|
149
149
|
transform: "translateY(-50%)"
|
|
150
150
|
}
|
|
@@ -182,11 +182,11 @@ const t = () => ({
|
|
|
182
182
|
width: "24px",
|
|
183
183
|
"&-start": {
|
|
184
184
|
top: "auto",
|
|
185
|
-
bottom:
|
|
185
|
+
bottom: r.calc(r.splitterTriggerSize).div(2).equal(),
|
|
186
186
|
transform: "translateX(-50%)"
|
|
187
187
|
},
|
|
188
188
|
"&-end": {
|
|
189
|
-
top:
|
|
189
|
+
top: r.calc(r.splitterTriggerSize).div(2).equal(),
|
|
190
190
|
bottom: "auto",
|
|
191
191
|
transform: "translateX(-50%)"
|
|
192
192
|
}
|
package/es/src/style/index.mjs
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class TokenUtil {
|
|
2
|
+
private result;
|
|
3
|
+
private lowPriority?;
|
|
4
|
+
constructor(cssVar: string);
|
|
5
|
+
add(cssVar: string | number | TokenUtil): this;
|
|
6
|
+
sub(cssVar: string | number | TokenUtil): this;
|
|
7
|
+
mul(cssVar: string | number | TokenUtil): this;
|
|
8
|
+
div(cssVar: string | number | TokenUtil): this;
|
|
9
|
+
getResult(): string;
|
|
10
|
+
equal(): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
class s {
|
|
2
|
+
constructor(t) {
|
|
3
|
+
this.result = "", this.result = t;
|
|
4
|
+
}
|
|
5
|
+
add(t) {
|
|
6
|
+
return t instanceof s ? this.result = `${this.result} + ${t.getResult()}` : this.result = `${this.result} + ${t}`, this.lowPriority = !0, this;
|
|
7
|
+
}
|
|
8
|
+
sub(t) {
|
|
9
|
+
return console.log("cssVar", t), t instanceof s ? this.result = `${this.result} - ${t.getResult()}` : this.result = `${this.result} - ${t}`, this.lowPriority = !0, this;
|
|
10
|
+
}
|
|
11
|
+
mul(t) {
|
|
12
|
+
return this.lowPriority && (this.result = `(${this.result})`), t instanceof s ? this.result = `${this.result} * ${t.getResult()}` : this.result = `${this.result} * ${t}`, this.lowPriority = !1, this;
|
|
13
|
+
}
|
|
14
|
+
div(t) {
|
|
15
|
+
return this.lowPriority && (this.result = `(${this.result})`), t instanceof s ? this.result = `${this.result} / ${t.getResult()}` : this.result = `${this.result} / ${t}`, this.lowPriority = !1, this;
|
|
16
|
+
}
|
|
17
|
+
getResult() {
|
|
18
|
+
return this.lowPriority ? `(${this.result})` : this.result;
|
|
19
|
+
}
|
|
20
|
+
equal() {
|
|
21
|
+
return typeof this.lowPriority < "u" ? `calc(${this.result})` : this.result;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
s as TokenUtil
|
|
26
|
+
};
|
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { injectGlobal as g, cx as
|
|
3
|
-
import
|
|
4
|
-
import { useToken as
|
|
1
|
+
import { ref as T, computed as a, watch as f } from "vue";
|
|
2
|
+
import { injectGlobal as g, cx as S } from "@emotion/css";
|
|
3
|
+
import b from "@emotion/css/create-instance";
|
|
4
|
+
import { useToken as V } from "../../config-provider/hooks/use-token.mjs";
|
|
5
5
|
import "../../config-provider/index.mjs";
|
|
6
|
-
import { camelToKebab as
|
|
6
|
+
import { camelToKebab as w, generateCssVar as A } from "./utils.mjs";
|
|
7
7
|
import { omit as C, isFunction as h } from "lodash-unified";
|
|
8
8
|
import { css as j } from "./instance.mjs";
|
|
9
|
-
import { downSpecificityPlugin as
|
|
10
|
-
import {
|
|
11
|
-
|
|
9
|
+
import { downSpecificityPlugin as G } from "./plugin-specificity.mjs";
|
|
10
|
+
import { TokenUtil as P } from "./TokenUtil.mjs";
|
|
11
|
+
import { useGlobalConfig as x } from "../../config-provider/hooks/use-global-config.mjs";
|
|
12
|
+
const { css: L } = b({
|
|
12
13
|
key: "css-dev-only",
|
|
13
|
-
stylisPlugins: [
|
|
14
|
+
stylisPlugins: [G]
|
|
14
15
|
});
|
|
15
|
-
function
|
|
16
|
+
function E(l) {
|
|
16
17
|
const t = {};
|
|
17
|
-
for (const
|
|
18
|
-
t[
|
|
18
|
+
for (const n in l)
|
|
19
|
+
t[n] = `var(${w(n)})`;
|
|
19
20
|
return t;
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
+
function M(l, t, n, d) {
|
|
22
23
|
return (s) => {
|
|
23
|
-
const p = l.split("."), { token: c, rootCls: u } =
|
|
24
|
+
const p = l.split("."), { token: c, rootCls: u } = V(), k = T(), m = x("namespace"), $ = a(() => ({
|
|
24
25
|
...C(c.value || {}, "components"),
|
|
25
26
|
...c.value.components?.[p[0]] || {}
|
|
26
27
|
})), i = a(() => {
|
|
27
28
|
const e = c.value.components?.[p[0]] || {};
|
|
28
29
|
return {
|
|
29
|
-
...h(
|
|
30
|
+
...h(n) ? n($.value) : n || {},
|
|
30
31
|
...e
|
|
31
32
|
};
|
|
32
33
|
}), v = a(() => ({
|
|
@@ -38,11 +39,11 @@ function J(l, t, o, d) {
|
|
|
38
39
|
return f(
|
|
39
40
|
() => m.value,
|
|
40
41
|
(e) => {
|
|
41
|
-
const
|
|
42
|
+
const o = E(
|
|
42
43
|
v.value
|
|
43
44
|
);
|
|
44
|
-
|
|
45
|
-
const r = t(
|
|
45
|
+
o.componentCls = `.${e}-${s}`, o.namespace = e, o.calc = (y) => new P(y);
|
|
46
|
+
const r = t(o, {
|
|
46
47
|
...v.value,
|
|
47
48
|
componentCls: `.${e}-${s}`,
|
|
48
49
|
namespace: e
|
|
@@ -52,16 +53,16 @@ function J(l, t, o, d) {
|
|
|
52
53
|
{ immediate: !0 }
|
|
53
54
|
), f(
|
|
54
55
|
[() => i.value, () => u.value],
|
|
55
|
-
([e,
|
|
56
|
+
([e, o]) => {
|
|
56
57
|
const r = A(e, d);
|
|
57
58
|
Object.keys(r).length && j({
|
|
58
|
-
[`.${
|
|
59
|
+
[`.${o}.${m.value}-${s}`]: r
|
|
59
60
|
});
|
|
60
61
|
},
|
|
61
62
|
{ deep: !0, immediate: !0 }
|
|
62
|
-
), a(() =>
|
|
63
|
+
), a(() => S(u.value, k.value));
|
|
63
64
|
};
|
|
64
65
|
}
|
|
65
66
|
export {
|
|
66
|
-
|
|
67
|
+
M as genComponentStyleHook
|
|
67
68
|
};
|
package/es/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "7.
|
|
1
|
+
declare const _default: "7.1.1";
|
|
2
2
|
export default _default;
|
package/es/src/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../../ap-table/utils.js"),C=require("../renderer/index.js"),d=require("lodash-unified"),u=require("vue");require("../components/body-cell/index.vue.js");require("../components/header-cell/index.vue.js");require("../components/tooltip/index.vue.js");require("../../config-provider/index.js");const q=require("../../ap-grid/utils/col.js"),w=require("../../utils/index.js"),S=require("../../config-provider/hooks/use-global-config.js"),R=require("../../config-provider/hooks/use-namespace.js"),P=require("../components/body-cell/index.vue2.js"),D=require("../components/tooltip/index.vue2.js"),T=require("../components/header-cell/index.vue2.js");function I(t){return d.isNumber(t)&&t>1}function M(t,i){if(i.bodyCellTooltip)return d.isFunction(i.bodyCellTooltip)?i.bodyCellTooltip(t.value,t.data):i.bodyCellTooltip;if(i.renderText)return i.renderText({value:t.value,record:t.data,column:i,text:t.value});const p=i.valueType||"text",f=C.rendererMap[p];if(f){const c=y.getTableRenderProps({...i,valueType:p},{value:t.value,text:t.value,record:t.data,column:t.column,rowIndex:t.node?.rowIndex,pinned:t.node?.rowPinned});return f(c)}return y.objectToString(t.value)}const G=(t,i,p)=>{const f=S.useGlobalConfig("valueTypeMap"),v=u.ref(),{em:c}=R.useNamespace("ag-grid"),b=r=>{const l={cellRenderer:P.default,cellRendererParams:{column:r,extraValueType:u.unref(f),rowKey:i.rowKey}};if(r.customRender)return l;if(r.renderText)return{valueFormatter:s=>r.renderText({value:s.value,record:s.data,column:r,text:s.value})};const a=r.valueType||"text",e=C.rendererMap[a];return e?{valueFormatter:s=>{const n=y.getTableRenderProps({...r,valueType:a},{value:s.value,text:s.value,record:s.data,column:s.column,rowIndex:s.node?.rowIndex,pinned:s.node?.rowPinned});return e(n)}}:l},h=r=>{const l=r.valueType||"text",a=C.rendererMap[l],e={},s=r.bodyCellTooltip||!r.customRender&&a&&(r.ellipsis===!0||r.ellipsis==="tooltip"||d.isNumber(r.ellipsis)),n=d.isNumber(r.ellipsis)&&r.ellipsis>1,o=d.isNumber(r.ellipsis)?r.ellipsis:1;return e.tooltipValueGetter=s?x=>M(x,r):void 0,e.wrapText=!r.ellipsis||n,e.cellStyle={"--ag-grid-line-clamp":o},e.tooltipComponent=D.default,e.tooltipComponentParams={lineClamp:o,gridWrapperRef:v},e},_=u.computed(()=>{const r=u.unref(t);function l(a){return a.map(e=>{const s={field:q.dataIndexToField(e.dataIndex),colId:w.isDef(e.key)?String(e.key):void 0,sortable:!!e.sorter,comparator:e.sorter===!0?()=>0:e.sorter,headerComponentParams:{column:e},resizable:e.resizable,width:e.width,minWidth:e.minWidth,maxWidth:e.maxWidth,flex:e.width?void 0:1,pinned:e.fixed||null,colSpan:e.colSpan,spanRows:e.spanRows,cellClass:p(n=>{const o=e.cellClass||"",x=d.isFunction(o)?o(n.data,n.node):o;return[`${c("cell",e.align||"left")}`,I(e.ellipsis)?c("cell","multiline"):null,x].flat().filter(Boolean)}),cellStyle:e.cellStyle,headerStyle:e.headerStyle,headerClass:e.headerClass,autoHeight:!0,...h(e),...b(e)};return e.children?.length?{...s,headerGroupComponent:T.default,headerGroupComponentParams:{column:e},children:l(e.children)}:s})}return l(r)}),g=u.computed(()=>({headerComponent:T.default,resizable:i.columnResizable,suppressMovable:!0,cellDataType:!1}));return{columnDefs:_,defaultColDef:g,gridWrapperRef:v}};exports.useColumnsDef=G;
|
|
@@ -96,6 +96,10 @@ export type AgGridColumnType<RecordType = any, ExtraValueType = 'text', ValueTyp
|
|
|
96
96
|
* @returns
|
|
97
97
|
*/
|
|
98
98
|
cellClass?: string | string[] | ((data: RecordType, node: IRowNode<RecordType>) => string | string[] | undefined) | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* 自定义单元格样式
|
|
101
|
+
*/
|
|
102
|
+
cellStyle?: ColDef<RecordType>['cellStyle'];
|
|
99
103
|
/**
|
|
100
104
|
* 仅用于和接口交互的字段,如果不设置将会尝试使用`dataIndex`和`key`
|
|
101
105
|
*/
|
|
@@ -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"),o=require("@aplus-frontend/antdv"),s=require("./helper.js"),c=require("lodash-unified");require("./help-message/index.vue.js");require("../config-provider/index.js");const B=require("./style/index.js"),u=require("../config-provider/hooks/use-global-config.js"),m=require("../config-provider/hooks/use-namespace.js"),C=require("./help-message/index.vue2.js"),_={key:0},q=e.defineComponent({name:"ApDescriptions",__name:"ap-descriptions",props:{descriptionsProps:{},schemas:{},dataSource:{},style:{type:[Boolean,null,String,Object,Array]},className:{}},setup(p){const r=p,d=u.useGlobalConfig("apDescriptions"),f=u.useGlobalConfig("downloadCenterTriggerConfig"),{b:y,be:b}=m.useNamespace("ap-descriptions"),g=B.default("ap-descriptions"),k=(t={})=>{let n="";return r.descriptionsProps?.layout==="vertical"&&(n="start"),{justifyContent:n,...t}},a=t=>{const n=c.get(r.dataSource,t.field);if(t.customRender)return t.customRender(r.dataSource);t.valueType==="attachment"&&(t.extraProps=s.mixinsAttachmentExtraProps(t.extraProps,{fromConfig:d.value?.downloadFile,fromGlobal:f.value?.trigger}));const l=t.format?t.format(n,r.dataSource||{}):n;return s.transformValue({value:l,record:r.dataSource},t)},v=t=>t.valueType==="text"&&!!t.extraProps?.ellipsis,S=t=>{if(t.visible!=null){if(typeof t.visible=="boolean")return t.visible;if(typeof t.visible=="function")return t.visible({record:r.dataSource||{},schema:t})}return!0};return(t,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.className,e.unref(y)(),e.unref(g)]),style:e.normalizeStyle(t.style)},[e.createVNode(e.unref(o.Descriptions),e.mergeProps(t.descriptionsProps,{"label-style":k({...t.descriptionsProps?.labelStyle||{}})}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.schemas,(l,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.field||"empty"+i},[S(l)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.valueType==="empty"?(e.openBlock(),e.createBlock(e.unref(o.DescriptionsItem),{key:0,"content-style":l.contentStyle,"label-style":l.labelStyle,span:l.span},null,8,["content-style","label-style","span"])):(e.openBlock(),e.createBlock(e.unref(o.DescriptionsItem),{key:1,class:e.normalizeClass(v(l)?e.unref(b)("item","ellipsis"):""),label:l.label?e.h(e.Fragment,[e.h(C.default,{helpMessage:l.helpMessage,label:l.label})]):null,span:l.span,"content-style":l.contentStyle,"label-style":l.labelStyle},{default:e.withCtx(()=>[e.unref(s.isEmptyWithType)(e.unref(c.get)(t.dataSource,l.field),l)?(e.openBlock(),e.createElementBlock("span",_,"--")):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l.contentSlotName?e.renderSlot(t.$slots,l.contentSlotName,{key:0,index:i,item:a(l),record:t.dataSource}):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.h(e.Fragment,[l.prefix,a(l),l.suffix])),{key:1}))],64))]),_:2},1032,["class","label","span","content-style","label-style"]))],64)):e.createCommentVNode("",!0)],64))),128))]),_:3},16,["label-style"])],6))}});exports.default=q;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../utils/cssinjs/index.js"),n=t=>{const{componentCls:i}=t;return{[i]:{".ant-descriptions":{".ant-descriptions-view table":{tableLayout:"fixed"},"td.ant-descriptions-item":{paddingBlockEnd:"var(--ap-descriptions-item-padding-bottom, 16px)"},"th.ant-descriptions-item":{paddingBlockEnd:"4px"},".ant-descriptions-row:last-child":{".ant-descriptions-item":{paddingBottom:"var(--ap-descriptions-last-row-item-padding-bottom, 0px)"}},".ant-descriptions-item-label::after":{marginInline:"4px 12px"}},[`${i}-item__ellipsis`]:{".ant-descriptions-item-label":{flexShrink:0},".ant-descriptions-item-content":{flexShrink:1,minWidth:0,".ant-typography":{marginBlockEnd:0},".ant-typography-ellipsis":{maxWidth:"100%"}}},[`${i}--item-label`]:{".ant-typography-single-line":{whiteSpace:"normal"}},".ant-descriptions-row":{".ant-descriptions-item-label":{
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../utils/cssinjs/index.js"),n=t=>{const{componentCls:i}=t;return{[i]:{".ant-descriptions":{".ant-descriptions-view table":{tableLayout:"fixed"},"td.ant-descriptions-item":{paddingBlockEnd:"var(--ap-descriptions-item-padding-bottom, 16px)"},"th.ant-descriptions-item":{paddingBlockEnd:"4px"},".ant-descriptions-row:last-child":{".ant-descriptions-item":{paddingBottom:"var(--ap-descriptions-last-row-item-padding-bottom, 0px)"}},".ant-descriptions-item-label::after":{marginInline:"4px 12px"}},[`${i}-item__ellipsis`]:{".ant-descriptions-item-label":{flexShrink:0},".ant-descriptions-item-content":{flexShrink:1,minWidth:0,".ant-typography":{marginBlockEnd:0},".ant-typography-ellipsis":{maxWidth:"100%"}}},[`${i}--item-label`]:{".ant-typography-single-line":{whiteSpace:"normal"}},".ant-descriptions-row":{".ant-descriptions-item-label":{justifyContent:"flex-end",width:"var(--ap-descriptions-item-label-width, auto)",color:t.textColor3,".ap-descriptions-item-content__help":{fontSize:t.fontSizeLG,marginInlineStart:"4px",color:t.textColor3},".ant-typography":{color:"inherit"}},".ant-descriptions-item-content":{color:t.textColor1,".ap-descriptions-item-content__link":{color:t.colorLink,cursor:"pointer"}}}}}},o=e.genComponentStyleHook("ApDescriptions",t=>[n(t)]);exports.default=o;
|
|
@@ -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"),k=require("@aplus-frontend/antdv"),_=require("@ant-design/icons-vue");require("../config-provider/index.js");const h=require("./hooks/index.js"),d=require("./utils/getFileInfo.js"),w=require("./hooks/useStyle.js"),B=require("lodash-unified"),O=require("../config-provider/hooks/use-locale.js"),u=require("../config-provider/hooks/use-global-config.js"),q={key:0,class:"spin"},z={key:1,class:"icon"},S={class:"text"},I=e.defineComponent({name:"ApDownload",__name:"ap-download",props:{prefixCls:{},type:{default:"link"},htmlType:{},shape:{},size:{default:"middle"},loading:{type:[Boolean,Object]},disabled:{type:Boolean,default:!1},ghost:{type:Boolean},block:{type:Boolean},danger:{type:Boolean},icon:{},href:{},target:{},title:{},onClick:{},onMousedown:{},autoInsertSpace:{type:Boolean},iconPosition:{},color:{},variant:{},text:{},fileName:{},needName:{type:[Boolean,Object]},getOssAccess:{}},emits:["downloadCallback"],setup(p,{emit:f}){const l=f,s=e.ref(!1),{lang:m}=O.useLocale(),g=e.useSlots(),C=e.computed(()=>m.value==="zh-cn"?"zh_CN":"en_US"),t=p,a=u.useGlobalConfig("apUpload"),i=u.useGlobalConfig("downloadCenterTriggerConfig"),c=e.computed(()=>t.disabled),y=e.computed(()=>t.size),{getInnerWrapperClass:b}=w.useStyle(y,c),N=e.computed(()=>t.getOssAccess||a.value?.getOssAccess),v=async()=>{if(!t.disabled){s.value=!0;try{if(i.value?.trigger){let n=d.getFileInfo(t.needName??a?.value?.needName,t.fileName).map(r=>({objectName:r.path,fileName:r.fileName}));await i.value?.trigger(n),l("downloadCallback",n)}else{const n=await(await h.useOssInit(N.value,e.unref(C))).downloadFile(d.getFileInfo(t.needName??a?.value?.needName,t.fileName));l("downloadCallback",n)}}catch(o){console.error(o)}finally{s.value=!1}}};return(o,n)=>(e.openBlock(),e.createBlock(e.unref(k.Button),e.mergeProps(e.unref(B.omit)(t,["getOssAccess","fileName","needName"]),{type:t.type,size:t.size,disabled:c.value,onClick:v}),{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(e.unref(b))},[s.value?(e.openBlock(),e.createElementBlock("span",q,[e.createVNode(e.unref(_.LoadingOutlined),{spin:!0})])):e.createCommentVNode("",!0),e.unref(g).icon?(e.openBlock(),e.createElementBlock("span",z,[e.renderSlot(o.$slots,"icon")])):e.createCommentVNode("",!0),e.createElementVNode("span",S,e.toDisplayString(o.text),1)],2)]),_:3},16,["type","size","disabled"]))}});exports.default=I;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComputedRef } from 'vue';
|
|
2
|
-
export declare function useStyle(
|
|
2
|
+
export declare function useStyle(size: ComputedRef<string>, disabled: ComputedRef<boolean>): {
|
|
3
3
|
wrapperStyle: ComputedRef<Record<string, any>>;
|
|
4
4
|
getWrapperClass: ComputedRef<string[]>;
|
|
5
5
|
getInnerWrapperClass: ComputedRef<string[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),i=require("../utils/getFileInfo.js");require("../../config-provider/index.js");const d=require("../style/index.js"),w=require("../../config-provider/hooks/use-token.js"),m=require("../../config-provider/hooks/use-namespace.js");function v(n,l){const{b:e,bm:r}=m.useNamespace("ap-download"),t=d.default("ap-download"),{token:a}=w.useToken(),s=o.computed(()=>({"--download-main-color":a.value?.colorLink,"--download-main-color-opacity":i.getHexWithOpacity(a.value?.colorLink,.6)})),c=o.computed(()=>[e("wrapper"),r("wrapper",n.value),t.value].filter(Boolean)),p=o.computed(()=>{const u=[e(),e("inner-wrapper"),r("inner-wrapper",n.value)];return l.value&&u.push(r("inner-wrapper","disabled")),[...u,t.value]});return{wrapperStyle:s,getWrapperClass:c,getInnerWrapperClass:p}}exports.useStyle=v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("../../utils/cssinjs/index.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("../../utils/cssinjs/index.js"),r=e=>{const{componentCls:o,textColor3:n}=e,i=`${o}-inner-wrapper`;return{[o]:{"&-wrapper":{textWrap:"nowrap",display:"inline-block"}},[i]:{display:"flex",color:"var(--download-main-color)",cursor:"pointer",alignItems:"center",".spin":{marginInlineEnd:"5px"},".icon":{position:"relative",fontSize:e.fontSizeXL,marginInlineEnd:"5px"},".text":{color:"var(--download-main-color)"},"&:hover":{color:"var(--download-main-color-opacity)"},"&--large":{lineHeight:e.lineHeightLG,fontSize:e.fontSizeLG},"&--middle":{lineHeight:e.lineHeight,fontSize:e.fontSize},"&--small":{lineHeight:e.lineHeightSM,fontSize:e.fontSizeSM},"&--disabled":{color:n,cursor:"not-allowed","&:hover":{color:n}}}}},t=l.genComponentStyleHook("ApDownload",e=>[r(e)]);exports.default=t;
|