<view bindtap="bindIsDown" class="nav-Title" data-isdown="{{isDown}}" > <text class="nav-titles">2222</text> <image src="../../image/exam/{{isDown==0?'down':'up'}}.png"></image> </view> <view class="navCont" hidden="{{isDown==0?true:false}}"> <view class="sidebar-Left" bindtap="bindIsDown"> <view bindtap='change' > <text>99999</text> </view> </view> </view>
bindIsDown: function (t) { var that = this, e = t.currentTarget.dataset.isdown; e = 0 == e ? 1 : 0, that.setData({ isDown: e }); },