@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,7 +1,7 @@
|
|
|
1
|
-
const a = (
|
|
2
|
-
const { componentCls:
|
|
1
|
+
const a = (l) => {
|
|
2
|
+
const { componentCls: o } = l;
|
|
3
3
|
return {
|
|
4
|
-
[o]: {
|
|
4
|
+
[`${o}-multiple-file`]: {
|
|
5
5
|
".multiple-file-context": {
|
|
6
6
|
display: "flex",
|
|
7
7
|
alignItems: "center",
|
|
@@ -10,22 +10,22 @@ const a = (t) => {
|
|
|
10
10
|
alignItems: "center",
|
|
11
11
|
padding: "7px 12px",
|
|
12
12
|
transition: "all 0.3s",
|
|
13
|
-
border:
|
|
13
|
+
border: `1px solid ${l.borderColorBase}`,
|
|
14
14
|
borderRadius: "4px",
|
|
15
|
-
color:
|
|
15
|
+
color: l.textColor1,
|
|
16
16
|
"&:hover": {
|
|
17
|
-
borderColor:
|
|
18
|
-
color:
|
|
17
|
+
borderColor: l.colorPrimary,
|
|
18
|
+
color: l.colorPrimary
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
".sub-title": {
|
|
22
22
|
paddingLeft: "16px",
|
|
23
|
-
color:
|
|
24
|
-
fontSize:
|
|
23
|
+
color: l.textColor3,
|
|
24
|
+
fontSize: l.fontSize
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
".ant-upload-wrapper .ant-upload-list .ant-upload-list-item:hover": {
|
|
28
|
-
backgroundColor:
|
|
28
|
+
backgroundColor: l.colorBgLayout,
|
|
29
29
|
".ant-upload-list-item-actions .ant-upload-list-item-action:focus": {
|
|
30
30
|
opacity: 1
|
|
31
31
|
}
|
|
@@ -39,7 +39,7 @@ const a = (t) => {
|
|
|
39
39
|
opacity: 0
|
|
40
40
|
},
|
|
41
41
|
".ant-upload-text-icon": {
|
|
42
|
-
color:
|
|
42
|
+
color: l.textColor4
|
|
43
43
|
},
|
|
44
44
|
".ant-upload-wrapper .ant-upload-list .ant-upload-list-item-error": {
|
|
45
45
|
".ant-upload-list-item-name": {
|
|
@@ -53,37 +53,10 @@ const a = (t) => {
|
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
".ant-upload-list-item-done": {
|
|
56
|
-
color:
|
|
56
|
+
color: l.colorLink
|
|
57
57
|
},
|
|
58
58
|
".ant-upload-list-item-undefined": {
|
|
59
|
-
color:
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
[`${o}-admin`]: {
|
|
63
|
-
".multiple-file-context": {
|
|
64
|
-
".file-btn": {
|
|
65
|
-
border: "1px solid #d9d9d9",
|
|
66
|
-
color: "#333333",
|
|
67
|
-
"&:hover": {
|
|
68
|
-
borderColor: "#34b77c",
|
|
69
|
-
color: "#34b77c"
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
".sub-title": {
|
|
73
|
-
color: "#999"
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
".ant-upload-wrapper .ant-upload-list .ant-upload-list-item:hover": {
|
|
77
|
-
background: "#fafafa"
|
|
78
|
-
},
|
|
79
|
-
".ant-upload-text-icon": {
|
|
80
|
-
color: "#bfbfbf"
|
|
81
|
-
},
|
|
82
|
-
".ant-upload-list-item-done": {
|
|
83
|
-
color: "#1890ff"
|
|
84
|
-
},
|
|
85
|
-
".ant-upload-list-item-undefined": {
|
|
86
|
-
color: "#1890ff"
|
|
59
|
+
color: l.colorLink
|
|
87
60
|
}
|
|
88
61
|
}
|
|
89
62
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const
|
|
2
|
-
const { componentCls:
|
|
1
|
+
const r = (t) => {
|
|
2
|
+
const { componentCls: e } = t;
|
|
3
3
|
return {
|
|
4
|
-
[
|
|
4
|
+
[`${e}-picture`]: {
|
|
5
5
|
".picture-context": {
|
|
6
6
|
display: "grid",
|
|
7
7
|
gap: "16px",
|
|
@@ -15,23 +15,23 @@ const i = (e) => {
|
|
|
15
15
|
width: "100px",
|
|
16
16
|
overflow: "hidden",
|
|
17
17
|
transition: "all 0.2s",
|
|
18
|
-
border:
|
|
18
|
+
border: `1px dashed ${t.borderColorBase}`,
|
|
19
19
|
borderRadius: "4px",
|
|
20
|
-
background:
|
|
21
|
-
color:
|
|
20
|
+
background: t.colorBgLayout,
|
|
21
|
+
color: t.textColor4,
|
|
22
22
|
fontSize: "16px",
|
|
23
23
|
cursor: "pointer",
|
|
24
24
|
aspectRatio: "1 / 1",
|
|
25
|
-
"& > * + *": { marginTop: "4px", fontSize:
|
|
25
|
+
"& > * + *": { marginTop: "4px", fontSize: t.fontSize },
|
|
26
26
|
"&:hover": {
|
|
27
|
-
border:
|
|
27
|
+
border: `1px dashed ${t.colorPrimary}`
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
".picture-item": {
|
|
31
31
|
width: "100px",
|
|
32
32
|
padding: "8px",
|
|
33
33
|
overflow: "hidden",
|
|
34
|
-
border:
|
|
34
|
+
border: `1px solid ${t.borderColorBase}`,
|
|
35
35
|
borderRadius: "4px",
|
|
36
36
|
background: "#fff",
|
|
37
37
|
aspectRatio: "1 / 1",
|
|
@@ -58,7 +58,7 @@ const i = (e) => {
|
|
|
58
58
|
borderRadius: "2px",
|
|
59
59
|
background: "rgb(0 0 0 / 50%)",
|
|
60
60
|
color: "#fff",
|
|
61
|
-
fontSize:
|
|
61
|
+
fontSize: t.fontSize,
|
|
62
62
|
".picture-item-close": {
|
|
63
63
|
display: "flex",
|
|
64
64
|
position: "absolute",
|
|
@@ -91,30 +91,12 @@ const i = (e) => {
|
|
|
91
91
|
},
|
|
92
92
|
".picture-title": {
|
|
93
93
|
marginTop: "8px",
|
|
94
|
-
color:
|
|
94
|
+
color: t.textColor3,
|
|
95
95
|
fontSize: "12px"
|
|
96
96
|
}
|
|
97
|
-
},
|
|
98
|
-
[`${t}-admin`]: {
|
|
99
|
-
".picture-context": {
|
|
100
|
-
".picture-upload": {
|
|
101
|
-
border: "1px dashed #d9d9d9",
|
|
102
|
-
background: "#fafafa",
|
|
103
|
-
color: "#bfbfbf",
|
|
104
|
-
"&:hover": {
|
|
105
|
-
border: "1px dashed #34b77c"
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
".picture-item": {
|
|
109
|
-
border: "1px solid #d9d9d9"
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
".picture-title": {
|
|
113
|
-
color: "#999"
|
|
114
|
-
}
|
|
115
97
|
}
|
|
116
98
|
};
|
|
117
99
|
};
|
|
118
100
|
export {
|
|
119
|
-
|
|
101
|
+
r as pictureStyle
|
|
120
102
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const r = (e) => {
|
|
2
2
|
const { componentCls: i } = e, t = `${i}-single-file`;
|
|
3
3
|
return {
|
|
4
4
|
[t]: {
|
|
@@ -9,7 +9,7 @@ const n = (e) => {
|
|
|
9
9
|
height: "200px",
|
|
10
10
|
overflow: "hidden",
|
|
11
11
|
transition: "all 0.3s",
|
|
12
|
-
border:
|
|
12
|
+
border: `1px dashed ${e.borderColorBase}`,
|
|
13
13
|
borderRadius: "4px",
|
|
14
14
|
background: "#f2f6f9",
|
|
15
15
|
userSelect: "none",
|
|
@@ -26,13 +26,13 @@ const n = (e) => {
|
|
|
26
26
|
},
|
|
27
27
|
".state-un-title": {
|
|
28
28
|
marginTop: "10px",
|
|
29
|
-
color:
|
|
29
|
+
color: e.textColor1,
|
|
30
30
|
fontSize: e.fontSizeLG,
|
|
31
31
|
lineHeight: e.lineHeightLG
|
|
32
32
|
},
|
|
33
33
|
".state-un-subtitle": {
|
|
34
34
|
marginTop: "4px",
|
|
35
|
-
color:
|
|
35
|
+
color: e.textColor4,
|
|
36
36
|
fontSize: "12px",
|
|
37
37
|
lineHeight: "18px"
|
|
38
38
|
}
|
|
@@ -89,20 +89,9 @@ const n = (e) => {
|
|
|
89
89
|
border: "1px dashed #0070ff",
|
|
90
90
|
background: "rgb(0 112 255 / 10%)"
|
|
91
91
|
}
|
|
92
|
-
},
|
|
93
|
-
[`${t}-admin`]: {
|
|
94
|
-
border: "1px dashed #D9D9D9",
|
|
95
|
-
".state-un": {
|
|
96
|
-
".state-un-title": {
|
|
97
|
-
color: "#333"
|
|
98
|
-
},
|
|
99
|
-
".state-un-subtitle": {
|
|
100
|
-
color: "#BFBFBF"
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
92
|
}
|
|
104
93
|
};
|
|
105
94
|
};
|
|
106
95
|
export {
|
|
107
|
-
|
|
96
|
+
r as singleFileStyle
|
|
108
97
|
};
|
|
@@ -77,7 +77,7 @@ export interface AgGridSelectModalProps<RowType = any> extends AgGridModalBasicP
|
|
|
77
77
|
/** 设置是否是复杂布局 */
|
|
78
78
|
modalLayout?: ModalLayoutConfig<RowType>;
|
|
79
79
|
/** ag-grid 额外配置 */
|
|
80
|
-
gridProps?: Omit<AgGridProps<RowType>, '
|
|
80
|
+
gridProps?: Omit<AgGridProps<RowType>, 'rowSelection' | 'rowKey'>;
|
|
81
81
|
}
|
|
82
82
|
export interface SelectModalReturnType<T = any> {
|
|
83
83
|
/** 打开弹框 */
|
|
@@ -7,13 +7,17 @@ declare function __VLS_template(): {
|
|
|
7
7
|
slots: {
|
|
8
8
|
default?(_: {}): any;
|
|
9
9
|
};
|
|
10
|
-
refs: {
|
|
10
|
+
refs: {
|
|
11
|
+
wrapperContainer: HTMLDivElement;
|
|
12
|
+
};
|
|
11
13
|
rootEl: HTMLDivElement;
|
|
12
14
|
};
|
|
13
15
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
16
|
declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
17
|
rowHeight: number;
|
|
16
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
18
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
19
|
+
wrapperContainer: HTMLDivElement;
|
|
20
|
+
}, HTMLDivElement>;
|
|
17
21
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
22
|
export default _default;
|
|
19
23
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,25 +1,42 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { useAgGridModalInject as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as p, useTemplateRef as f, computed as g, ref as h, watch as d, onMounted as m, createElementBlock as H, openBlock as v, normalizeStyle as _, unref as y, renderSlot as w } from "vue";
|
|
2
|
+
import { SMALL_HEIGHT as l, LARGER_HEIGHT as S } from "../constants.mjs";
|
|
3
|
+
import { useAgGridModalInject as L } from "../hooks/use-ag-grid-instance.mjs";
|
|
4
|
+
const G = /* @__PURE__ */ p({
|
|
5
5
|
__name: "index",
|
|
6
6
|
props: {
|
|
7
|
-
rowHeight: { default:
|
|
7
|
+
rowHeight: { default: 32 }
|
|
8
8
|
},
|
|
9
|
-
setup(
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
setup(c) {
|
|
10
|
+
const s = c, t = f("wrapperContainer"), u = L(), r = g(
|
|
11
|
+
() => u?.dataSourceLength?.value || 0
|
|
12
|
+
), a = h(l), i = () => {
|
|
13
|
+
const e = t.value?.clientHeight, o = t.value?.querySelector(
|
|
14
|
+
".ag-body.ag-layout-normal"
|
|
15
|
+
)?.clientHeight;
|
|
16
|
+
let n = 0;
|
|
17
|
+
!e || !o ? n = 0 : n = e - o, r.value * s.rowHeight > 480 - n && (a.value = S);
|
|
18
|
+
};
|
|
19
|
+
return d(
|
|
20
|
+
() => r.value,
|
|
21
|
+
() => {
|
|
22
|
+
i();
|
|
23
|
+
}
|
|
24
|
+
), m(() => {
|
|
25
|
+
i();
|
|
26
|
+
}), (e, o) => (v(), H("div", {
|
|
27
|
+
ref_key: "wrapperContainer",
|
|
28
|
+
ref: t,
|
|
29
|
+
style: _({
|
|
30
|
+
minHeight: y(l),
|
|
14
31
|
height: a.value,
|
|
15
32
|
display: "flex",
|
|
16
33
|
flexDirection: "column"
|
|
17
34
|
})
|
|
18
35
|
}, [
|
|
19
|
-
|
|
36
|
+
w(e.$slots, "default")
|
|
20
37
|
], 4));
|
|
21
38
|
}
|
|
22
39
|
});
|
|
23
40
|
export {
|
|
24
|
-
|
|
41
|
+
G as default
|
|
25
42
|
};
|
|
@@ -1,71 +1,74 @@
|
|
|
1
|
-
import { defineComponent as W, ref as
|
|
1
|
+
import { defineComponent as W, ref as k, useSlots as _, computed as o, cloneVNode as j, toRaw as h, unref as K, createVNode as t, createTextVNode as R } from "vue";
|
|
2
2
|
import { Tooltip as B, Popover as G } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../config-provider/index.mjs";
|
|
4
4
|
import { ApAttachmentProps as H } from "./constans.mjs";
|
|
5
|
-
import { getHexWithOpacity as
|
|
6
|
-
import { useOssInit as
|
|
7
|
-
import { debounce as
|
|
5
|
+
import { getHexWithOpacity as M, getFileInfo as F } 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
8
|
import { LoadingOutlined as g } from "@ant-design/icons-vue";
|
|
9
|
-
import { warning as
|
|
10
|
-
import
|
|
9
|
+
import { warning as J } from "../../utils/warning.mjs";
|
|
10
|
+
import Q from "./style/index.mjs";
|
|
11
|
+
import { useToken as X } from "../../config-provider/hooks/use-token.mjs";
|
|
11
12
|
import { useNamespace as Y } from "../../config-provider/hooks/use-namespace.mjs";
|
|
12
|
-
import { useGlobalConfig as
|
|
13
|
+
import { useGlobalConfig as T } from "../../config-provider/hooks/use-global-config.mjs";
|
|
13
14
|
import { useLocale as Z } from "../../config-provider/hooks/use-locale.mjs";
|
|
14
|
-
const
|
|
15
|
+
const fe = /* @__PURE__ */ W({
|
|
15
16
|
name: "ApAttachment",
|
|
16
17
|
props: H(),
|
|
17
18
|
setup(e, {
|
|
18
|
-
emit:
|
|
19
|
+
emit: p
|
|
19
20
|
}) {
|
|
20
21
|
const {
|
|
21
|
-
b:
|
|
22
|
+
b: x,
|
|
22
23
|
e: a
|
|
23
|
-
} = Y("ap-attachment"), L =
|
|
24
|
-
|
|
24
|
+
} = Y("ap-attachment"), L = Q("ap-attachment"), C = T("apUpload"), N = T("downloadCenterTriggerConfig"), {
|
|
25
|
+
token: w
|
|
26
|
+
} = X(), {
|
|
27
|
+
lang: O,
|
|
25
28
|
t: m
|
|
26
|
-
} = Z(), i =
|
|
27
|
-
"--download-main-color":
|
|
28
|
-
"--download-main-color-opacity":
|
|
29
|
-
})),
|
|
29
|
+
} = Z(), i = k(!1), c = k(""), d = _(), P = o(() => O.value === "zh-cn" ? "zh_CN" : "en_US"), s = o(() => e.needName ?? C?.value?.needName), f = o(() => e.attachmentList.length === 1), y = o(() => s.value ? e.attachmentList.length > 0 && s.value && s.value?.nameKey ? e.attachmentList[0][s.value.nameKey] : "" : e.attachmentList.length > 0 ? e.attachmentList[0].fileName : ""), I = o(() => f.value ? y.value : m("ap.apAttachment.downloadall")), A = o(() => ({
|
|
30
|
+
"--download-main-color": w.value?.colorLink,
|
|
31
|
+
"--download-main-color-opacity": M(w.value?.colorLink, 0.6)
|
|
32
|
+
})), S = o(() => e.getOssAccess || C.value?.getOssAccess), V = o(() => {
|
|
30
33
|
const l = d.default ? d.default()[0] : null;
|
|
31
34
|
return l ? j(l, {
|
|
32
35
|
style: {
|
|
33
36
|
"font-size": "16px"
|
|
34
37
|
}
|
|
35
38
|
}) : null;
|
|
36
|
-
}), v =
|
|
39
|
+
}), v = D(async (l, r) => {
|
|
37
40
|
if (!e.disabled) {
|
|
38
|
-
i.value = !0,
|
|
41
|
+
i.value = !0, r && (c.value = r);
|
|
39
42
|
try {
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
42
|
-
const
|
|
43
|
+
const n = E(h(l)) ? h(l) : [h(l)];
|
|
44
|
+
if (N.value?.trigger) {
|
|
45
|
+
const u = F(s.value, n).map((b) => ({
|
|
43
46
|
objectName: b.path,
|
|
44
47
|
fileName: b.fileName
|
|
45
48
|
}));
|
|
46
|
-
|
|
49
|
+
N.value?.trigger(u), p("downloadCallback", u);
|
|
47
50
|
} else {
|
|
48
|
-
const
|
|
49
|
-
|
|
51
|
+
const u = await (await q(S.value, K(P))).downloadFile(F(e.needName, n));
|
|
52
|
+
p("downloadCallback", u);
|
|
50
53
|
}
|
|
51
|
-
} catch (
|
|
52
|
-
|
|
54
|
+
} catch (n) {
|
|
55
|
+
J(!1, n);
|
|
53
56
|
} finally {
|
|
54
57
|
i.value = !1, c.value = "";
|
|
55
58
|
}
|
|
56
59
|
}
|
|
57
|
-
}, 500),
|
|
60
|
+
}, 500), z = (l) => l && l.length > 0 ? t("ul", {
|
|
58
61
|
class: [a("file-list"), L.value],
|
|
59
|
-
style:
|
|
60
|
-
}, [l.map((
|
|
61
|
-
key:
|
|
62
|
+
style: A.value
|
|
63
|
+
}, [l.map((r, n) => t("li", {
|
|
64
|
+
key: n,
|
|
62
65
|
class: [a("file-item")],
|
|
63
|
-
onClick: () => v(
|
|
64
|
-
}, [i.value && c.value ===
|
|
66
|
+
onClick: () => v(r, n + 1)
|
|
67
|
+
}, [i.value && c.value === n + 1 ? t("span", {
|
|
65
68
|
class: [a("spin")]
|
|
66
69
|
}, [t(g, {
|
|
67
70
|
spin: !0
|
|
68
|
-
}, null)]) : null,
|
|
71
|
+
}, null)]) : null, r.fileName])), t("li", {
|
|
69
72
|
class: [a("download-all")],
|
|
70
73
|
onClick: () => v(e.attachmentList, "all")
|
|
71
74
|
}, [i.value && c.value === "all" ? t("span", {
|
|
@@ -74,10 +77,10 @@ const de = /* @__PURE__ */ W({
|
|
|
74
77
|
spin: !0
|
|
75
78
|
}, null)]) : null, m("ap.apAttachment.downloadall")])]) : null;
|
|
76
79
|
return () => e.attachmentList?.length > 0 && t("div", {
|
|
77
|
-
class: [
|
|
78
|
-
style: [
|
|
80
|
+
class: [x(), L.value],
|
|
81
|
+
style: [A.value]
|
|
79
82
|
}, [t(B, {
|
|
80
|
-
title:
|
|
83
|
+
title: I.value,
|
|
81
84
|
placement: e.textToolTipPlacement,
|
|
82
85
|
color: e.toolTipBgColor
|
|
83
86
|
}, {
|
|
@@ -90,14 +93,14 @@ const de = /* @__PURE__ */ W({
|
|
|
90
93
|
spin: !0
|
|
91
94
|
}, null)]) : null, d.default ? t("div", {
|
|
92
95
|
class: [a("text-render")]
|
|
93
|
-
}, [
|
|
96
|
+
}, [V.value, R(" ")]) : null, t("div", {
|
|
94
97
|
class: [a("text-inner")],
|
|
95
98
|
style: {
|
|
96
99
|
"max-width": e.maxWidth ? e.maxWidth + "px" : "auto"
|
|
97
100
|
}
|
|
98
101
|
}, [y.value])])]
|
|
99
102
|
}), t(G, {
|
|
100
|
-
content:
|
|
103
|
+
content: z(e.attachmentList),
|
|
101
104
|
placement: e.fileMorePopoverPlacement,
|
|
102
105
|
color: "#fff"
|
|
103
106
|
}, {
|
|
@@ -108,5 +111,5 @@ const de = /* @__PURE__ */ W({
|
|
|
108
111
|
}
|
|
109
112
|
});
|
|
110
113
|
export {
|
|
111
|
-
|
|
114
|
+
fe as default
|
|
112
115
|
};
|