排序dojox移动ListItem反对标签 [英] sorting dojox mobile ListItem against label

查看:114
本文介绍了排序dojox移动ListItem反对标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想按照字母顺序排列dojox手机 ListItem 。我的DOM中的标签看起来像:

I want to sort dojox mobile ListItem by label alphabetically. The label in my DOM looks like:

<div class="subject">Sort alphabetically against me only</div>
<span class="bomtype"> don't sort against me. </span>

我想按照 class =subject 按升序排列。我使用Dojo 1.9.1。

I want to sort by the text in the label having class="subject" in ascending order. I am using Dojo 1.9.1.

推荐答案

您可以使用dojox / mobile / EdgeToEdgeStoreList或dojox / mobile / RoundRectStoreList :

You can use dojox/mobile/EdgeToEdgeStoreList or dojox/mobile/RoundRectStoreList, for instance:

<ul data-dojo-type="dojox/mobile/EdgeToEdgeStoreList"
    data-dojo-props='store: store, query:{}, queryOptions: {sort: [{attribute: "label", descending: true}]}'></ul>

请注意,正如文中所述,在Dojo 1.9中不推荐使用EdgeToEdgeDataList和RoundRectData列表。

Note that, as documented, EdgeToEdgeDataList and RoundRectData list are deprecated in Dojo 1.9.

这篇关于排序dojox移动ListItem反对标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆