【发布时间】:2012-02-03 18:13:17
【问题描述】:
谁能告诉我如何打破 Sencha Ext.each 循环?
【问题讨论】:
标签: sencha-touch extjs
谁能告诉我如何打破 Sencha Ext.each 循环?
【问题讨论】:
标签: sencha-touch extjs
如果您返回 false,则找到我自己的答案,它将不会在循环中进行下一次迭代。
Ext.each(arrayObj, function(obj){
if(obj.isSomethingTrue()){
doSomething();
return false; /*this will prevent each from looking at
the next obj in the arrayObj*/
}
});
【讨论】: