亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

詳解微信小程序Page中data數(shù)據(jù)操作和函數(shù)調(diào)用

 更新時間:2017年09月27日 15:26:16   作者:tangxiujiang  
這篇文章主要介紹了詳解微信小程序Page中data數(shù)據(jù)操作和函數(shù)調(diào)用的相關(guān)資料,希望通過本文能幫助到大家掌握這方法,需要的朋友可以參考下

微信小程序Page中data數(shù)據(jù)獲取和設(shè)置

一、Page中data數(shù)據(jù)的獲取和設(shè)置:

       1、設(shè)置data數(shù)據(jù) this.setData(object)

setData() 參數(shù)格式:接受一個對象,以 key,value 的形式表示將 this.data 中的 key 對應(yīng)的值改變成 value。其中 key 可以非常靈活,以數(shù)據(jù) 路徑的形式給出,如 array[2].message,a.b.c.d,并且不需要在 this.data 中預(yù)先定義。

this.setData({ 
; encryptionPage: 'display:block', 
}); 

2、獲取data數(shù)據(jù) this.data.object

var text=this.data.text 
Page({ 
 data: { 
 encryption: "color: green; border-bottom-color: green; border-bottom-size: 1px; border-bottom-style: solid;", 
 decryption: "color: gray; border-bottom-color: #F5F5F5; border-bottom-size: 1px; border-bottom-style: solid;", 
 encryptionPage:'display:block', 
 decryptionPage:'display:none', 
 originalText:'', 
 encryptedText:'', 
 originalTextDecode:'', 
 encryptedTextDecode:'', 
 encryptedPassword:'', 
 decryptedPassword:'', 
}, 
 setEncryption: function(e){ 
 this.setData({ 
 encryptionPage: 'display:block', 
 decryptionPage: 'display:none', 
 encryption: "color: green; border-bottom-color: green; border-bottom-size: 1px; border-bottom-style: solid;", 
 decryption: "color: gray; border-bottom-color: #F5F5F5; border-bottom-size: 1px; border-bottom-style: solid;", 
 }) 
 }, 
)} 



如有疑問請留言或者到本站社區(qū)交流討論,感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!

相關(guān)文章

最新評論