From 24b5dd74abf5f13f1e1188e6c5d56fc5eb212647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Tue, 6 Jan 2026 15:35:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=B9=E5=87=BA=E6=A1=86?= =?UTF-8?q?=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../live/pull/components/goods/goods.vue | 28 +++++++++++-------- .../components/live-content/live-content.vue | 2 +- .../live/pull/components/popup/popup.vue | 2 ++ .../pull/components/transition/transition.vue | 4 +-- pages/plugins/live/pull/pull.vue | 2 +- 5 files changed, 22 insertions(+), 16 deletions(-) diff --git a/pages/plugins/live/pull/components/goods/goods.vue b/pages/plugins/live/pull/components/goods/goods.vue index c822e092..4d79a9d2 100644 --- a/pages/plugins/live/pull/components/goods/goods.vue +++ b/pages/plugins/live/pull/components/goods/goods.vue @@ -2,7 +2,7 @@ - + @@ -25,7 +25,7 @@ - + @@ -83,7 +83,7 @@ - + @@ -132,7 +132,15 @@ export default { propLiveRoomId: { type: Number, default: 0 - } + }, + propWindowWidth: { + type: Number, + default: 0 + }, + propWindowHeight: { + type: Number, + default: 0 + }, }, data() { return { @@ -145,9 +153,6 @@ export default { //#region 打开商品弹出框 popup_goods_show: false, good_list: [], - // 获取屏幕大小, 这个组件需要再vue页面和nvue页面使用,所以不能设置为100%,需要获取固定屏幕大小 - windowWidth: 0, - windowHeight: 0, //#endregion //#region 商品列表处理 @@ -176,10 +181,12 @@ export default { good_style() { // 判断是否是弹出框形式 if (!this.propIsGoodsPopup) { - return `width:${ this.windowWidth }px;height: ${ this.windowHeight }px;`; + return `width:${ this.propWindowWidth }px;height: ${ this.propWindowHeight }px;`; } else { + console.log(this.propWindowHeight); + // 如果是弹出框模式的就不全屏显示 - return `width:${ this.windowWidth }px;height: ${ this.windowHeight - 300}px;`; + return `width:${ this.propWindowWidth }px;height: ${ this.propWindowHeight - 300}px;`; } }, //#endregion @@ -219,9 +226,6 @@ export default { //#endregion }, mounted() { - const data = uni.getWindowInfo(); - this.windowWidth = data.windowWidth; - this.windowHeight = data.windowHeight; // 初始化商品列表 this.init(); diff --git a/pages/plugins/live/pull/components/live-content/live-content.vue b/pages/plugins/live/pull/components/live-content/live-content.vue index 1f46283c..50eea6a7 100644 --- a/pages/plugins/live/pull/components/live-content/live-content.vue +++ b/pages/plugins/live/pull/components/live-content/live-content.vue @@ -156,7 +156,7 @@ - + diff --git a/pages/plugins/live/pull/components/popup/popup.vue b/pages/plugins/live/pull/components/popup/popup.vue index fb46ad1a..dadea702 100644 --- a/pages/plugins/live/pull/components/popup/popup.vue +++ b/pages/plugins/live/pull/components/popup/popup.vue @@ -619,6 +619,8 @@