@ecoding/components.antd 0.5.5 → 0.5.7
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.
|
@@ -47,6 +47,9 @@ const MultipleImgUpload = (props) => {
|
|
|
47
47
|
const temp = [];
|
|
48
48
|
newItems && newItems.forEach((item) => {
|
|
49
49
|
if (item.url) {
|
|
50
|
+
// 防止重复拼接
|
|
51
|
+
item.url = domain ? item.url.replace(domain, '') : item.url;
|
|
52
|
+
item.url = domain ? `${domain}${item.url}` : item.url;
|
|
50
53
|
temp.push(item);
|
|
51
54
|
}
|
|
52
55
|
});
|
|
@@ -112,7 +115,11 @@ const MultipleImgUpload = (props) => {
|
|
|
112
115
|
if (!file.url && !file.preview) {
|
|
113
116
|
file.preview = yield getBase64(file.originFileObj);
|
|
114
117
|
}
|
|
115
|
-
|
|
118
|
+
let url;
|
|
119
|
+
if (file.url) {
|
|
120
|
+
url = domain ? file.url.replace(domain, '') : file.url;
|
|
121
|
+
}
|
|
122
|
+
setPreviewImage(url || file.preview);
|
|
116
123
|
setPreviewOpen(true);
|
|
117
124
|
});
|
|
118
125
|
const uploadButton = (React.createElement("button", { style: Object.assign({ border: 0, background: 'none' }, disabled ? { cursor: 'not-allowed', opacity: 0.4 } : {}), type: "button" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecoding/components.antd",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.7",
|
|
4
4
|
"author": "cxc",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"antd": "^6.0.0",
|
|
48
48
|
"axios": "^1.1.2"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "32035c81dce6abb37d4b60b1216d2c0253622455"
|
|
51
51
|
}
|