jQuery DateBox在平板电脑上加载缓慢

jQuery DateBox loads slowly on tablet

本文关键字:加载 缓慢 平板电脑 DateBox jQuery      更新时间:2024-03-12

我在我的gwt项目上使用jQuery DateBox,如下所示:

在我的gwt.xml ui文件中,我输入了

<input type="text" ui:field="date" class="{resources.style.bottomSpacer}"
       data-role="datebox" data-options='{"mode":"datebox", "useFocus": true, 
       "useNewStyle":true, "themeHeader": "b", "themeButton": "b", "themeInput": "c"}' />

当点击平板电脑上的输入元素打开日期框时,据报道加载速度非常慢。

是什么原因造成的?也许有些javascript只在点击后加载,它会动态加载js库?

我玩了data-options字段,发现只使用一个主题并禁用动画会使元素在PC上更快。至少我可以在我的快速PC上看到差异。因此,在平板电脑上,差异可能会更大。

以下是更改后的data-options

"mode":"datebox", "useFocus": true, "useNewStyle":true, "useAnimation" : false, "themeHeader": "b", "themeButton": "b", "themeInput": "b"

因此,所有的主题都与b有关,而useanimation是新的。