Skip to content

Tabbar 底部导航

Tabbar 底部导航打开
9:41
/pages/tabbar/index

介绍

weui-tabbar 用于页面底部主导航,支持图标、文字、数字徽章和红点。

基础用法

vue
<weui-tabbar
  v-model="active"
  :items="[
    { label: '微信', value: 'wechat', icon: '/static/icon_tabbar.png' },
    { label: '通讯录', value: 'contact', iconText: '通讯' }
  ]"
/>

Props

属性说明类型默认值
modelValue当前选中值,支持 v-modelstring | number''
items导航项数组,支持 { label, value, icon, iconText, badge, dot, disabled }array[]
ariaLabel无障碍标签string'选项卡标题'

Events

事件名说明回调参数
update:modelValue选中值变化value
change切换导航项item, index

Released under the MIT License.