wxml
代码片段
<view class=“search_line” bindtap=“optionPanelSwitcHandler” >
<text class=“gray”>选择筛选条件</text>
<text class=“light_gray”>
<text class=“item” hidden="{{!optionPanel.degree}}">{{optionPanel.degree}}</text>
<text class=“item” hidden="{{!optionPanel.college_province}}">{{optionPanel.college_province}}</text>
<text class=“item” hidden="{{!optionPanel.college_tags}}">{{optionPanel.college_tags}}</text>
<text class=“item” hidden="{{!optionPanel.major_category}}">{{optionPanel.major_category}}</text>
<text class=“item” hidden="{{!optionPanel.major_subject}}">{{optionPanel.major_subject}}</text>
<text class=“item” hidden="{{!optionPanel.major_name}}">{{optionPanel.major_name}}</text>
</text>
<text class=“right_area” >{{ optionPanelVisible ? ‘收拢’ : ‘展开’ }}</text>
</view>
样式代码
效果
如图所见,text上的hidden效果并没有效
目前我的解决方式是 写class控制class