The progress bar of layui is not displayed dynamically when loading
Stepping on the pit: the dynamic loading of layui's progress bar is not displayed.
You can see that the official example is a dynamic loading of a percentage ratio.
Students who are not very clear go to the official website of layui to see his examples and a progress bar document layui.com .
But xdm found that the progress bar in percentage format can be used, but that kind of fractional form, there is no way to use his format to go
Solution:
One: Necessary conditions for dynamic acquisition: element module
We need to introduce this element module to dynamically operate the progress bar
. After introducing the element module, call its progress method.
This method has two parameters. The first parameter is: the progress bar with the filter (lay-filter="") set, The first parameter is this;
the second parameter is the parameter corresponding to where you want it to be dynamic.
After setting, you need to initialize and load the element again,
just add this sentence:
In this way, you can set the dynamic fraction form The dynamic progress bar
Overall example code
progress bar code
layui control code