在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
不多说,直接上代码: wxml页面: <!--收起折叠 begin--> <view style='width:100%;background:#fff;border-top:1px solid #d7d7d7;'> <view style='float:left;width:200px;height:90px;display:{{displaymore}}' bindtap='sourcelistshow'>全部课程</view> <view style='float:left;width:200px;height:90px;display:{{displayless}}' bindtap='sourcelistless'>点击收起</view> <view style='height:200px;width:80%;background:#fff;float:left;border:1px solid #000;display:{{display}}'>隐藏的内容</view> <view style='float:left;height:200px;width:80%;background:#fff;border:1px solid #000'>123123123123</view> </view> <!--收起折叠 end--> js页面: Page({
data: {
display:'none',
displaymore:'block',
displayless: 'none'
},
sourcelistshow: function(){
console.log('more')
var that = this
that.setData({ display: 'block', displaymore:'none',displayless:'block' })
},
sourcelistless: function () {
console.log('less')
var that = this
that.setData({ display: 'none', displaymore: 'block', displayless: 'none' })
}
|
请发表评论