Browse Source

更改播放loading

liushengqiang 1 year ago
parent
commit
84d60f2c70

+ 7 - 2
src/views/attend-class/component/video-play.tsx

@@ -45,7 +45,8 @@ export default defineComponent({
       currentTime: '00:00',
       durationNum: 0,
       duration: '00:00',
-      showBar: true
+      showBar: true,
+      showAction: true
     });
     const videoRef = ref();
     const videoItem = ref();
@@ -182,6 +183,10 @@ export default defineComponent({
       videoItem.value.src(item.value.content); // url 播放地址
       videoFroms.paused = true;
     })
+    watch(() => props.showModel, () => {
+      // console.log(props.showModel, 'props.showModel')
+      videoFroms.showAction = props.showModel;
+    })
     expose({
       onPlay,
       stop,
@@ -202,7 +207,7 @@ export default defineComponent({
         <div
           class={[
             styles.controls,
-            props.showModel ? '' : styles.sectionAnimate
+            videoFroms.showAction ? '' : styles.sectionAnimate
           ]}
           onClick={(e: MouseEvent) => {
             e.stopPropagation();

+ 1 - 1
src/views/attend-class/index.tsx

@@ -1164,7 +1164,7 @@ export default defineComponent({
                             }}
                           /> */}
                           <Transition name="van-fade">
-                            {!m.isprepare && (
+                            { (
                               <div class={styles.loadWrap}>
                                 <Vue3Lottie
                                   animationData={playLoadData}></Vue3Lottie>