Commit a1d16ba5 by 前端

优化界面

1 parent 7cce9705
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<!-- 上传 开始 --> <!-- 上传 开始 -->
<el-upload class="el_upload" v-if="showUpload()" :action="uploadUrl" list-type="picture-card" :accept="acceptFile" :show-file-list="false" :on-change="onChange" :http-request="uploadRequest"> <el-upload class="el_upload" v-if="showUpload()" :action="uploadUrl" list-type="picture-card" :accept="acceptFile" :show-file-list="false" :on-change="onChange" :http-request="uploadRequest">
<i class="el-icon-plus"></i> <i class="el-icon-upload2"></i>
</el-upload> </el-upload>
<!-- 上传 end --> <!-- 上传 end -->
......
...@@ -72,6 +72,7 @@ export default { ...@@ -72,6 +72,7 @@ export default {
readStatus: "", readStatus: "",
acceptFile: ".jpg,.png", acceptFile: ".jpg,.png",
previewList: [], previewList: [],
idx:0
}; };
}, },
watch: { watch: {
...@@ -83,6 +84,7 @@ export default { ...@@ -83,6 +84,7 @@ export default {
// } // }
// console.log('666666666') // console.log('666666666')
}, },
immediate: true,
}, },
status: { status: {
handler: function (n, o) { handler: function (n, o) {
...@@ -90,6 +92,12 @@ export default { ...@@ -90,6 +92,12 @@ export default {
}, },
immediate: true, immediate: true,
}, },
nameIndex:{
handler:function(n){
this.idx = n
},
immediate:true
}
}, },
mounted() {}, mounted() {},
methods: { methods: {
...@@ -154,10 +162,10 @@ export default { ...@@ -154,10 +162,10 @@ export default {
if (response.returnCode == 0) { if (response.returnCode == 0) {
_this.imgList.push({ _this.imgList.push({
path: response.data, path: response.data,
name: `照片${_this.nameIndex + 1}`, name: `照片${_this.idx + 1}`,
}); });
_this.previewList.push(res.data); _this.previewList.push(res.data);
_this.nameIndex += 1; _this.idx += 1;
console.log(_this.imgList); console.log(_this.imgList);
// //
//this.$emit("change", response.data); //this.$emit("change", response.data);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!