From 46d2d574d02f426522a2b5765d3bea7da52697c7 Mon Sep 17 00:00:00 2001 From: Junjie <540245094@qq.com> Date: 星期五, 12 七月 2024 15:50:01 +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