Browse Source

修改citySelect 单选问题

XueNing 5 months ago
parent
commit
422509389d
1 changed files with 1 additions and 5 deletions
  1. 1 5
      src/components/FsCitySelect/index.vue

+ 1 - 5
src/components/FsCitySelect/index.vue

@@ -74,11 +74,7 @@ getData()
 
 /* 修改modelValue */
 const updateModelValue = (modelValue: any) => {
-  let value = ''
-  if (Array.isArray(modelValue)) {
-    // 多选情况利用set去重
-    value = [...new Set([...modelValue])].join(',')
-  }
+  const value = Array.isArray(modelValue) ? [...new Set([...modelValue])].join(',') : modelValue
   emits('update:modelValue', value)
 }