# tab导航组件再次优化

<view>
		<!-- 顶部选项卡 -->
		<view class="uni-tab-bar">
			<scroll-view scroll-x class="uni-swiper-tab" :style="scrollStyle">
				<block v-for="(tab, index) in tabBars" :key="tab.id">
					<view class="swiper-tab-list" :class="{'active':tabIndex===index}" @tap="tabtap(index)" :style="scrollItemStyle">
						{{tab.name}} {{tab.num?tab.num:''}} ⭐⭐⭐
						<view class="swiper-tab-line">

						</view>
					</view>
				</block>
			</scroll-view>
		</view>
	</view>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
上次更新: 2021/2/22 上午10:53:04