首页 > 解决方案 > Bootstrap vue / Bootstrap 侧导航可切换

问题描述

您好,我正在尝试使用 bootstrap-vue 创建侧导航。导航栏应与断点处的标题导航栏一起自动折叠 class="md"。header navbar作为expexted工作,但是sidenav在窗口通过断点时不会出现,也不会在通过断点时收缩。侧边栏的代码如下所示:

<template>
<b-nav vertical class="wrapper">
    <b-collapse is-nav id="nav_collapse">
      <b-nav-item to="/dashboard">Dashboard</b-nav-item>
      <b-nav-item to="/play">Play</b-nav-item>
      <b-nav-item to="/houses">Houses</b-nav-item>
    </b-collapse>
</b-nav>
</template>
<script>
export default {
    name: 'Sidebar',
    data: () => {
        return {

        }
    }
}
</script>

<style scoped>
.wrapper {
    max-width: 100px;
    min-height: 100vh;
    float:left;
    background-color:red;
}
</style>

知道如何解决这个问题吗?

标签: csstwitter-bootstrapvue.js

解决方案


推荐阅读