@aplus-frontend/ui 7.0.0 → 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/index.mjs +108 -106
- package/es/src/ag-grid/style/custom-header.mjs +1 -1
- package/es/src/ag-grid/style/index.mjs +0 -1
- package/es/src/ap-action/item-dropdown/index.vue.mjs +12 -12
- 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/item.mjs +5 -4
- package/es/src/ap-form/style/modal-form.mjs +11 -12
- package/es/src/ap-form/style/search-form-sorter.mjs +31 -27
- package/es/src/ap-form/style/token.d.ts +8 -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 +42 -41
- 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/ag-grid-modal/interface.d.ts +1 -1
- package/es/src/business/ag-grid-modal/wrapper/index.vue.d.ts +6 -2
- package/es/src/business/ag-grid-modal/wrapper/index.vue2.mjs +29 -12
- 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 +11 -39
- 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.d.ts +20 -4
- package/es/src/business/ap-size-input/ApSizeInput.mjs +37 -40
- package/es/src/business/ap-size-input/constans.d.ts +10 -2
- package/es/src/business/ap-size-input/constans.mjs +9 -1
- package/es/src/business/ap-size-input/form-item.vue.d.ts +13 -0
- package/es/src/business/ap-size-input/form-item.vue.mjs +65 -0
- package/es/src/business/ap-size-input/form-item.vue2.mjs +4 -0
- package/es/src/business/ap-size-input/index.d.ts +33 -8
- package/es/src/business/ap-size-input/index.mjs +3 -2
- package/es/src/business/ap-size-input/interface.d.ts +7 -0
- package/es/src/business/ap-size-input/style/index.mjs +2 -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/ap-view/components/menu-list-content.vue2.mjs +61 -64
- package/es/src/business/ap-view/style/index.mjs +1 -1
- package/es/src/business/batch-input-group/style/index.mjs +1 -1
- package/es/src/check-card/style/index.mjs +46 -51
- package/es/src/config-provider/hooks/use-token.d.ts +2 -2
- package/es/src/design-token/constants.mjs +4 -2
- package/es/src/design-token/interface.d.ts +39 -19
- package/es/src/index.mjs +95 -93
- 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.d.ts +1 -1
- package/es/src/utils/cssinjs/index.mjs +51 -50
- 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/style/custom-header.js +1 -1
- package/lib/src/ap-action/item-dropdown/index.vue.js +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/item.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 +8 -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/ag-grid-modal/interface.d.ts +1 -1
- package/lib/src/business/ag-grid-modal/wrapper/index.vue.d.ts +6 -2
- package/lib/src/business/ag-grid-modal/wrapper/index.vue2.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.d.ts +20 -4
- package/lib/src/business/ap-size-input/ApSizeInput.js +1 -1
- package/lib/src/business/ap-size-input/constans.d.ts +10 -2
- package/lib/src/business/ap-size-input/constans.js +1 -1
- package/lib/src/business/ap-size-input/form-item.vue.d.ts +13 -0
- package/lib/src/business/ap-size-input/form-item.vue.js +1 -0
- package/lib/src/business/ap-size-input/form-item.vue2.js +1 -0
- package/lib/src/business/ap-size-input/index.d.ts +33 -8
- package/lib/src/business/ap-size-input/index.js +1 -1
- package/lib/src/business/ap-size-input/interface.d.ts +7 -0
- package/lib/src/business/ap-size-input/style/index.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/ap-view/components/menu-list-content.vue2.js +1 -1
- package/lib/src/business/ap-view/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/config-provider/hooks/use-token.d.ts +2 -2
- package/lib/src/design-token/constants.js +1 -1
- package/lib/src/design-token/interface.d.ts +39 -19
- package/lib/src/index.js +1 -1
- 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.d.ts +1 -1
- 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,48 +1,48 @@
|
|
|
1
|
-
import { resetComponent as
|
|
2
|
-
import { genComponentStyleHook as
|
|
1
|
+
import { resetComponent as o } from "../../style/index.mjs";
|
|
2
|
+
import { genComponentStyleHook as i } from "../../utils/cssinjs/index.mjs";
|
|
3
3
|
import { genPopoverStyle as t } from "./search-form.mjs";
|
|
4
|
-
const
|
|
5
|
-
const { componentCls:
|
|
4
|
+
const l = (r) => {
|
|
5
|
+
const { componentCls: e } = r, a = r.calc("100%").div(r.searchFormSorterCountPerRow).equal();
|
|
6
6
|
return {
|
|
7
|
-
[
|
|
8
|
-
[`${
|
|
7
|
+
[e]: {
|
|
8
|
+
[`${e}-content`]: {
|
|
9
9
|
width: r.searchFormSorterWidth
|
|
10
10
|
},
|
|
11
|
-
[`${
|
|
11
|
+
[`${e}-header`]: {
|
|
12
12
|
padding: `${r.spaceXL} ${r.spaceXL} 0px`,
|
|
13
13
|
"&-title": {
|
|
14
|
-
...
|
|
15
|
-
color: r.
|
|
14
|
+
...o(r),
|
|
15
|
+
color: r.textColor1,
|
|
16
16
|
fontWeight: 700,
|
|
17
17
|
display: "inline-block",
|
|
18
18
|
paddingBottom: r.spaceXS
|
|
19
19
|
},
|
|
20
20
|
"&-desc": {
|
|
21
|
-
...
|
|
21
|
+
...o(r),
|
|
22
22
|
color: r.textColor3
|
|
23
23
|
},
|
|
24
24
|
"&-action-wrapper": {
|
|
25
25
|
padding: r.space,
|
|
26
|
-
margin:
|
|
26
|
+
margin: r.calc(-1).mul(r.space).equal(),
|
|
27
27
|
cursor: "pointer"
|
|
28
28
|
},
|
|
29
29
|
"&-reset-btn": {
|
|
30
|
-
...
|
|
30
|
+
...o(r),
|
|
31
31
|
color: r.colorLink
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
|
-
[`${
|
|
34
|
+
[`${e}-sorter-wrapper`]: {
|
|
35
35
|
display: "flex",
|
|
36
36
|
flexDirection: "row",
|
|
37
37
|
flexWrap: "wrap",
|
|
38
|
-
marginInlineStart:
|
|
39
|
-
marginInlineEnd:
|
|
38
|
+
marginInlineStart: r.calc(r.searchFormSorterItemGap).div(-2).equal(),
|
|
39
|
+
marginInlineEnd: r.calc(r.searchFormSorterItemGap).div(-2).equal(),
|
|
40
40
|
rowGap: r.searchFormSorterItemGap
|
|
41
41
|
},
|
|
42
|
-
[`${
|
|
43
|
-
flex:
|
|
44
|
-
maxWidth:
|
|
45
|
-
paddingInline:
|
|
42
|
+
[`${e}-sorter-item`]: {
|
|
43
|
+
flex: `0 0 ${a}`,
|
|
44
|
+
maxWidth: a,
|
|
45
|
+
paddingInline: r.calc(r.searchFormSorterItemGap).div(2).equal(),
|
|
46
46
|
"> div": {
|
|
47
47
|
border: `1px solid ${r.colorBg1}`,
|
|
48
48
|
borderRadius: r.borderRadius,
|
|
@@ -62,10 +62,10 @@ const i = (r) => {
|
|
|
62
62
|
display: "none"
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
|
-
[`${
|
|
66
|
-
...
|
|
65
|
+
[`${e}-sorter-item-text`]: {
|
|
66
|
+
...o(r),
|
|
67
67
|
paddingInlineStart: r.spaceXS,
|
|
68
|
-
color: r.
|
|
68
|
+
color: r.textColor1,
|
|
69
69
|
maxWidth: "100%",
|
|
70
70
|
whiteSpace: "nowrap",
|
|
71
71
|
overflow: "hidden",
|
|
@@ -74,15 +74,19 @@ const i = (r) => {
|
|
|
74
74
|
},
|
|
75
75
|
...t(r)
|
|
76
76
|
};
|
|
77
|
-
},
|
|
77
|
+
}, d = i(
|
|
78
78
|
"ApForm.SearchFormSorter",
|
|
79
|
-
(r) => [
|
|
79
|
+
(r) => [l(r)],
|
|
80
80
|
{
|
|
81
81
|
searchFormSorterWidth: 560,
|
|
82
|
-
searchFormSorterItemGap: 8
|
|
82
|
+
searchFormSorterItemGap: 8,
|
|
83
|
+
searchFormSorterCountPerRow: 3
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
skipUnit: ["searchFormSorterCountPerRow"]
|
|
83
87
|
}
|
|
84
88
|
);
|
|
85
89
|
export {
|
|
86
|
-
|
|
87
|
-
|
|
90
|
+
d as default,
|
|
91
|
+
l as genSearchFormSorter
|
|
88
92
|
};
|
|
@@ -12,6 +12,10 @@ export type ApFormToken = {
|
|
|
12
12
|
* 对话框表单底部Footer区域边距
|
|
13
13
|
*/
|
|
14
14
|
apFormModalFooterPadding: string | number;
|
|
15
|
+
/**
|
|
16
|
+
* 对话框表单底部Footer上边框
|
|
17
|
+
*/
|
|
18
|
+
apFormModalFooterBorderTop: string;
|
|
15
19
|
/**
|
|
16
20
|
* 关闭按钮的尺寸
|
|
17
21
|
*/
|
|
@@ -24,4 +28,8 @@ export type ApFormToken = {
|
|
|
24
28
|
* 查询表单排序元素间距
|
|
25
29
|
*/
|
|
26
30
|
searchFormSorterItemGap: number;
|
|
31
|
+
/**
|
|
32
|
+
* 查询表单排序每一行显示的元素
|
|
33
|
+
*/
|
|
34
|
+
searchFormSorterCountPerRow: number;
|
|
27
35
|
};
|
|
@@ -139,13 +139,13 @@ const g = (e) => {
|
|
|
139
139
|
backgroundColor: "var(--vxe-ui-loading-background-color)"
|
|
140
140
|
},
|
|
141
141
|
[`${i}-pagination-count-text`]: {
|
|
142
|
-
color: e.
|
|
142
|
+
color: e.textColor1
|
|
143
143
|
},
|
|
144
144
|
[`${i}-pagination--total-right`]: {
|
|
145
145
|
paddingInlineStart: "12px"
|
|
146
146
|
},
|
|
147
147
|
[`${i}-pagination-total-wrapper`]: {
|
|
148
|
-
color: e.
|
|
148
|
+
color: e.textColor2
|
|
149
149
|
},
|
|
150
150
|
// ApGrid中表格表头的样式
|
|
151
151
|
[`${i}-table-header`]: {
|
|
@@ -203,7 +203,7 @@ const g = (e) => {
|
|
|
203
203
|
},
|
|
204
204
|
"div.vxe-cell--tree-btn > i": {
|
|
205
205
|
fontSize: e.fontSizeSM,
|
|
206
|
-
color: e.
|
|
206
|
+
color: e.textColor1
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
}
|
|
@@ -51,7 +51,7 @@ const o = (t) => {
|
|
|
51
51
|
marginTop: "4px"
|
|
52
52
|
},
|
|
53
53
|
".ant-statistic-title": {
|
|
54
|
-
color: t.
|
|
54
|
+
color: t.textColor2,
|
|
55
55
|
fontSize: t.fontSize,
|
|
56
56
|
lineHeight: t.lineHeight,
|
|
57
57
|
marginBlockEnd: "8px"
|
|
@@ -94,7 +94,7 @@ const o = (t) => {
|
|
|
94
94
|
fontWeight: "500"
|
|
95
95
|
},
|
|
96
96
|
".ant-statistic-content": {
|
|
97
|
-
color: t.
|
|
97
|
+
color: t.textColor1,
|
|
98
98
|
fontSize: t.fontSize,
|
|
99
99
|
lineHeight: t.lineHeight,
|
|
100
100
|
fontWeight: "500"
|
|
@@ -111,7 +111,7 @@ const o = (t) => {
|
|
|
111
111
|
fontWeight: "500"
|
|
112
112
|
},
|
|
113
113
|
".ant-statistic-content": {
|
|
114
|
-
color: t.
|
|
114
|
+
color: t.textColor1,
|
|
115
115
|
fontSize: t.fontSize,
|
|
116
116
|
lineHeight: t.lineHeight,
|
|
117
117
|
fontWeight: "500"
|
|
@@ -12,7 +12,7 @@ const r = {
|
|
|
12
12
|
apProCardTooltipColor: "#8896b0",
|
|
13
13
|
apProCardHeaderTitleFontSize: "12px",
|
|
14
14
|
apProCardHeaderTitleFontColor: "#182948",
|
|
15
|
-
apProCardAreaColor: "#
|
|
15
|
+
apProCardAreaColor: "#f7f8fa",
|
|
16
16
|
apProCardSplitLineHeight: "100%",
|
|
17
17
|
apProCardDividerLineHeight: "60%"
|
|
18
18
|
};
|
|
@@ -126,13 +126,13 @@ const r = (t) => ({
|
|
|
126
126
|
marginBlockEnd: 0
|
|
127
127
|
},
|
|
128
128
|
"&-pagination-count-text": {
|
|
129
|
-
color: t.
|
|
129
|
+
color: t.textColor1
|
|
130
130
|
},
|
|
131
131
|
"&-pagination--total-right": {
|
|
132
132
|
paddingLeft: "12px"
|
|
133
133
|
},
|
|
134
134
|
"&-pagination-total-wrapper": {
|
|
135
|
-
color: t.
|
|
135
|
+
color: t.textColor2
|
|
136
136
|
},
|
|
137
137
|
// ApTable的header区域
|
|
138
138
|
[`${a}-header`]: {
|
|
@@ -16,7 +16,7 @@ const r = (e) => {
|
|
|
16
16
|
[`.${l}-ap-grid-table-header__title`]: {
|
|
17
17
|
...n(e),
|
|
18
18
|
fontWeight: "normal",
|
|
19
|
-
color: e.
|
|
19
|
+
color: e.textColor1
|
|
20
20
|
},
|
|
21
21
|
[`.${l}-ag-grid-table-header__title`]: {
|
|
22
22
|
...n(e)
|
|
@@ -169,7 +169,7 @@ const r = (e) => {
|
|
|
169
169
|
"&-title": {
|
|
170
170
|
...i(e),
|
|
171
171
|
fontWeight: "bold",
|
|
172
|
-
color: e.
|
|
172
|
+
color: e.textColor1
|
|
173
173
|
}
|
|
174
174
|
},
|
|
175
175
|
"&-content": {
|
|
@@ -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
|
};
|