From 83b658e79f3494b67158a1485a848fc77727d1c7 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 19 八月 2024 10:49:52 +0800
Subject: [PATCH] 最新版本
---
admin/src/components/common/UploadImage.vue | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/admin/src/components/common/UploadImage.vue b/admin/src/components/common/UploadImage.vue
index 67ccb8a..c0bb2bb 100644
--- a/admin/src/components/common/UploadImage.vue
+++ b/admin/src/components/common/UploadImage.vue
@@ -33,15 +33,15 @@
</span>
</div>
</el-upload>
- <el-image-viewer
- v-if="showViewer"
+ <el-image-viewer
+ v-if="showViewer"
:on-close="closeViewer"
:initialIndex="tempIndex"
:url-list="srcList"
:z-index="3000"
/>
</div>
-
+
</template>
<script>
@@ -59,8 +59,8 @@
},
data() {
return {
- uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/public/uploadLocal',
-
+ uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/visitsAdmin/cloudService/public/uploadLocal',
+
realList: [],
srcList: [],
tempIndex: 0,
@@ -76,20 +76,20 @@
this.srcList = []
}
}
-
+
}
},
methods: {
beforeUpload(file) {
-
+
this.$emit('beginUpload')
return true
},
// 涓婁紶鍥剧墖鎴愬姛
- uploadSuccess (res, file, fileList) {
+ uploadSuccess (res, file, fileList) {
// console.log('this.fileList', this.fileList);
// console.log('fileList', fileList);
- this.$emit('endUpload')
+ this.$emit('uploadEnd')
this.realList = fileList
this.srcList.push(res.data.url)
// console.log('file', file);
@@ -106,7 +106,7 @@
}
},
fail (err, file, fileList) {
- this.$emit('endUpload')
+ this.$emit('uploadEnd')
this.$message.error('涓婁紶澶辫触')
},
handlePictureCardPreview(file) {
@@ -127,7 +127,7 @@
this.realList.splice(tempIndex, 1)
this.fileList.splice(tempIndex, 1)
this.srcList.splice(tempIndex, 1)
-
+
},
},
}
--
Gitblit v1.9.3