欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

微信小程序 toast組件詳細(xì)介紹

 更新時間:2016年09月28日 09:07:30   作者:順子_RTFSC  
這篇文章主要介紹了 微信小程序 toast組件詳細(xì)介紹的相關(guān)資料,需要的朋友可以參考下

toast消息提示框,可用在提示一些信息,比如清楚緩存給用戶一個友好的提示!或操作一些請求不想讓用戶有什么操作,toast也可以做到因?yàn)閠oast顯示時其他操作是無效的

主要屬性:

wxml

<!--點(diǎn)擊button觸發(fā)toast-->
<button type="primary" bindtap="listenerButton">點(diǎn)擊顯示toast</button>
<!--toast消息框顯示3秒,并綁定事件-->
<toast hidden="{{hiddenToast}}" duration="3000" bindchange="toastHidden" >OK!</toast>

js

Page({
 data:{
 // text:"這是一個頁面"
 hiddenToast: true
 },

/**
 * 監(jiān)聽button點(diǎn)擊事件
 */
 listenerButton: function() {
  this.setData({
   hiddenToast: !this.data.hiddenToast
  })
 },
 /**
 * toast顯示時間到時處理業(yè)務(wù) 
 */
 toastHidden:function(){
  this.setData({
   hiddenToast: true
  })
 },

 onLoad:function(options){
 // 頁面初始化 options為頁面跳轉(zhuǎn)所帶來的參數(shù)
 },
 onReady:function(){
 // 頁面渲染完成
 },
 onShow:function(){
 // 頁面顯示
 },
 onHide:function(){
 // 頁面隱藏
 },
 onUnload:function(){
 // 頁面關(guān)閉
 }
})



相關(guān)文章:

hello WeApp                      icon組件
Window 
                            text組件                                switch組件
tabBar底部導(dǎo)航                 progress組件                        action-sheet
應(yīng)用生命周期                    button組件                            modal組件
頁面生命周期
                    checkbox組件                       toast組件
模塊化詳                           form組件詳                            loading 組件
數(shù)據(jù)綁定
                           input 組件                             navigator 組件
View組件                          picker組件                             audio 組件
scroll-view組件                 radio組件                              video組件
swiper組件                        slider組件                              Image組件

相關(guān)文章

最新評論