当前位置:网站首页>Vant web app calendar component performance optimization calendar add min date the minimum date page loads slowly

Vant web app calendar component performance optimization calendar add min date the minimum date page loads slowly

2022-06-23 06:00:00 A dyed star

Causing serious performance problems .
Official documents clearly emphasize , adopt min-date and max-date Define the scope of the calendar , It should be noted that min-date and max-date The interval of should not be too large , Otherwise, it will cause serious performance problems .

Therefore, we need to modify the page presentation mode according to the specific business needs
Calendar Usage conditions of calendar component
1、 If you choose a date in the next few months 、 It is recommended to use ;
2、 The interval will not be too large ;

date picker
In addition to the above conditions , Need to use date , Best use picker(mode=date) Components , perhaps vant-weapp There is a corresponding van-datetime-picker Components , Although not as beautiful as the calendar component , But the loading speed is fast !
 

原网站

版权声明
本文为[A dyed star]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/174/202206230408284110.html