Progress

Progress 进度条

代码示例

import { BfProgress } from '@bud-fe/react-taro-ui';
import { View } from '@tarojs/components';
import React from 'react';
import styles from './index.module.less';
export default () => {
return (
<>
<View className="group-title">基础用法</View>
<View className={styles['progress-wrapper']}>
<BfProgress percent={30} />
</View>
<View className="group-title">设置颜色与宽度</View>
<View className={styles['progress-wrapper']}>
<BfProgress percent={70} background="gray" color="cyan" strokeWidth={20} />
</View>
<View className="group-title">显示百分比</View>
<View className={styles['progress-wrapper']}>
<BfProgress percent={50} showText />
</View>
<View className="group-title">动画效果</View>
<View className={styles['progress-wrapper']}>
<BfProgress percent={60} animated />
</View>
</>
);
};

API

属性名描述类型默认值
percent百分比number0
background进度条背景颜色string#f2f3f5
color进度条线条颜色string#fd3c42
strokeWidth进度条宽度string | number12px
showText是否显示文字内容booleanfalse
animated是否展示动画效果booleanfalse
delay延迟数据加载时长,单位 msnumber0
dumi10:24