-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
yufeng04
committed
Aug 29, 2018
1 parent
ac3f95f
commit d7f2a74
Showing
6 changed files
with
185 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
App({ | ||
/** | ||
* 生命周期函数--监听小程序初始化 | ||
*/ | ||
globalData: {$1}, | ||
/** | ||
* 生命周期函数--监听小程序初始化 | ||
* 当小程序初始化完成时,会触发 onLaunch(全局只触发一次) | ||
*/ | ||
onLaunch: function (options) { | ||
$2 | ||
}, | ||
/** | ||
* 生命周期函数--监听小程序显示 | ||
* 当小程序启动,或从后台进入前台显示,会触发 onShow | ||
*/ | ||
onShow: function (options) { | ||
$3 | ||
}, | ||
/** | ||
* 生命周期函数--监听小程序隐藏 | ||
* 当小程序从前台进入后台,会触发 onHide | ||
*/ | ||
onHide: function (options) { | ||
$4 | ||
} | ||
}); | ||
]]></content> | ||
<tabTrigger>App</tabTrigger> | ||
<description>Baidu smartApp(注册程序)</description> | ||
<scope>source.js</scope> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
Page({ | ||
/** | ||
* 页面的初始数据 | ||
*/ | ||
data: {$1}, | ||
/** | ||
* 监听页面加载 | ||
*/ | ||
onLoad: function (options) { | ||
$2 | ||
}, | ||
/** | ||
* 监听页面初次渲染完成 | ||
*/ | ||
onReady: function () { | ||
$3 | ||
}, | ||
/** | ||
* 监听页面显示 | ||
*/ | ||
onShow: function () { | ||
$4 | ||
}, | ||
/** | ||
* 监听页面隐藏 | ||
*/ | ||
onHide: function () { | ||
$5 | ||
}, | ||
/** | ||
* 监听页面卸载 | ||
*/ | ||
onUnload: function () { | ||
$6 | ||
}, | ||
/** | ||
* 监听用户下拉动作 | ||
*/ | ||
onPullDownRefresh: function () { | ||
$7 | ||
}, | ||
/** | ||
* 页面上拉触底事件的处理函数 | ||
*/ | ||
onReachBottom: function () { | ||
$8 | ||
}, | ||
/** | ||
* 用户点击右上角转发 | ||
*/ | ||
onShareAppMessage: function () { | ||
$9 | ||
}, | ||
/** | ||
* 页面滚动触发事件的处理函数 | ||
*/ | ||
onPageScroll: function () { | ||
$10 | ||
}, | ||
/** | ||
* 当前是 tab 页时,点击 tab 时触发 | ||
*/ | ||
onTabItemTap: function(item) { | ||
$11 | ||
}, | ||
customData: {$12} | ||
}); | ||
]]></content> | ||
<tabTrigger>Page</tabTrigger> | ||
<description>Baidu smartApp(注册页面)</description> | ||
<scope>source.js</scope> | ||
</snippet> |