1 Star 0 Fork 0

LS/ls-design

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
.changeset
.husky
.vscode
bin
configs
packages
core
docs
icons
playground
react-adaptor
reactify
rollup-plugins
ui-lib
scripts
src
components
actionsheet
badge
button
cascade
cell
checkbox
circle
collapse
countdown
datetimepicker
dialog
empty
form
grid
icon
image
imagepreview
input
list
loading
locale
marquee
navbar
noticebar
overlay
picker
popover
popup
progress
index.tsx
style.css
zh-CN-react.md
pullrefresh
radio
rate
sharesheet
skeleton
stepper
steps
sticky
swipe
swipecell
switch
tab
tabbar
tag
textarea
toast
tooltip
upload
virtuallist
index.ts
types
utils
CHANGELOG.md
README.md
babel.config.js
global-css.js
package.json
rollup.config.ts
tsconfig.json
tsconfig.types.json
.dockerignore
.eslintignore
.eslintrc.js
.gitignore
.prettierignore
.prettierrc
LICENSE
README.md
commitlint.config.js
package.json
pnpm-lock.yaml
pnpm-workspace.yaml
turbo.json
克隆/下载
zh-CN-react.md 1.42 KB
一键复制 编辑 原始数据 按行查看 历史

Progress


简介

展示进度

安装使用

import { Progress } from "@ls-design/ui-react";

基础用法

<Progress value="0"></Progress>

显示字体进度

<Progress value="100" showtext></Progress>

自定义颜色/背景色

.green {
  --progress-box-background: yellowgreen;
  --progress-margin-left: 6px;
}
<Progress value="20" color="green"></Progress>
<Progress value="30" color="green" className="green"></Progress>

自定义宽度高度/圆角

.auto {
  width: 50%;
  height: 50px;
  border-radius: 15px;
}
<Progress
  value="90"
  class="auto"
  color="linear-gradient(
  268deg,#fa2c19 0%,#fa3f19 44.59259259%,#fa5919 83.40740741%,#fa6419 100%)"
>
  <span slot="percent" class="percent">0.9</span>
</Progress>

Props

参数 说明 类型 默认值
value 默认进度 0-100 代表百分比 string 0
color 进度条激活颜色支持渐变 string linear-gradient(90deg, #FFC91C 0%, #FB990F 100%)
showtext 是否显示文字进度 boolean false
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/LShere/ls-design.git
git@gitee.com:LShere/ls-design.git
LShere
ls-design
ls-design
master

搜索帮助