From aaa50e2c123ed73d708c60e20ece11b2ade2ea61 Mon Sep 17 00:00:00 2001 From: Your Name <513021407@qq.com> Date: Wed, 11 Oct 2017 13:43:25 +0800 Subject: [PATCH] =?UTF-8?q?#71=20=E7=AC=AC3=E6=AC=A1=E5=AE=9E=E9=AA=8C-?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E6=BB=9A=E5=8A=A8=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1517060322/pages/comp/scroll.js | 110 ++++++++++++++++++++++++++++++ 1517060322/pages/comp/scroll.wxml | 27 ++++++++ 1517060322/pages/comp/scroll.wxss | 1 + 3 files changed, 138 insertions(+) create mode 100644 1517060322/pages/comp/scroll.js create mode 100644 1517060322/pages/comp/scroll.wxml create mode 100644 1517060322/pages/comp/scroll.wxss diff --git a/1517060322/pages/comp/scroll.js b/1517060322/pages/comp/scroll.js new file mode 100644 index 0000000..52ecce0 --- /dev/null +++ b/1517060322/pages/comp/scroll.js @@ -0,0 +1,110 @@ +// pages/comp/scroll.js +var base64 = require("../example/images/base64"); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + isEnd: false, + messages: [{ + name: "习近平", + last: "您好!" + }, { + name: "李克强", + last: "您好!" + }, { + name: "习近平", + last: "您好!" + }, { + name: "李克强", + last: "您好!" + }, { + name: "习近平", + last: "您好!" + }, { + name: "李克强", + last: "您好!" + }, { + name: "习近平", + last: "您好!" + }] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.setData({ + icon20: base64.icon20, + icon60: base64.icon60 + }); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + + onEnd: function () { + console.log("onEnd") + var that = this; + var data = that.data; + that.setData({ + isEnd: true /*, + messages: data.messages.concat([{ + name: "Tom", + last: "Hello!" + }, { + name: "john", + last: "yes." + }]) */ + }); + + } +}) \ No newline at end of file diff --git a/1517060322/pages/comp/scroll.wxml b/1517060322/pages/comp/scroll.wxml new file mode 100644 index 0000000..5e598b2 --- /dev/null +++ b/1517060322/pages/comp/scroll.wxml @@ -0,0 +1,27 @@ + + + + Panel + 面板 + + + + + + + + + + + {{index}} {{item.name}} + {{item.last}} + + + + + + + 正在加载…… + + + \ No newline at end of file diff --git a/1517060322/pages/comp/scroll.wxss b/1517060322/pages/comp/scroll.wxss new file mode 100644 index 0000000..14343d6 --- /dev/null +++ b/1517060322/pages/comp/scroll.wxss @@ -0,0 +1 @@ +/* pages/comp/scroll.wxss */ \ No newline at end of file