matrix_components 2.0.409 → 2.0.411
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.
|
@@ -58618,7 +58618,12 @@ const useFileUpload = (state, uploadKey = "filesDetail") => {
|
|
|
58618
58618
|
if (!rows.value) {
|
|
58619
58619
|
rows.value = [];
|
|
58620
58620
|
}
|
|
58621
|
-
|
|
58621
|
+
const mergedArray = [...rows.value, ...fileList];
|
|
58622
|
+
const uniqueArray = mergedArray.filter((item, index2, self2) => {
|
|
58623
|
+
const identifier = item.id || item.filePath;
|
|
58624
|
+
return self2.findIndex((i) => (i.id || i.filePath) === identifier) === index2;
|
|
58625
|
+
});
|
|
58626
|
+
rows.value = uniqueArray;
|
|
58622
58627
|
return fileList;
|
|
58623
58628
|
};
|
|
58624
58629
|
const handleRemoveFile = (file, fileList, fieldKey, rows = state.rows) => {
|
|
@@ -58634,6 +58639,7 @@ const useFileUpload = (state, uploadKey = "filesDetail") => {
|
|
|
58634
58639
|
}
|
|
58635
58640
|
fileList.forEach((item) => {
|
|
58636
58641
|
arr.push({
|
|
58642
|
+
...item,
|
|
58637
58643
|
fileName: item.response ? item.response.data.fileName : item.fileName,
|
|
58638
58644
|
filePath: item.response ? item.response.data.filePath : item.filePath,
|
|
58639
58645
|
fileSize: item.response ? item.response.data.fileSize : item.fileSize
|