如何使用
<lx-tabbar :menuList="menuList" current="home" ></lx-tabbar>
Props
interface menuListInt {
name: string // 菜单名称用于选中菜单项(current)和菜单icon的命名
text: string // 菜单的文字
pagePath: string // 菜单跳转页面地址(例:'pages/index/index'),跳转页面地址直接从pages目录名开始写
}
备注:icon图标的存放位置/static/tabbar/home.png (home即为menuList中name的值)
参数 | 说明 | 类型 | 默认值 | 可选值 |
---|---|---|---|---|
menuList | 各项的配置参数,见顶部说明,数组形式 | menuListInt[] | - | - |
current | 选中的菜单项 | string | - | - |
activeColor | 菜单激活的颜色 | string | #5c616f | - |
defaultColor | 菜单默认的颜色 | string | #7d7e80 | - |