We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55eca46 commit ef8ac6cCopy full SHA for ef8ac6c
tools/demo/example/navbar/navbar.wxml
@@ -9,9 +9,9 @@
9
</block>
10
</view>
11
<view class="weui-tab__panel">
12
- <view class="weui-tab__content" hidden="{{activeIndex != 0}}">选项一的内容</view>
13
- <view class="weui-tab__content" hidden="{{activeIndex != 1}}">选项二的内容</view>
14
- <view class="weui-tab__content" hidden="{{activeIndex != 2}}">选项三的内容</view>
+ <view class="weui-tab__content" style="display: {{activeIndex === 0 ? 'block' : 'none'}}">选项一的内容</view>
+ <view class="weui-tab__content" style="display: {{activeIndex === 1 ? 'block' : 'none'}}">选项二的内容</view>
+ <view class="weui-tab__content" style="display: {{activeIndex === 2 ? 'block' : 'none'}}">选项三的内容</view>
15
16
17
0 commit comments