Procházet zdrojové kódy

限制可选个数

lifanagju_citu před 11 měsíci
rodič
revize
1a867fe2dd
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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 {