From 4e0a463f883816d78a4c4241ab23e79b2e805f98 Mon Sep 17 00:00:00 2001
From: 648540858 <456panlinlin>
Date: 星期四, 28 四月 2022 09:47:46 +0800
Subject: [PATCH] 优化对Parental字段的判断
---
web_src/src/components/common/jessibuca.vue | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/web_src/src/components/common/jessibuca.vue b/web_src/src/components/common/jessibuca.vue
index d05890b..4773feb 100644
--- a/web_src/src/components/common/jessibuca.vue
+++ b/web_src/src/components/common/jessibuca.vue
@@ -1,5 +1,5 @@
<template>
- <div id="container" ref="containerId" @dblclick="fullscreenSwich" style="width: 100%">
+ <div id="container" ref="containerId" @dblclick="fullscreenSwich" style="background-color: #eee;margin:0 auto;">
<div class="buttons-box" id="buttonsBox">
<div class="buttons-box-left">
<i v-if="!playing" class="iconfont icon-play jessibuca-btn" @click="playBtnClick"></i>
@@ -72,9 +72,16 @@
methods: {
updatePlayerDomSize() {
let dom = document.getElementById('container');
- const width = dom.parentNode.clientWidth
+ let width = dom.parentNode.clientWidth
+ let height = (9 / 16) * width
+ const clientHeight = Math.min(document.body.clientHeight, document.documentElement.clientHeight)
+ if (height > clientHeight) {
+ height = clientHeight
+ width = (16 / 9) * height
+ }
+
dom.style.width = width + 'px';
- dom.style.height = (9 / 16) * width + "px";
+ dom.style.height = height + "px";
},
create() {
let options = {};
--
Gitblit v1.8.0