Skip to content

feat: 新增隐藏左侧菜单参数 - #324

Open
interstellarmt wants to merge 1 commit into
v3from
feat-hide-sidebar
Open

feat: 新增隐藏左侧菜单参数#324
interstellarmt wants to merge 1 commit into
v3from
feat-hide-sidebar

Conversation

@interstellarmt

Copy link
Copy Markdown
Member
  • 配置方式
      {
        slug: 'docs/manual',
        title: {
          zh: '教程',
          en: 'Tutorials',
        },
        sidebar: false,
        order: 2,
      },
  • 效果
    image

<Layout hasSider={shouldShowSidebar} className={styles.layout}>
<CommonHelmet title={title} description={description} />
<Sidebar />
{shouldShowSidebar && <Sidebar />}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里把整个子路由下的侧边栏都隐藏,可能用户体验不太好哦。参考 antd,进入到组件页面时还是可以通过侧边栏切换的。

有一个替代方案,可以在待建设的页面打上 tag

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里把整个子路由下的侧边栏都隐藏,可能用户体验不太好哦。参考 antd,进入到组件页面时还是可以通过侧边栏切换的。

有一个替代方案,可以在待建设的页面打上 tag

我试一下打tag的方式

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

Successfully merging this pull request may close these issues.

2 participants