lu-lowcode-package-form 0.9.4 → 0.9.6
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/dist/index.cjs.js +63 -63
- package/dist/index.es.js +4822 -4819
- package/package.json +1 -1
- package/src/components/field/upload/upload-image.jsx +4 -6
package/package.json
CHANGED
|
@@ -70,15 +70,16 @@ const UploadImage = ({ maxCount, value, onChange, ...props }) => {
|
|
|
70
70
|
</>
|
|
71
71
|
|
|
72
72
|
);
|
|
73
|
-
const handleChange =
|
|
73
|
+
const handleChange = ({ fileList: newFileList }) => {
|
|
74
74
|
|
|
75
75
|
let handleFileList = []
|
|
76
76
|
|
|
77
|
+
console.log("fileMap.current", JSON.parse(JSON.stringify(fileMap.current)))
|
|
77
78
|
for (let i = 0; i < newFileList.length; i++) {
|
|
78
79
|
var file = newFileList[i];
|
|
79
80
|
file.version = new Date().getTime()
|
|
80
81
|
var oldfile = fileMap.current.find((item) => item.uid === file.uid)
|
|
81
|
-
console.log("oldfile", JSON.parse(JSON.stringify(oldfile)))
|
|
82
|
+
console.log("oldfile", JSON.parse(JSON.stringify(oldfile||{})))
|
|
82
83
|
if (oldfile && oldfile.status != "uploading") {
|
|
83
84
|
handleFileList.push(oldfile)
|
|
84
85
|
}
|
|
@@ -86,9 +87,6 @@ const UploadImage = ({ maxCount, value, onChange, ...props }) => {
|
|
|
86
87
|
if (file.status == "done" && file.response) {
|
|
87
88
|
file.url = file.response;
|
|
88
89
|
}
|
|
89
|
-
if (!file.url && file.originFileObj)
|
|
90
|
-
file.base64 = await getBase64(file.originFileObj)
|
|
91
|
-
newFileList[i] = file
|
|
92
90
|
handleFileList.push(file)
|
|
93
91
|
}
|
|
94
92
|
}
|
|
@@ -139,7 +137,7 @@ const UploadImage = ({ maxCount, value, onChange, ...props }) => {
|
|
|
139
137
|
|
|
140
138
|
</div>
|
|
141
139
|
{file.status == "uploading" && <div className=" fw-full fh-full fflex fitems-center fjustify-center fabsolute ftop-0 fleft-0 "><Spin></Spin></div>}
|
|
142
|
-
<img src={file.url || file.
|
|
140
|
+
<img src={file.url || file.thumbUrl} alt="Example Image" class="fmax-w-full fmax-h-full fobject-contain " />
|
|
143
141
|
</div>
|
|
144
142
|
</>
|
|
145
143
|
)
|