一个小程序开发的舒尔特训练
1.页面
{{msg}}
{{useTime}} 秒
2. css
/* pages/index/index.wxss */
.abc {
margin-right:2px;
margin-top:1px;
margin-left:2px;
height: 138rpx;
text-align: center;
}
.line{
display:flex;
}
3. js
查看代码
// pages/index2/index2.js
Page({
/**
* 页面的初始数据
*/
data: {
array:[1,2,3,4]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
clickButton: function(e){
console.log('------',e.target.dataset.item)
},
gotoPage(){
wx.navigateTo({
url: '/pages/index/index?rows=3',
})
}
})
4. 框架