修改弹出框宽度

master
于肖磊 2026-01-06 15:35:47 +08:00
parent 46ae2e2dcd
commit 24b5dd74ab
5 changed files with 22 additions and 16 deletions

View File

@ -2,7 +2,7 @@
<view v-if="!is_loading" class="flex-row align-c jc-c pa-20 box-border-box oh bg-f9" :style="good_style">
<block v-if="good_list.length > 0">
<!-- 固定在顶部的商品操作栏 -->
<view class="goods-header-fixed" :style="'width:' + windowWidth + 'px;'">
<view class="goods-header-fixed" :style="'width:' + propWindowWidth + 'px;'">
<view class="flex-row align-c jc-e pa-10">
<view class="flex-col" @tap="goods_order">
<component-icon propName="list-setup" propSize="36rpx" propColor="#999"></component-icon>
@ -25,7 +25,7 @@
<view v-for="(item, index) in good_list" :key="item.id">
<!-- #endif -->
<!-- 商品项 -->
<view :class="'goods-item flex-row align-c box-border-box' + (item.id == explanation_id ? ' bg-red-light' : '')" :style="'width:' + (windowWidth - 24) + 'px;'" :data-index="index" :data-value="item.checkbox" :data-url="item.goods_url" @tap="goods_detail">
<view :class="'goods-item flex-row align-c box-border-box' + (item.id == explanation_id ? ' bg-red-light' : '')" :style="'width:' + (propWindowWidth - 24) + 'px;'" :data-index="index" :data-value="item.checkbox" :data-url="item.goods_url" @tap="goods_detail">
<view class="flex-1">
<view class="flex-row align-c">
<view class="pr goods-item-image-container">
@ -83,7 +83,7 @@
<!-- #ifdef APP-NVUE -->
</cell>
<cell>
<component-bottom-line :propStatus="bottom_line_status" :propWidth="windowWidth"></component-bottom-line>
<component-bottom-line :propStatus="bottom_line_status" :propWidth="propWindowWidth"></component-bottom-line>
</cell>
</list>
<!-- #endif -->
@ -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: [],
// , vuenvue使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();

View File

@ -156,7 +156,7 @@
</view>
<!-- 商品弹出框 -->
<component-popup ref="popupGoodsRef" propMode="bottom" class="pointer-events-auto" propTitle="添加商品" :propCloseable="true">
<component-goods propIsGoodsPopup></component-goods>
<component-goods propIsGoodsPopup :propWindowWidth="propWindowWidth" :propWindowHeight="propWindowHeight"></component-goods>
</component-popup>
<!-- 分享弹窗 -->
<component-share-popup ref="share" class="pointer-events-auto"></component-share-popup>

View File

@ -619,6 +619,8 @@
<style lang="scss" scoped>
.uni-popup {
position: fixed;
max-width: 1600rpx;
margin: 0 auto;
/* #ifndef APP-NVUE */
z-index: 99;

View File

@ -1,11 +1,11 @@
<template>
<!-- #ifndef APP-NVUE -->
<view v-if="isShow" ref="ani" :animation="animationData" :class="propCustomClass" :style="transformStyles" @click="onClick">
<view v-if="isShow" ref="ani" class="page-width-max" :animation="animationData" :class="propCustomClass" :style="transformStyles" @click="onClick">
<slot></slot>
</view>
<!-- #endif -->
<!-- #ifdef APP-NVUE -->
<view v-if="isShow" ref="ani" :animation="animationData" :class="propCustomClass" :style="transformStyles" @click="onClick">
<view v-if="isShow" ref="ani" class="page-width-max" :animation="animationData" :class="propCustomClass" :style="transformStyles" @click="onClick">
<slot></slot>
</view>
<!-- #endif -->

View File

@ -7,7 +7,7 @@
</view>
<template v-if="!is_loading">
<view class="live-content pointer-events-none">
<component-live-content ref="liveContent" :propWindowWidth="windowWidth" :propLiveData="live_data" :propLiveConfig="live_config" :propLiveShowImgs="like_show_imgs" @liveBack="live_back" @liveStatus="socket_live_status"></component-live-content>
<component-live-content ref="liveContent" :propWindowWidth="windowWidth" :propWindowHeight="windowHeight" :propLiveData="live_data" :propLiveConfig="live_config" :propLiveShowImgs="like_show_imgs" @liveBack="live_back" @liveStatus="socket_live_status"></component-live-content>
</view>
<view v-if="is_live_ended" class="live-ended flex-row align-c jc-c">
<view class="flex-col align-c">