hello.js中代码
// pages/hello/hello.js
Page({
data: {
msg:"HELLO HOME"
},
update(){
console.log(10000)
this.setData({
msg:"你好"
})
}
})
hello.wxml中代码:
<!--pages/hello/hello.wxml-->
<text>{
{msg}}</text>
<button bindtap="update">修改</button>
运行效果: