From 475449f04e76022b0733cfef6159a94313038b86 Mon Sep 17 00:00:00 2001 From: jinhhanhan <1683105490@qq.com> Date: Thu, 13 Aug 2026 10:32:35 +0800 Subject: [PATCH] =?UTF-8?q?chore=EF=BC=9A=E8=A7=86=E9=A2=91=E6=AD=A3?= =?UTF-8?q?=E5=B8=B8=E4=B8=8A=E4=B8=8B=E9=BB=91=E8=BE=B9=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components-diy/diy-video-list.vue | 48 +++---------------------------- 1 file changed, 4 insertions(+), 44 deletions(-) diff --git a/components-diy/diy-video-list.vue b/components-diy/diy-video-list.vue index b21db73..3eee3e4 100644 --- a/components-diy/diy-video-list.vue +++ b/components-diy/diy-video-list.vue @@ -148,34 +148,9 @@ export default { // 弹窗视频容器样式 popupVideoStyle() { - let style = 'position:fixed;width:60%;left:50%;margin-left:-30%;'; - const defaultRatio = 9 / 16; - - let ratio = defaultRatio; - if (this.popupVideoWidth && this.popupVideoHeight) { - ratio = this.popupVideoHeight / this.popupVideoWidth; - } - - const isPortrait = ratio > 1; - - if (isPortrait) { - style += 'top:50%;transform:translateY(-50%);'; - } else { - style += 'top:25%;'; - } - - // #ifdef H5 - style += 'height:0;padding-top: ' + (ratio * 100) + '%;'; - // #endif - - // #ifdef MP-WEIXIN - style += 'height:0;padding-top: ' + (ratio * 100) + '%;'; - // #endif - - // #ifdef MP-HARMONY - style += 'height: ' + (this.windowWidth * ratio) + 'px;'; - // #endif - + // 固定宽高容器:60%宽 x 50vh高,居中显示 + // 竖屏视频填满高度→左右留黑边;横屏视频填满宽度→无黑边 + let style = 'position:fixed;width:60%;height:50vh;left:50%;top:50%;transform:translate(-50%,-50%);'; return style; } }, @@ -623,6 +598,7 @@ export default { position: relative; overflow: hidden; background-color: #000; + border-radius: 12rpx; } .adaptive-video { @@ -634,22 +610,6 @@ export default { left: 0; } -/* #ifdef MP-WEIXIN */ -.adaptive-video { - position: absolute; - top: 0; - left: 0; -} -/* #endif */ - -/* #ifdef MP-HARMONY */ -.adaptive-video { - position: static; - display: block; - box-sizing: border-box; -} -/* #endif */ - .video-nav { padding: 16rpx; box-sizing: border-box;