From e2285febb83a51499ae0ae28fd89b8f301913c51 Mon Sep 17 00:00:00 2001 From: zhanyunjiu <787952492@qq.com> Date: Tue, 23 Aug 2022 17:42:02 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/farm/crop/index.vue | 2 +- src/views/farm/resource/index.vue | 21 ++++++++------------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/views/farm/crop/index.vue b/src/views/farm/crop/index.vue index ee787f0..3607847 100644 --- a/src/views/farm/crop/index.vue +++ b/src/views/farm/crop/index.vue @@ -37,7 +37,7 @@ diff --git a/src/views/farm/resource/index.vue b/src/views/farm/resource/index.vue index 22ccc23..baaf24d 100644 --- a/src/views/farm/resource/index.vue +++ b/src/views/farm/resource/index.vue @@ -329,21 +329,16 @@ export default { }, /*判断图片是否存在*/ judgePictureExists(){ - if (this.form.id != null) { - if (this.form.images == "") { + if (this.form.images == "") { this.form.images = []; - }else{ - let imgType = typeof(this.form.images); - if(imgType == "string"){ - let imgArr = this.form.images.split(","); - this.form.images = imgArr; - } + }else{ + let imagesType = typeof(this.form.images); + if (imagesType == "string") { + let imgArr = this.form.images.split(",") + this.form.images = imgArr; } - return; - } - if (this.form.images == undefined || this.form.images == "") { - this.form.images = []; - } + } + return; }, /** 删除按钮操作 */ handleDelete(row) {