Pārlūkot izejas kodu

单选项目归类

林旭祥 2 nedēļas atpakaļ
vecāks
revīzija
39371c0af4
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. 3 2
      src/components/OptionWindow/index.vue

+ 3 - 2
src/components/OptionWindow/index.vue

@@ -22,7 +22,7 @@
                 </div>
               </div>
               <div @click="getAllArea" class="allBtn" :class="{ 'active': chooseAllState }"
-                v-if="!['skiprope', 'heartbeat', 'jump'].includes(project.key)">
+                v-if="!singleList.includes(project.key)">
                 {{ chooseAllState ? '重 置' :
                   '全 选' }}
               </div>
@@ -111,6 +111,7 @@
 import useAppStore from '@/store/modules/app';
 const { proxy } = getCurrentInstance() as any;
 const router = useRouter();
+const singleList = ['jump', 'longjump', 'trijump', 'solidball', 'shotput', 'run50', 'run60', 'run70', 'run100', 'run200', 'run400', 'run800', 'run1000', 'runa800', 'runa1000', 'skiprope', 'heartbeat', 'run15x4', 'run50x8', 'run10x4', 'football', 'footballv1', 'basketball', 'basketballv1', 'volleyball', 'volleyballv1'];
 
 //父值
 const props = defineProps({
@@ -303,7 +304,7 @@ const getChooseArea = (data: any) => {
     });
   } else {
     //单选
-    if (['skiprope', 'heartbeat', 'jump'].includes(project.value.key)) {
+    if (singleList.includes(project.value.key)) {
       chooseArea.value = [];
     }
     chooseArea.value.push(id);