diff --git a/src/views/index.vue b/src/views/index.vue index 4e00129..66bb0d0 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -1555,7 +1555,7 @@ const uploadFiles2 = async (e) => { files.append('files', e.file); const res = await UpdateImage(files) - dialog3Form.fileList.value.push({ + dialog3Form.value.fileList.push({ name: file.name, url: location.href + res.ls[0], }) @@ -1587,7 +1587,7 @@ const handleCameraChange2 = (e) => { UpdateImage({files: [file]}).then(v=>{ const url = v.ls?.[0] - dialog3Form.fileList.value.push({ + dialog3Form.value.fileList.push({ name: file.name, url, }) @@ -1715,10 +1715,11 @@ const uploadFiles = async (e) => { files.append('files', e.file); const res = await UpdateImage(files) - dialog1Form.fileList.value.push({ + dialog1Form.value.fileList.push({ name: file.name, url: location.href + res.ls[0], }) + console.log(dialog1Form.value.fileList) } // 图片放大 const handlePictureCardPreview = (file) => { @@ -1745,7 +1746,7 @@ const handleCameraChange = (e) => { // const url = URL.createObjectURL(file) UpdateImage({files: [file]}).then(v=>{ const url = v.ls?.[0] - dialog1Form.fileList.value.push({ + dialog1Form.value.fileList.push({ name: file.name, url, }) @@ -1939,7 +1940,7 @@ const uploadFiles1 = async (e) => { files.append('files', e.file); const res = await UpdateImage(files) - dialog2Form.fileList.value.push({ + dialog2Form.value.fileList.push({ name: file.name, url: location.href + res.ls[0], }) @@ -1972,7 +1973,7 @@ const handleCameraChange1 = (e) => { UpdateImage({files: [file]}).then(v=>{ const url = v.ls?.[0] - dialog2Form.fileList.value.push({ + dialog2Form.value.fileList.push({ name: file.name, url, }) @@ -2154,7 +2155,7 @@ const uploadFiles3 = async (e) => { files.append('files', e.file); const res = await UpdateImage(files) - dialog4Form.fileList.value.push({ + dialog4Form.value.fileList.push({ name: file.name, url: location.href + res.ls[0], }) @@ -2186,7 +2187,7 @@ const handleCameraChange3 = (e) => { UpdateImage({files: [file]}).then(v=>{ const url = v.ls?.[0] - dialog4Form.fileList.value.push({ + dialog4Form.value.fileList.push({ name: file.name, url, })