<button type="primary" bindtap="btnTapHandler">按钮</button>
<button type="primary" bindtap="CountChange">+1</button>
Page({
data: {
count:0
},
// 定义按钮的事件处理函数
btnTapHandler(e){
console.log(e)
},
CountChange(e){
this.setDate({
count:this.data.count +1
})
}
})
VM1168 WAService.js:2 TypeError: this.setDate is not a function
at Vi.CountChange (event.js? [sm]:12)
at Object.i.safeCallback (VM1168 WAService.js:2)
at VM1168 WAService.js:2
at Sr (VM1168 WAService.js:2)
at VM1168 WAService.js:2
at b (VM1168 WAService.js:2)
at VM1168 WAService.js:2
at VM1168 WAService.js:2
at s (VM8 asdebug.js:1)
at c (VM8 asdebug.js:1)(env: Windows,mp,1.05.2203070; lib: 2.23.0)
setData不是setDate