BlackHuLi

Results 4 comments of BlackHuLi

我买了课程,加您微信了,麻烦通过下哈

app.$on('reduce', function () { console.log("我被减了"); this.message--; }); app.$once('reduceOnce', function () { console.log('只执行一次的方法'); this.message--; }); //如果按钮在作用域外部,可以利用$emit来执行。 function reduce() { app.$emit('reduce'); } function reduceOnce() { app.$emit('reduce'); //app.$emit('reduceOnce'); } 实例事件中,这样子始终可以执行减,$once是什么原理呢

@zxiao0216 > @blackHuLi > > > app.$on('reduce', function () { > > console.log("我被减了"); > > this.message--; > > }); > > app.$once('reduceOnce', function () { > > console.log('只执行一次的方法'); > >...

@Xanadu-zs > 怎么没人?没人敢学吗?哈哈哈 你学了吗?感觉weex很少人使用啊