Kaynağa Gözat

feat: 全屏

shuisheng 2 yıl önce
ebeveyn
işleme
44d42b5fa2
1 değiştirilmiş dosya ile 12 ekleme ve 3 silme
  1. 12 3
      src/components/VideoControls/index.vue

+ 12 - 3
src/components/VideoControls/index.vue

@@ -96,6 +96,14 @@
           <div class="iten">0.5x</div>
         </div>
       </div>
+      <div class="full">
+        <span
+          class="txt"
+          @click="emits('fullScreen')"
+        >
+          全屏
+        </span>
+      </div>
     </div>
   </div>
 </template>
@@ -122,7 +130,7 @@ withDefaults(
   {}
 );
 
-const emits = defineEmits(['refresh']);
+const emits = defineEmits(['refresh', 'fullScreen']);
 
 const debounceRefresh = debounce(() => {
   emits('refresh');
@@ -218,7 +226,8 @@ function changeLiveLine(item) {
     }
     .resolution,
     .line,
-    .speed {
+    .speed,
+    .full {
       position: relative;
       margin-right: 15px;
       &:hover {
@@ -255,7 +264,7 @@ function changeLiveLine(item) {
         }
       }
     }
-    .speed {
+    .full {
       margin-right: 0;
     }
   }