Browse Source

修复规格弹出框文字溢出

master
lincm 4 years ago
parent
commit
a088b86030
  1. 56
      pages/productDetails/index.vue

56
pages/productDetails/index.vue

@ -119,25 +119,7 @@
</view> </view>
</view> </view>
<!-- <view class="promotion" v-if="goodsDate.is_promote==1"> <!-- ssss -->
<view class="promotion_title">Promotion</view>
<view class="promotion_content">
<view class="promotion_content_item">
<image src="/static/img/goods_lable.png" mode=""></image>
<view class="promotion_item_right">
<view class="title">5% OFF</view>
<text>ON ORDERS OF $39+</text>
</view>
</view>
<view class="promotion_content_item">
<image src="/static/img/goods_lable.png" mode=""></image>
<view class="promotion_item_right">
<view class="title">US5% OFF</view>
<text>ON ORDERS OF $39+</text>
</view>
</view>
</view>
</view> -->
<view class="transport"> <view class="transport">
<!-- <view class="goods_title">Shipping to {{addressDate.country_name || 'United States'}}</view> --> <!-- <view class="goods_title">Shipping to {{addressDate.country_name || 'United States'}}</view> -->
@ -201,12 +183,12 @@
<!-- <scroll-view scroll-y="true" class="descriptionDetails" > --> <!-- <scroll-view scroll-y="true" class="descriptionDetails" > -->
<scroll-view scroll-y="true" class="text1"> <scroll-view scroll-y="true" class="text1">
<view class="text1_item"> <view class="text1_item" :style="{height:max>7?160+'rpx':''}">
<view class="text1_left"><text>Color</text> </view> <view class="text1_left"><text>Color</text> </view>
<view class="text1_right" ><text>{{ Attr_list }}</text></view> <view class="text1_right" ><text>{{ Attr_list }}</text></view>
</view> </view>
<view class="text1_item"> <view class="text1_item" >
<view class="text1_left"><text>Power Suppy</text> </view> <view class="text1_left" ><text>Power Suppy</text> </view>
<view class="text1_right"><text>No</text></view> <view class="text1_right"><text>No</text></view>
</view> </view>
<view class="text1_item"> <view class="text1_item">
@ -398,6 +380,7 @@
return { return {
navWidth:'80rpx', navWidth:'80rpx',
current:0, current:0,
max:0,
isvideo:false, isvideo:false,
isSecurity:false, isSecurity:false,
sum:0, sum:0,
@ -443,7 +426,7 @@
listtext:[], listtext:[],
isLogin:-1, isLogin:-1,
isAttr:false, isAttr:false,
Attr_list:[], Attr_list:'',
video:false, video:false,
list:[], list:[],
pageNum:1, pageNum:1,
@ -466,6 +449,8 @@
shipping_list:[], shipping_list:[],
Size_list:'' Size_list:''
} }
}, },
@ -779,7 +764,7 @@
}) })
if(this.goodsDate.attr_list){ if(this.goodsDate.attr_list){
console.log(this.goodsDate.attr_list,'////S') console.log(this.goodsDate.attr_list)
this.Is_attr = this.goodsDate.attr_list.length this.Is_attr = this.goodsDate.attr_list.length
if(this.Is_attr>0){ if(this.Is_attr>0){
let Size_list let Size_list
@ -791,11 +776,14 @@
this.colorNum=item.goods_attrs.length this.colorNum=item.goods_attrs.length
console.log(this.colorNum) console.log(this.colorNum)
Attr_list = item.goods_attrs Attr_list = item.goods_attrs
let i = 0
Attr_list.map( item =>{ Attr_list.map( item =>{
this.Attr_list +=item.attr_value + ',' this.Attr_list +=item.attr_value + ''
i++
}) })
this.Attr_list= this.Attr_list.substring(0, this.Attr_list.length-1) this.Attr_list= this.Attr_list.substring(0, this.Attr_list.length-1)
console.log(i)
this.max = i
} }
else if(item.attr_name=="Size"){ else if(item.attr_name=="Size"){
Size_list = item.goods_attrs Size_list = item.goods_attrs
@ -979,11 +967,11 @@
.text1{ .text1{
width: 100%; width: 100%;
min-height: 300rpx; max-height:360rpx;
max-height:400rpx; min-height: 320rpx;
padding-left: 4.67rpx;
// padding-left: 54.67rpx;
padding-top: 30.67rpx; padding-top: 30.67rpx;
padding-right: 10rpx;
// padding-right: 45.33rpx; // padding-right: 45.33rpx;
// line-height: 50rpx; // line-height: 50rpx;
// text-align: start; // text-align: start;
@ -995,7 +983,7 @@
display: flex; display: flex;
width: 100%; width: 100%;
flex-direction: row; flex-direction: row;
height: 60rpx;
line-height: 50rpx; line-height: 50rpx;
text-align: start; text-align: start;
text{ text{
@ -1010,7 +998,7 @@
font-size:28rpx; font-size:28rpx;
line-height: 50rpx; line-height: 50rpx;
text-align: start; text-align: start;
padding-left:33.27rpx; padding-left:43.27rpx;
} }
.text1_right{ .text1_right{
@ -1020,8 +1008,10 @@
// background-color:green; // background-color:green;
line-height:50rpx; line-height:50rpx;
margin-left:60rpx; margin-left:60rpx;
text-align: start;
white-space: wrap;
word-wrap:wrap; word-wrap:wrap;
} }
} }
} }

Loading…
Cancel
Save