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

詳解微信小程序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)文章

最新評論

阿荣旗| 新邵县| 嵊泗县| 武山县| 道孚县| 蓝田县| 沿河| 唐海县| 克东县| 无为县| 海伦市| 昌图县| 容城县| 焉耆| 宜城市| 武穴市| 衡阳县| 双辽市| 喜德县| 青州市| 镇赉县| 淮北市| 景宁| 山东省| 平原县| 许昌市| 黎城县| 永寿县| 齐河县| 富锦市| 兰坪| 高陵县| 三河市| 康定县| 巩留县| 东港市| 民丰县| 阿鲁科尔沁旗| 介休市| 延吉市| 宜阳县|