From b0b2954311bdbbc492223e7fa4e4fee76481a3bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Tue, 7 Feb 2023 19:55:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BA=91=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E5=88=9B=E5=BB=BA=E5=AE=9E=E4=BE=8B=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=8D=8F=E8=AE=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FormFields/ProtocolSelector/index.vue | 4 ++-- src/views/assets/Cloud/index.vue | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/FormFields/ProtocolSelector/index.vue b/src/components/FormFields/ProtocolSelector/index.vue index c5f5504f2..29685369c 100644 --- a/src/components/FormFields/ProtocolSelector/index.vue +++ b/src/components/FormFields/ProtocolSelector/index.vue @@ -56,7 +56,7 @@ export default { }, props: { value: { - type: [Array], + type: [String, Array], default: () => [] }, title: { @@ -147,7 +147,7 @@ export default { item.port = selected.port }, setDefaultItems(choices) { - if (this.value.length > 0) { + if (this.value instanceof Array && this.value.length > 0) { const protocols = [] this.value.forEach(item => { // 有默认值的情况下,设置为只读或者有id、有setting是平台 diff --git a/src/views/assets/Cloud/index.vue b/src/views/assets/Cloud/index.vue index 61c25fbdb..f8d122096 100644 --- a/src/views/assets/Cloud/index.vue +++ b/src/views/assets/Cloud/index.vue @@ -1,5 +1,5 @@