- 当Bug 的表现(可附上截图)
获取不到节点的真实高度,都是一个固定的数
前
bug,,真实效果应该是
相关代码:
wxml:
<view class='item-before' style='display: flex; width:320rpx;flex-direction: column;padding-left: 31rpx;justify-content: flex-start;background: #F8FBFF;height:{{item.h}};overflow: hidden;'>
<text class='item-exchange-head'>变更前</text>
<view class='view-item-contain'>
<view>
<text class='view-item-before' wx:for='{{item.altBe}}' wx:for-item='data'>{{data}}</text>
</view>
</view>
</view>
wcss:
.item-before{
display: flex;
width:max-content;
flex-direction: column;
padding-left: 31rpx;
justify-content: flex-start;
background: #F8FBFF;
/*实现多余的文字隐藏并用省略号来代表被隐藏的文字 */
overflow: hidden;
}
.view-divider{
width: 2rpx;
height: 100%;
background: #E1E1E1;
}
.view-item-before{
font-family: PingFangHK-Regular;
font-size: 26rpx;
color: #FF4747;
margin-top: 13rpx;
margin-bottom: 25rpx;
}
.view-item-after{
font-family: PingFangHK-Regular;
font-size: 26rpx;
color: #297AFF;
margin-top: 13rpx;
margin-bottom: 25rpx;
}