长按事件中重复执行代码,变量递增
接管touchStart touchEnd touchStart 中开始 调用setInterval 循环执行递增 touchEnd 清除递增! var Model = function(){ this.callParent(); this.test = justep.Bind.observable(0); }; Model.prototype.button1Touchstart = function(event){ var me = this; this.interval = setInterval(function(){ //开启定时器 me.test.set(me.test.get()+ 1 ); },1000); }; Model.prototype.button1Touchend [...]