Ver Fonte

限制可选个数

lifanagju_citu há 11 meses atrás
pai
commit
1a867fe2dd
1 ficheiros alterados com 1 adições e 1 exclusões
  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 {