wxml:
wxss:
.hide{
display: none;
}
.show{
display: block;
}
js:
Page({
data: {
showView: true
},
onLoad: function (options) {
showView: (options.showView == "true" ? true : false)
}
, onChangeShowState: function () {
var that = this;
that.setData({
showView: (!that.data.showView)
})
}
})
另一种方式:
wxml:
js:
showView:true;
onChangeShowState: function () {
var that = this;
that.setData({
showView: (!that.data.showView)
。。。。。。。。。。。。。
作者:Vam的金豆之路
篇幅有限更多请见扩展链接:http://www.mark-to-win.com/tutorial/51000.html
留言与评论(共有 0 条评论) “” |