Javascript Dojo EdgeToEdgeStoreList带有自定义列表项问题

Javascript Dojo EdgeToEdgeStoreList带有自定义列表项问题,javascript,dojo,Javascript,Dojo,刚刚在使用dojo mobile时遇到了dojo模板问题。我想为EdgeToEdgeStoreList创建自定义列表项 主html文件index.html包含 <div data-dojo-type="dojox.mobile.EdgeToEdgeStoreList" data-dojo-props="itemRenderer:app.widgets.CustomListItem" id="list"></div> js文件 define(["dojo/_base/de

刚刚在使用dojo mobile时遇到了dojo模板问题。我想为EdgeToEdgeStoreList创建自定义列表项

主html文件index.html包含

<div data-dojo-type="dojox.mobile.EdgeToEdgeStoreList" data-dojo-props="itemRenderer:app.widgets.CustomListItem" id="list"></div>
js文件

define(["dojo/_base/declare",
    "dijit/_WidgetBase", 
    "dijit/_TemplatedMixin",
    "dojox/mobile/ListItem",
    "dojo/text!./templates/CustomListItem.html"
    ],
function(declare, WidgetBase, TemplatedMixin, ListItem, template){
    return declare('app.widgets.CustomListItem', [WidgetBase, TemplatedMixin, ListItem],{
    templateString: template
});
})

和小部件的模板:CustomListItem.html

<div>
    <div>TEST TEST</div>
</div>
有人知道为什么我在widget声明中使用这样的顺序WidgetBase、TemplatedMixin、ListItem、dojo会尝试呈现ListItem默认模板,但如果我交换TemplatedMixi和ListItem WidgetBase、ListItem、TemplatedMixin,一切都正常工作吗?我甚至不知道继承顺序对dojo很重要


谢谢。

我对您的问题没有确切的根源解释,但事实是ListItem已经从\u WidgetBase继承了它自己,所以我想说,没有理由让您自己的类复制该继承

declare('app.widgets.CustomListItem', [ListItem, TemplatedMixin],{});

应该可以工作并且更简单?

谢谢,但是我仍然在交换ListItem和TemplateMixin时遇到这种奇怪的行为。没有理由交换它们。ListItem实际上是您在mixin中扩展和模板dmixin的类,因此它在列表中排名第二是正常的。
declare('app.widgets.CustomListItem', [ListItem, TemplatedMixin],{});