uni-segmented-control 分段器的安装及使用
dcloud插件市场
安装完成后,在ubuilder所在的.vue下面
<view>
<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" style-type="button" active-color="#4cd964"></uni-segmented-control>
<view class="content">
<view v-if="current === 0">
选项卡1的内容
</view>
<view v-if="current === 1">
选项卡2的内容
</view>
<view v-if="current === 2">
选项卡3的内容
</view>
</view>
</view>