@apexcura/ui-components 0.0.13-Beta64 → 0.0.13-Beta65
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.js +3 -7
- package/dist/index.mjs +3 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -793,7 +793,9 @@ var UploadElement = (props) => {
|
|
|
793
793
|
const [previewImage, setPreviewImage] = (0, import_react23.useState)(null);
|
|
794
794
|
const uploadChange = (fileList) => {
|
|
795
795
|
if (!fileList || fileList.length === 0) return;
|
|
796
|
-
const
|
|
796
|
+
const existingFiles = Array.isArray(props.value) ? props.value : [];
|
|
797
|
+
const newFileList = [...existingFiles];
|
|
798
|
+
console.log(newFileList);
|
|
797
799
|
for (let i = 0; i < fileList.length; i++) {
|
|
798
800
|
const selectedFile = fileList[i];
|
|
799
801
|
const isCorrectFile = ["image/png", "image/jpg", "image/jpeg"].includes(
|
|
@@ -825,11 +827,6 @@ var UploadElement = (props) => {
|
|
|
825
827
|
reader.readAsDataURL(selectedFile);
|
|
826
828
|
newFileList.push(newFile);
|
|
827
829
|
}
|
|
828
|
-
};
|
|
829
|
-
const uploadChange2 = ({ file, fileList }) => {
|
|
830
|
-
const existingFiles = Array.isArray(props.value) ? props.value : [];
|
|
831
|
-
const newFileList = [...existingFiles, ...fileList];
|
|
832
|
-
console.log(newFileList);
|
|
833
830
|
props.onChange && props.onChange({
|
|
834
831
|
name: props.name,
|
|
835
832
|
value: newFileList
|
|
@@ -871,7 +868,6 @@ var UploadElement = (props) => {
|
|
|
871
868
|
maxCount: props.max_count,
|
|
872
869
|
multiple: true,
|
|
873
870
|
fileList: Array.isArray(props.value) ? props.value : [],
|
|
874
|
-
onChange: uploadChange2,
|
|
875
871
|
onPreview: handlePreview,
|
|
876
872
|
showUploadList: true
|
|
877
873
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -737,7 +737,9 @@ var UploadElement = (props) => {
|
|
|
737
737
|
const [previewImage, setPreviewImage] = useState7(null);
|
|
738
738
|
const uploadChange = (fileList) => {
|
|
739
739
|
if (!fileList || fileList.length === 0) return;
|
|
740
|
-
const
|
|
740
|
+
const existingFiles = Array.isArray(props.value) ? props.value : [];
|
|
741
|
+
const newFileList = [...existingFiles];
|
|
742
|
+
console.log(newFileList);
|
|
741
743
|
for (let i = 0; i < fileList.length; i++) {
|
|
742
744
|
const selectedFile = fileList[i];
|
|
743
745
|
const isCorrectFile = ["image/png", "image/jpg", "image/jpeg"].includes(
|
|
@@ -769,11 +771,6 @@ var UploadElement = (props) => {
|
|
|
769
771
|
reader.readAsDataURL(selectedFile);
|
|
770
772
|
newFileList.push(newFile);
|
|
771
773
|
}
|
|
772
|
-
};
|
|
773
|
-
const uploadChange2 = ({ file, fileList }) => {
|
|
774
|
-
const existingFiles = Array.isArray(props.value) ? props.value : [];
|
|
775
|
-
const newFileList = [...existingFiles, ...fileList];
|
|
776
|
-
console.log(newFileList);
|
|
777
774
|
props.onChange && props.onChange({
|
|
778
775
|
name: props.name,
|
|
779
776
|
value: newFileList
|
|
@@ -815,7 +812,6 @@ var UploadElement = (props) => {
|
|
|
815
812
|
maxCount: props.max_count,
|
|
816
813
|
multiple: true,
|
|
817
814
|
fileList: Array.isArray(props.value) ? props.value : [],
|
|
818
|
-
onChange: uploadChange2,
|
|
819
815
|
onPreview: handlePreview,
|
|
820
816
|
showUploadList: true
|
|
821
817
|
},
|