lu-lowcode-package-form 0.9.3 → 0.9.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lu-lowcode-package-form",
3
- "version": "0.9.3",
3
+ "version": "0.9.5",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^4.8.1",
6
6
  "@testing-library/jest-dom": "^5.17.0",
@@ -70,14 +70,16 @@ const UploadImage = ({ maxCount, value, onChange, ...props }) => {
70
70
  </>
71
71
 
72
72
  );
73
- const handleChange = async ({ fileList: newFileList }) => {
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)
82
+ console.log("oldfile", JSON.parse(JSON.stringify(oldfile)))
81
83
  if (oldfile && oldfile.status != "uploading") {
82
84
  handleFileList.push(oldfile)
83
85
  }
@@ -85,9 +87,6 @@ const UploadImage = ({ maxCount, value, onChange, ...props }) => {
85
87
  if (file.status == "done" && file.response) {
86
88
  file.url = file.response;
87
89
  }
88
- if (!file.url && file.originFileObj)
89
- file.base64 = await getBase64(file.originFileObj)
90
- newFileList[i] = file
91
90
  handleFileList.push(file)
92
91
  }
93
92
  }
@@ -138,7 +137,7 @@ const UploadImage = ({ maxCount, value, onChange, ...props }) => {
138
137
 
139
138
  </div>
140
139
  {file.status == "uploading" && <div className=" fw-full fh-full fflex fitems-center fjustify-center fabsolute ftop-0 fleft-0 "><Spin></Spin></div>}
141
- <img src={file.url || file.base64} alt="Example Image" class="fmax-w-full fmax-h-full fobject-contain " />
140
+ <img src={file.url || file.thumbUrl} alt="Example Image" class="fmax-w-full fmax-h-full fobject-contain " />
142
141
  </div>
143
142
  </>
144
143
  )