diff --git a/src/views/modules/communityParty/promotion/components/promotionDialog.vue b/src/views/modules/communityParty/promotion/components/promotionDialog.vue
index 6345c1da6..8a3a47208 100644
--- a/src/views/modules/communityParty/promotion/components/promotionDialog.vue
+++ b/src/views/modules/communityParty/promotion/components/promotionDialog.vue
@@ -17,7 +17,7 @@
-
@@ -162,10 +162,7 @@ export default {
},
onChangeFileList(fileList) {
- this.fileList = fileList.length > 0 ? fileList.map(item => ({
- fileType: '0',
- fileUrl: item.response.data.url
- })) : []; // 当e为空时清空fileList
+ this.fileList = fileList.length > 0 ? fileList : [];
if (fileList.length > 0) {
this.formData.coverPic = fileList[0].response.data.url;
} else {
diff --git a/src/views/modules/plugins/rent/upload-image.vue b/src/views/modules/plugins/rent/upload-image.vue
index 1acb760c1..57ae7a092 100644
--- a/src/views/modules/plugins/rent/upload-image.vue
+++ b/src/views/modules/plugins/rent/upload-image.vue
@@ -1,29 +1,34 @@
-
-
+
-
-
![]()
-
-
-
+
+
+
![]()
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
@@ -54,17 +59,17 @@ export default {
},
watch: {
defaultFileList: {
- handler (newVal) {
+ handler(newVal) {
newVal.forEach(item => {
- item.url = item.fileUrl
+ item.url = item.response.data.url
})
this.fileList = newVal
},
deep: true,
- immediate: true
+ immediate: true
}
},
- data () {
+ data() {
return {
dialogImageUrl: '',
dialogVisible: false,
@@ -72,7 +77,7 @@ export default {
uploadUrl: `${window.SITE_CONFIG['apiURL']}/oss/file/uploadqrcodeV2`,
customerId: localStorage.getItem("customerId"),
fileList: [],
- imageUrls: []
+ imageUrls: [],
}
},
created() {
@@ -94,17 +99,16 @@ export default {
this.dialogImageUrl = file.url
this.dialogVisible = true
} else this.$emit('preview', file)
-
-
+
+
},
beforeImgUpload(file) {
- // console.log(file)
},
handleImgExceed(res) {
console.log(res)
this.$message({
- type: "warning",
- message: `文件数量最多不超过${this.limit}个`,
+ type: "warning",
+ message: `文件数量最多不超过${this.limit}个`,
})
},
handleImgRemove(file) {
@@ -130,16 +134,37 @@ export default {
// min-width: 120px;
// height: 80px;
}
+
/deep/ .el-upload--picture-card {
width: 60px;
height: 60px;
- line-height: 70px;
+ position: relative;
+}
+
+/deep/ .el-icon-plus {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
}
+
/deep/ .el-upload-list--picture-card .el-upload-list__item {
width: 60px;
height: 60px;
}
+
.isDetail ::v-deep .el-upload--picture-card {
- display: none;
+ display: none;
+}
+
+.uploading-container {
+ width: 60px;
+ height: 60px;
+ border: 1px dashed #c0ccda;
+ border-radius: 6px;
+ background-color: rgba(255, 255, 255, 0.3);
+ display: flex;
+ align-items: center;
+ justify-content: center;
}