jQuery mobile listview refresh不适用于top/bottom corner类

Rob*_*Rob 2 jquery-mobile

我正在使用jQuery Mobile和jQuery Mobile Router来动态更改listviews的内容.

在更改处理程序中,我正在动态地将内容添加到插入列表视图中,然后调用listview('refresh')以将所有样式重新应用于新元素.它主要起作用,但是当它应用于ui-corner-allUL时ui-corner-top,ui-corner-bottom类不应用于正确的LI,因此它们不会应用圆角.

Listview没有圆角

我准备了一个演示该问题的实例.第一页是静态的,第二页是在rounter处理程序中生成的,它由jqm beforepageshow事件触发

谢谢你的帮助.

Phi*_*ord 5

你只需要强制刷新:

JS

listview.listview('refresh',true);
Run Code Online (Sandbox Code Playgroud)