Skip to content

[BUG]navbar weui-tab__content 不显示 #160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
xjcloudy opened this issue Mar 22, 2021 · 1 comment
Closed

[BUG]navbar weui-tab__content 不显示 #160

xjcloudy opened this issue Mar 22, 2021 · 1 comment

Comments

@xjcloudy
Copy link

Bug描述

新人,求指教。一开始,是使用 demo 里面的代码。在我的项目中调试。发现 content 中的内容始终不显示。通过调试 发现。 weui-tab__content 的默认 wsxx 样式 是 dsiplay:none。 而 通过hidden 来控制 不起作用。 在社区里提了问题。没有得到 回复。
隔天,我干脆 clone 了 demo 的代码。在本地 跑起来,发现一样的问题。干脆 就 提个issue 吧。

复现方式

https://developers.weixin.qq.com/community/develop/doc/000a860803c0a8b9fadb32a1f56000?fromCreate=0

版本信息

  • weui 版本 [useExtendedLib 引入则直接填写 useExtendedLib] :useExtendedLib
@Tidyzq
Copy link
Contributor

Tidyzq commented Apr 8, 2021

感谢反馈。这个 example/navbar 页面其实已经废弃了。正确的使用方式应该是:

<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>

@Tidyzq Tidyzq closed this as completed in ef8ac6c Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants