|
@@ -1,6 +1,7 @@
|
|
|
<!--pages/home/home.wxml-->
|
|
|
<view>
|
|
|
- <text class="title">首页</text>
|
|
|
+<!-- tap click -->
|
|
|
+ <text class="title" bind:tap="showHi">首页</text>
|
|
|
<!-- 模版渲染 -->
|
|
|
<view>今天是{{day}}</view>
|
|
|
<!-- 条件渲染 -->
|
|
@@ -8,8 +9,14 @@
|
|
|
<view wx:if="{{score >= 90}}">优秀</view>
|
|
|
<view wx:elif="{{score > 60}}">及格</view>
|
|
|
<view wx:else="{{score < 60}}">不及格</view>
|
|
|
- <button>你好</button>
|
|
|
- <input type="text" />
|
|
|
+ <!-- @click v-bind:click -->
|
|
|
+ <button class="main" catch:tap='showHello'>你好</button>
|
|
|
+ <!-- bindconfirm bindtap bindInput -->
|
|
|
+ <input type="text" bindinput="handleInp" />
|
|
|
+ <view class="box1" bind:tap="showMain1">
|
|
|
+ <view class="box2" catch:tap="showMain2"></view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<template name="hi">
|
|
|
<text>hello,今天星期日</text>
|
|
|
<view>成绩:{{score}}</view>
|