onLoad
- 生命周期函数--监听页面加载
- 发送异步请求,初始化页面数据
onLoad: function (options) {
console.log(" Page ---- onLoad")
},
onShow
- 生命周期函数--监听页面显示
onShow: function () {
console.log("onShow")
},
onReady
- 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
console.log("onReady")
},
onHide
- 生命周期函数--监听页面隐藏
*/
onHide: function () {
console.log("onHide")
},
onUnload
- 生命周期函数--监听页面卸载 通过超链接来演示
*/
onUnload: function () {
console.log("onUnload")
},
onPullDownRefresh
- 页面相关事件处理函数--监听用户下拉动作
- 页面的数据 或者效果 重新 刷新
*/
onPullDownRefresh: function () {
console.log("onPullDownRefresh")
},
ononReachBottomide
- 页面上拉触底事件的处理函数
- 需要页面的滚动才行 滑动到底就出现哦
- 上啦加载下一页数据
*/
onReachBottom: function () {
console.log("onReachBottom")
},
onShareAppMessage
- 用户点击右上角分享
*/
onShareAppMessage: function () {
console.log("onShareAppMessage")
},
onPageScroll
// 页面滚动就可以触发
onPageScroll(){
console.log("onPageScroll")
},
onResize页面吃春发送改变的时候
// 小程序发生了横屏和竖屏 切换的时候触发 模拟器可以模拟横屏和竖屏
onResize(){
console.log("onResize")
},
onTabItemTap
// 要求当前的页面 也是tabbar的页面
// 点击自己的tab才会触发
onTabItemTap(){
console.log("onTabItemTap")
}
快速敲出 100个View view{$}*100
<!--pages/demo18/demo18.wxml-->
<navigator url="/pages/demo17/demo17" open-type="navigate">
demo17
</navigator>
<navigator url="/pages/demo17/demo17" open-type="redirect">
关闭当前页面,跳转到下一个页面
</navigator>
<!--
快速敲出 100个View view{$}*100
-->
<view>1</view>
<view>2</view>
<view>3</view>
<view>4</view>
<view>5</view>
<view>6</view>
<view>7</view>
<view>8</view>
<view>9</view>
<view>10</view>
<view>11</view>
<view>12</view>
<view>13</view>
<view>14</view>
<view>15</view>
<view>16</view>
<view>17</view>
<view>18</view>
<view>19</view>
<view>20</view>
<view>21</view>
<view>22</view>
<view>23</view>
<view>24</view>
<view>25</view>
<view>26</view>
<view>27</view>
<view>28</view>
<view>29</view>
<view>30</view>
<view>31</view>
<view>32</view>
<view>33</view>
<view>34</view>
<view>35</view>
<view>36</view>
<view>37</view>
<view>38</view>
<view>39</view>
<view>40</view>
<view>41</view>
<view>42</view>
<view>43</view>
<view>44</view>
<view>45</view>
<view>46</view>
<view>47</view>
<view>48</view>
<view>49</view>
<view>50</view>
<view>51</view>
<view>52</view>
<view>53</view>
<view>54</view>
<view>55</view>
<view>56</view>
<view>57</view>
<view>58</view>
<view>59</view>
<view>60</view>
<view>61</view>
<view>62</view>
<view>63</view>
<view>64</view>
<view>65</view>
<view>66</view>
<view>67</view>
<view>68</view>
<view>69</view>
<view>70</view>
<view>71</view>
<view>72</view>
<view>73</view>
<view>74</view>
<view>75</view>
<view>76</view>
<view>77</view>
<view>78</view>
<view>79</view>
<view>80</view>
<view>81</view>
<view>82</view>
<view>83</view>
<view>84</view>
<view>85</view>
<view>86</view>
<view>87</view>
<view>88</view>
<view>89</view>
<view>90</view>
<view>91</view>
<view>92</view>
<view>93</view>
<view>94</view>
<view>95</view>
<view>96</view>
<view>97</view>
<view>98</view>
<view>99</view>
<view>100</view>
网友评论