liushengqiang 2 年之前
父节点
当前提交
3a8693531e

+ 3 - 3
src/views/coursewarePlay/component/musicScore.module.less

@@ -42,7 +42,7 @@
 }
 .loading{
   position: absolute;
-  left: 50%;
-  top: 0;
-  transform: translateX(-50%);
+  left: 4%;
+  top: 50%;
+  margin-top: -15Px;
 }

+ 3 - 4
src/views/coursewarePlay/component/musicScore.tsx

@@ -25,8 +25,6 @@ export default defineComponent({
     /** 页面显示和隐藏 */
     watch(pageVisibility, (value) => {
       if(value == 'hidden'){
-        isLoading.value = true
-      } else {
         isLoading.value = false
       }
     })
@@ -64,7 +62,7 @@ export default defineComponent({
 
     // 去云教练完整版
     const gotoAccomany = () => {
-      // if (isLoading.value) return;
+      if (isLoading.value) return;
       isLoading.value = true
       const parmas = qs.stringify({
         id:  props.music.content,
@@ -106,7 +104,8 @@ export default defineComponent({
               gotoAccomany()
             }}>
               <img src={iconStart} />
-              {/* <Loading class={styles.loading} color="rgba(63,134,237,1)" /> */}
+              {isLoading.value && <Loading class={styles.loading} color="rgba(63,134,237,1)" size={16} />}
+              K
             </div>
           </>
         )}