page({
data: {
title: 'alipay',
array: [{ user: 'li' }, { user: 'zhao' }],
},
});
<view>{{title}}view> <view>{{array[0].user}}view>
<view ontap="handletap">click meview>
page({
handletap() {
console.log('yo! view tap!');
},
});
<view>{{text}}view> <button ontap="changetext">change normal databutton>
page({
data: {
text: 'init data',
},
changetext() {
this.setdata({
text: 'changed data',
});
},
});