最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

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

 更新時(shí)間: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ù)格式:接受一個(gè)對(duì)象,以 key,value 的形式表示將 this.data 中的 key 對(duì)應(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ǐng)留言或者到本站社區(qū)交流討論,感謝閱讀,希望能幫助到大家,謝謝大家對(duì)本站的支持!

相關(guān)文章

最新評(píng)論

鄄城县| 马山县| 湖南省| 闽清县| 安康市| 肥东县| 峨眉山市| 宝丰县| 台安县| 岳池县| 通州市| 新化县| 和硕县| 莱西市| 永川市| 左云县| 舒兰市| 泸西县| 马鞍山市| 河曲县| 兰西县| 山东省| 西平县| 大英县| 黄龙县| 临洮县| 宾川县| 蒙城县| 贵州省| 香港| 库伦旗| 南皮县| 河津市| 鸡东县| 鄂温| 陕西省| 忻城县| 平邑县| 吉林省| 滨州市| 平泉县|