Explorar o código

限制可选个数

lifanagju_citu hai 11 meses
pai
achega
1a867fe2dd
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/components/industryTypeCard/index.vue

+ 1 - 1
src/components/industryTypeCard/index.vue

@@ -76,7 +76,7 @@ const handleClick = (val) => {
   const isExist = idChecked.value.includes(val.id)
   if (!isExist) {
     // 添加
-    if (props.limit === currentSelect.value.length) return Snackbar.warning(`最多可选${props.limit}个行业`)
+    if (props.limit === idChecked.value.length) return Snackbar.warning(`最多可选${props.limit}个行业`)
     currentSelect.value.push(val)
     idChecked.value.push(val.id)
   } else {