Przeglądaj źródła

feat:修改transport

AmandaG 10 miesięcy temu
rodzic
commit
8a460ec6cb

+ 5 - 2
src/components/TransportMode/src/TransportMode.vue

@@ -23,11 +23,14 @@ watch(
     TransportList.value = current
     TransportList.value.forEach((item: any) => {
       if (item.checked) {
-        checkedCount.push(item.name)
+        checkedCount.push(item.sname)
         const map = new Map()
         checkedCount.forEach((item) => map.set(item, true))
         checkedCount = [...map.keys()]
       }
+      if (checkedCount.length == TransportList.value.length) {
+        checkAll.value = true
+      }
     })
   }
 )
@@ -63,7 +66,7 @@ const handleCheckAllChange = (val: any) => {
   TransportList.value.forEach((item: any) => {
     if (val) {
       item.checked = true
-      checkedCount.push(item.name)
+      checkedCount.push(item.sname)
     } else {
       item.checked = false
       checkedCount = []