多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
~~~ <wxs src="../../utils/filter.wxs" module="tools"></wxs> <view class="title">金庸武侠中你喜欢的人物</view> <view class="like"> <block wx:for="{{tools.filter(comments,7)}}" wx:key="index"> <v-tag comment="{{item.comment}}"></v-tag> </block> </view> <view class="title">金庸小说热门人物</view> <view class="hot"> <block wx:for="{{hots}}" wx:key="index"> <v-tag comment="{{item.comment}}" tag-class="{{index==0?'bg':''||index==1?'bg1':''}}"> <text slot="after" class="num">+{{item.num}}</text> </v-tag> </block> </view> ~~~ ~~~ .title{ text-align: center; font-size: 30rpx; font-weight: bold; margin-bottom: 10px; } .num{ font-size: 20rpx; } .like v-tag view:nth-child(1){ background: red ; } .like v-tag:nth-child(2)>view{ background: #EFFAFF ; } .bg{ background: #FFFADD !important ; } .bg1{ background: #EFFAFF !important ; } ~~~