From 587a747a56f076457f6d9839cbe874b60f6f696c Mon Sep 17 00:00:00 2001 From: Junjie <540245094@qq.com> Date: 星期四, 01 八月 2024 13:40:40 +0800 Subject: [PATCH] # --- zy-asrs-admin/src/views/base/locType/edit.vue | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/zy-asrs-admin/src/views/base/locType/edit.vue b/zy-asrs-admin/src/views/base/locType/edit.vue index 1274ac1..040e925 100644 --- a/zy-asrs-admin/src/views/base/locType/edit.vue +++ b/zy-asrs-admin/src/views/base/locType/edit.vue @@ -67,11 +67,16 @@ } watch(formData, (newVal, oldVal) => { - let contain = JSON.parse(formData.value.contain) - if (contain != null && contain.length > 0) { - locTypeSelected.value = contain; - }else { + if(formData.value.contain == null) { locTypeSelected.value = []; + return + } + + if(formData.value.contain.length == 0) { + locTypeSelected.value = []; + }else { + let contain = JSON.parse(formData.value.contain); + locTypeSelected.value = contain; } }) -- Gitblit v1.9.1