Sencha Touch中的setTimeout()函数不起作用。它会在调用setTimeout时立即执行代码。有没有人有过这个bug的经验/解决方法?
答案 0 :(得分:2)
为什么不使用Ext.Functions.defer; (简称:Ext.defer)
// this syntax is sometimes useful for deferring execution of an anonymous function:
Ext.defer(function(){}, millisecs, scope);
// defer the answer 100ms with the current scope
Ext.defer(function() {
alert('Anonymous');
}, 100, this);
答案 1 :(得分:0)
Defer是Sencha
中SetTimeout函数的变体Ext.Function.defer(function () {
alert('Anonymous');
}, 5000);