- <!--wxml--><view> {{message}} </view>
- // page.jsPage({
- data: {
- message: 'Hello MINA!'
- }
- })
- <!--wxml--><view wx:for-items="{{array}}"> {{item}} </view>
- // page.jsPage({
- data: {
- array: [1, 2, 3, 4, 5]
- }
- })
- <!--wxml--><view wx:if="{{view == 'WEBVIEW'}}"> WEBVIEW </view><view wx:elif="{{view == 'APP'}}"> APP </view><view wx:else="{{view == 'MINA'}}"> MINA IS NOT APP </view>
- // page.jsPage({
- data: {
- view: 'MINA'
- }
- })
- <!--wxml--><template name="staffName">
- <view>FirstName: {{firstName}}, LastName: {{lastName}} </view></template><template is="staffName" data="{{...staffA}}"></template><template is="staffName" data="{{...staffB}}"></template><template is="staffName" data="{{...staffC}}"></template>
- // page.jsPage({
- data: {
- staffA: {firstName: 'Hulk', lastName: 'Hu'},
- staffB: {firstName: 'Shang', lastName: 'You'},
- staffC: {firstName: 'Gideon', lastName: 'Lin'}
- }
- })
- <view bindtap="add"> {{count}} </view>
- Page({
- data: {
- count: 1
- },
- add: function(e) {this.setData({
- count: this.data.count 1})
- }
- })
新闻热点
疑难解答