You need to use EasyEDA editor to create some projects before publishing
API: How to update a progress bar?
595 2
andreasbernhofer 4 years ago
Hi, how do I update the value of a progress bar? ``` js // Test #1 x = $.messager.progress({ title: "Processing", value: 5, text: "{value}%", interval: 0, closable: true }); x.progressbar(); x.progressbar('setValue',50); // Test #2 x = $.messager.progress({ title: "Processing", value: 5, text: "{value}%", interval: 0, closable: true }); x.progressbar({value: 50}); ``` Both kind of work but mess with the layout... ![2020-11-15 10_21_02-Window.png](//image.easyeda.com/pullimage/DG8c3ABggB7bTump4gDsaOh7YRpdJ1JAWNFFMdsR.png)
Comments
eric 3 years ago
The key point is how to find the progressbar component. ``` //The dialog component var dialog = $.messager.progress({ title: "Processing", value: 5, text: "{value}%", interval: 0, closable: true }); //The progressbar component in the dialog var bar = $.messager.progress('bar', dialog); //There are 2 ways to update the progress value //1. Use setValue bar.progressbar('setValue', 25); //2. Or use stepToValue bar.progressbar('stepToValue', 75); ```
Reply
andreasbernhofer 3 years ago
@eric perfect thx!
Reply
Login or Register to add a comment
goToTop
你现在访问的是EasyEDA海外版,建议访问速度更快的国内版 https://lceda.cn(需要重新注册)
如果需要转移工程请在个人中心 - 工程 - 工程高级设置 - 下载工程,下载后在https://lceda.cn/editor 打开保存即可。
有问题联系QQ 3001956291 不再提醒
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus-@1x -mockplus-

Cookie Notice

Our website uses essential cookies to help us ensure that it is working as expected, and uses optional analytics cookies to offer you a better browsing experience. To find out more, read our Cookie Notice