bug修复
This commit is contained in:
@@ -37,7 +37,7 @@
|
|||||||
<el-table-column label="作物图片" align="center" prop="images" >
|
<el-table-column label="作物图片" align="center" prop="images" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-image
|
<el-image
|
||||||
v-if="scope.row.images[0] != null"
|
v-if="scope.row.images != null && scope.row.images[0] != null"
|
||||||
:src="scope.row.images[0]" :preview-src-list="scope.row.images">
|
:src="scope.row.images[0]" :preview-src-list="scope.row.images">
|
||||||
</el-image>
|
</el-image>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -329,21 +329,16 @@ export default {
|
|||||||
},
|
},
|
||||||
/*判断图片是否存在*/
|
/*判断图片是否存在*/
|
||||||
judgePictureExists(){
|
judgePictureExists(){
|
||||||
if (this.form.id != null) {
|
if (this.form.images == "") {
|
||||||
if (this.form.images == "") {
|
|
||||||
this.form.images = [];
|
this.form.images = [];
|
||||||
}else{
|
}else{
|
||||||
let imgType = typeof(this.form.images);
|
let imagesType = typeof(this.form.images);
|
||||||
if(imgType == "string"){
|
if (imagesType == "string") {
|
||||||
let imgArr = this.form.images.split(",");
|
let imgArr = this.form.images.split(",")
|
||||||
this.form.images = imgArr;
|
this.form.images = imgArr;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return;
|
}
|
||||||
}
|
return;
|
||||||
if (this.form.images == undefined || this.form.images == "") {
|
|
||||||
this.form.images = [];
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
|
|||||||
Reference in New Issue
Block a user