Skip to content

Tabbar 标签栏

WD UI 标签栏组件。

vue
<template>
  <wd-tabbar v-model="active">
    <wd-tabbar-item icon="home">首页</wd-tabbar-item>
    <wd-tabbar-item icon="search">搜索</wd-tabbar-item>
    <wd-tabbar-item icon="user">我的</wd-tabbar-item>
  </wd-tabbar>
</template>

<script setup>
import { ref } from 'vue'
const active = ref(0)
</script>

API

Tabbar Props

参数说明类型默认值
v-model当前选中标签的索引number0
fixed是否固定在底部booleantrue
border是否显示上边框booleantrue

TabbarItem Props

参数说明类型默认值
icon图标名称string
badge徽标内容string/number
dot是否显示小红点booleanfalse

Events

事件名说明参数
change切换标签时触发index