利用 css3 content属性给选项卡加底部选中状态
<!-- html -->
<view class="tab-item" :class="current==index?'active':''" v-for="(list,index) in arr" :key="index" @click="currentPage(index)">{{list}}</view>
/* css */
/* 控制区域大小 */
.tab-item {
width: 50%;
height: 80rpx;
color: #33333.
原创
2020-10-28 09:55:27 ·
362 阅读 ·
0 评论