# DigitalRoller **Repository Path**: openharmony_5/digital-roller ## Basic Information - **Project Name**: DigitalRoller - **Description**: 一款可用于OpenHarmony环境下的数字滚轮组件 - **Primary Language**: TypeScript - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-09-17 - **Last Updated**: 2023-09-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # DigitalRoller ## 介绍 一款可用于OpenHarmony环境下的数字滚轮组件,支持自定义滚动速度、文字大小、文字颜色等。 ## 下载安装 ```shell ohpm install @ohos/digital-roller ``` OpenHarmony ohpm 环境配置等更多内容,请参考[如何安装 OpenHarmony ohpm 包](https://gitee.com/openharmony-tpc/docs/blob/master/OpenHarmony_har_usage.md) ## 使用说明 ```typescript import { DigitalRoller } from '@ohos/digitalroller' @State value: string = '0' DigitalRoller({ duration: 500, value: this.value }) ``` ## 参数说明 | **属性** | **必填** | **说明** | |---------------------|:------:|-------------------------------| | value: string | 是 | 显示的数字,如1235,123,456.789,$990等 | | fontWeight: number | 否 | 数字fontWeight,默认400 | | fontColor: string | 否 | 数字颜色,默认``#000000`` | | fontSize: number | 否 | 数字文字大小,默认30 | | duration: number | 否 | 数字滚动动画时长,默认1000,即1s | | digitWidth: number | 否 | 数字宽度,默认45 | | digitHeight: number | 否 | 数字高度,默认45 |