php小程序onload,微信小程序 loading 组件实例详解
這篇文章主要介紹了微信小程序 loading 組件實(shí)例詳解的相關(guān)資料,需要的朋友可以參考下
loading通常使用在請(qǐng)求網(wǎng)絡(luò)數(shù)據(jù)時(shí)的一種方式,通過(guò)hidden屬性設(shè)置顯示與否
主要屬性:
wxml
顯示loading
正在加載
js
Page({
data:{
// text:"這是一個(gè)頁(yè)面"
hiddenLoading: true
},
/**
* 監(jiān)聽(tīng)button點(diǎn)擊事件
*/
listenerButton:function(){
this.setData({
hiddenLoading: !this.data.hiddenLoading
})
},
onLoad:function(options){
// 頁(yè)面初始化 options為頁(yè)面跳轉(zhuǎn)所帶來(lái)的參數(shù)
},
onReady:function(){
// 頁(yè)面渲染完成
},
onShow:function(){
// 頁(yè)面顯示
},
onHide:function(){
// 頁(yè)面隱藏
},
onUnload:function(){
// 頁(yè)面關(guān)閉
}
})
更多微信小程序 loading 組件實(shí)例詳解相關(guān)文章請(qǐng)關(guān)注PHP中文網(wǎng)!
本文原創(chuàng)發(fā)布php中文網(wǎng),轉(zhuǎn)載請(qǐng)注明出處,感謝您的尊重!
總結(jié)
以上是生活随笔為你收集整理的php小程序onload,微信小程序 loading 组件实例详解的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 同步与异步以及线程与进程
- 下一篇: php获取数组中的全部可以吗,php获取