liushengqiang 2 years ago
parent
commit
dc3e20e5ec

+ 2 - 0
src/components/o-video/index.tsx

@@ -44,6 +44,7 @@ export default defineComponent({
       default: () => {}
     }
   },
+  emits:['exitfullscreen'],
   data() {
     return {
       player: null as any,
@@ -130,6 +131,7 @@ export default defineComponent({
         console.log('exitfullscreen')
         const i = document.getElementById('fullscreen-back')
         i && i.remove()
+        this.$emit('exitfullscreen')
       })
     },
     // 操作功能

+ 6 - 1
src/views/mine-orchestra/orchestra-deeds/index.tsx

@@ -99,6 +99,7 @@ export default defineComponent({
     onMounted(() => {
       getList()
     })
+    const swipeRef = ref()
     return () => (
       <div
         class={[styles.orchestraStory, !state.listState.dataShow && 'emptyRootContainer']}
@@ -128,7 +129,7 @@ export default defineComponent({
                   </div>
                   <p class={[styles.content, 'van-multi-ellipsis--l2']}>{item.content}</p>
 
-                  <Swipe class={styles.storySwipe}>
+                  <Swipe ref={swipeRef} class={styles.storySwipe}>
                     {item.attachments &&
                       item.attachments.map((child: any) => (
                         <SwipeItem>
@@ -153,6 +154,10 @@ export default defineComponent({
                               class={styles.swipeImg}
                               ref={(el: any) => (videoRef.value[index] = el)}
                               onPlay={() => onPlay(index)}
+                              onExitfullscreen={() => {
+                                console.log('重新resize', swipeRef.value)
+                                swipeRef.value?.resize()
+                              }}
                             />
                           )}
                         </SwipeItem>