0

我有一个通过主干加载到 jQuery 移动前端的视图模板。我已经让 jQuery 样式生效,但它似乎忽略了我的 data-theme 属性并且无论如何都使用值'c'。

这是模板...

<h2>Version Info</h2>
<div id="info">
<a id="addVersionInfoEntryButton" href="#/versioninfo">Add manual entry</a>
<div id="addVersionInfoEntryArea">
</div>
<ul id="items" data-role="listview" data-filter="true" data-theme="f">
    {{#each items}}
    <li>{{dbVersion}} | {{tag}}</li>
    {{/each}}
</ul>
</div>

我在这里加载它......

        listData: function () {
            this.collection.sort();
            this.$el.html(this.template({ items: this.collection.toJSON() }));
            this.$itemsList = this.$('#items');
            this.$addEntryArea = this.$('#addVersionInfoEntryArea');
            this.$addEntryButton = this.$('#addVersionInfoEntryButton');

            if (this.$itemsList.hasClass('ui-listview')) {
                this.$itemsList.listview('refresh');
            }
            else {
                this.$el.trigger('create');
            }
        },

(刷新和创建调用是让 JQM 重新处理动态加载的内容所必需的)。除了应用的样本外,一切都很好。

任何人都可以提供任何建议吗?

更新:

应用的数据主题似乎适用于列表项,但不适用于数据过滤器,默认为“c”

4

0 回答 0