1.0.3 • Published 1 month ago

@tanzhenxing/zx-tabbar-item v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
1 month ago

zx-tabbar-item 底部导航栏子项

用于 zx-tabbar 组件的子项,支持图标、文本、徽标、圆点等。

基本用法

<zx-tabbar-item text="首页" icon="home" :active="true" />

属性说明

属性名说明类型默认值
name唯一标识,作为与 zx-tabbar 的 value 匹配String/Number-
icon图标名/图片String-
text描述文本String-
badge右上角角标提示信息String/Number-
dot是否显示圆点(覆盖 badge)Booleanfalse
badgeStyle徽标自定义样式(对象或字符串)Object/String-
active是否激活(高亮)Booleanfalse
activeColor激活时颜色String#ff0000
inactiveColor未激活时颜色String#7d7e80
customStyle外部自定义样式Object{}

事件说明

事件名说明回调参数
click点击时触发name

示例

<zx-tabbar-item text="首页" icon="home" :active="true" badge="5" />
<zx-tabbar-item text="消息" icon="message" dot />

注意事项

  • 建议配合 zx-tabbar 组件使用
  • 支持多端(H5/小程序/APP)

参考文档