简介
tabslayout 是一个UI组件库,主要用于导航的tabItem,可配置图片,文字,等基础属性,方便开发及扩展
安装
-
ohpm install @cornflower/tabslayout -
或者在模块的oh-package.json5中添加
"dependencies": { "@cornflower/tabslayout": "1.0.2" }
支持参数
| 参数 | 类型 | 描述 |
|---|---|---|
| name | string | tab名称 |
| normalIcon | string Resource | 默认tab图标 |
| selectIcon | string Resource | 选中tab图标 |
| iconWidth | number | icon宽度 默认30vp |
| iconHeight | number | icon高度 默认30vp |
| normalColor | ResourceColor | 默认文字颜色 |
| selectColor | ResourceColor | 选中文字颜色 |
| normalTextSize | number string Resource | 默认文字大小 默认16vp |
| selectTextSize | number string Resource | 默认文字大小 默认16vp |
| showBadge | @Prop boolean | 是否显示右上角消息 默认不显示 |
| badgeTextSize | number string | 右上角消息尺寸 默认6vp |
| badgeLargeSize | number string | 右上角带文字消息尺寸 默认18vp |
| badgeColor | ResourceColor | 右上角消息颜色 默认红色 |
| badgeTextColor | ResourceColor | 右上角消息文字颜色 默认白色 |
| badgeTextSize | number string | 右上角消息文字大小 默认10vp |
| message | string | 右上角消息提示信息 |
| tabHeight | Length | tab高度默认56vp |
| currentIndex | number | 默认index |

最低0.47元/天 解锁文章
1175

被折叠的 条评论
为什么被折叠?



