Skip to content

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

Closed

Description

@xjcloudy

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

Activity

  1. Tidyzq commented on Apr 8, 2021

    @Tidyzq
    Contributor

    感谢反馈。这个 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions