浏览代码

选项修改

林旭祥 5 月之前
父节点
当前提交
146f131153
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      src/components/OptionWindow/index.vue

+ 7 - 0
src/components/OptionWindow/index.vue

@@ -173,6 +173,10 @@ const open = async (data: any) => {
   chooseArea.value = [];
   if (['situp', 'jumprope', 'jumpingjack', 'footballv1', 'basketballv1', 'volleyball', 'volleyballv1', 'pingpong'].includes(project.value.key)) {
     optionForm.value.gesture = true;
+    optionForm.value.time = 60; //默认60秒
+    if (musicList.value.length > 0) {
+      optionForm.value.music = musicList.value[0].url;//默认第一首
+    }
   } else {
     optionForm.value.gesture = false;
   }
@@ -267,6 +271,9 @@ const getAllArea = (data: any) => {
     }).map((item: any) => {
       return item.key;
     })
+    if (chooseArea.value.length > 10) {
+      optionForm.value.gesture = false;
+    }
   } else {
     //全取消
     chooseArea.value = [];