Comments (1)
可以尝试颠倒 setLoading 和 setPercent 以暂时达成你的目标
const { React, Arco, ArcoIcon } = window;
const { Progress,Button } = Arco;
import {useEffect,useState} from "react";
function ProgressDemo() {
const [percent,setPercent] = React.useState(50);
const [loading,setLoading] = React.useState(false);
return (
<div>
{loading?'loading':<Progress percentage={percent}/>}
<Button onClick={()=>{
setLoading(true)
setTimeout(()=>{
setPercent(Math.random()*100);
setLoading(false);
},1000)
}}>{percent}</Button>
</div>
);
}
ReactDOM.render(<ProgressDemo/>, mountNode);
from arco-design-mobile.
Related Issues (20)
- Input组件,PC上onClear设置value为'',点击无效,但是在移动端是生效的 HOT 7
- loadMore组件,如果在一个可滚动的盒子内有一个列表,列表最下方是loadmore,触发不了onReachEnd事件 HOT 4
- Dialog里面的Radio是无法变更value的,好奇怪,详情里面有codeopen案例 HOT 4
- Popover defaultVisible为true的时候,不生效,刷新页面仍然是没有显示出来 HOT 2
- ImagePreview 关闭的时候会有延迟,会等一段时间,然后才开始关闭(进入到动画过渡环节) HOT 7
- Input加一个props,可以在不同移动端设备上聚焦的时候只改变网页高度 HOT 1
- Input可以适配在PC移动端都是输入中文的过程中不触发onChange,建议加一个props实现 HOT 1
- Tabs在移动端主动切换tab又bug HOT 2
- Picker组件onOk函数回调没有返回默认值 HOT 5
- 升级到2.29.2版本之后SearchBar在安卓手机端清空不了,华为meta 40 HOT 5
- Tabs滑动时偶尔有bug HOT 2
- tabs支持嵌套吗 HOT 1
- Dialog在PC上丢失很多样式 HOT 2
- PullRefresh存在严重的性能问题 HOT 3
- 使用移动端多图预览组件,点开图片预览,页面崩溃进行了页面刷新,但是图片的尺寸并不大,请问是哪里的问题呢? HOT 3
- 不开代理网站一直打不开啊,没有梯子的人怎么使用 HOT 2
- Picker组件开启cascade联动,实际不联动 HOT 5
- Dialog调confirm方法时,传unmountOnExit为false提示警告:Warning: You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it. HOT 4
- Carousel 组件问题 HOT 2
- Support the ability to upload files. 支持上传文件的能力 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arco-design-mobile.