https://github.com/hecom-rn/badge
角标组件。
https://github.com/hecom-rn/badge
Last synced: over 1 year ago
JSON representation
角标组件。
- Host: GitHub
- URL: https://github.com/hecom-rn/badge
- Owner: hecom-rn
- License: mit
- Created: 2019-04-18T06:36:07.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-24T08:03:48.000Z (about 7 years ago)
- Last Synced: 2024-04-25T16:20:17.905Z (about 2 years ago)
- Language: TypeScript
- Size: 12.7 KB
- Stars: 2
- Watchers: 11
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Badge
[](https://www.npmjs.com/package/@hecom/badge)
[](https://travis-ci.org/hecom-rn/Badge)
这是一个角标的UI组件,有四种可能:
* 没有数字,只有一个圆圈,有外层隔离间隔。
* 没有数字,只有一个圆圈,无外层隔离间隔。
* 有数字,有外层隔离间隔。
* 有数字,无外层隔离间隔。
外层隔离间隔,是在数字视图外面再多上一层间隔,比如红色中心圆圈外面有一圈白色间隔。
**属性**:
* `count: number`:展示的数字。
* `maxCount: number`:计数的最大值,如"99"。如果比最大值大,则显示"99+"。
* `radius: number`:数字两侧的圆角的半径大小。
* `bgColor: string`:数字的背景色。
* `outSpace: number`:外层与内层直接的间隔。
* `outBgColor: string`:外层的背景色。
* `innerVerticalSpace: number`:数字与内层圆圈的上下边距,用于计算字号。
* `style: any`:自定义外部样式。