我是想循环出数组live_data里面的内容,但是没有效果,是我哪里写错了吗
.chooseEchartsBoxRow{
padding: 4px;
z-index: 1;
display: flex;
flex-direction: row;
justify-content: flex-start;
}
.chooseEchartsBoxRev{
display: flex;
flex-direction: column;
justify-content: flex-start;
}
.chooseEchartsNoChoose{
height: 150rpx;
width: 216rpx;
background-color:#409EFF;
color:white;
border-radius: 5px;
z-index: 5;
margin: 0 2px 0 2px;
padding: 10rpx;
}
.chooseEchartsChoose{
height: 150rpx;
width: 216rpx;
background-color:#77ffcc;
border-radius: 5px;
z-index: 5;
margin: 0 2px 0 2px;
color: black;
padding: 10rpx;
}
.number{
font-size: 32px;
display: flex;
flex-direction: row;
justify-content: flex-start;
}
.unit{
font-size: 13px;
}
<block wx:for="{{live_data}}">
<view class="chooseEchartsBoxRev">
<view class="chooseEchartsBoxRow">
<view class="chooseEchartsChoose">{{item.name}}
<view class="number">{{item.data}}
<text class="unit">{{item.unit}}</text>
</view>
</view>
</view>
</view>
</block>
打印出来数组内容是这样的