| | |
| | | :background-color="settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground" |
| | | :text-color="settings.sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor" |
| | | :unique-opened="true" :active-text-color="settings.theme" :collapse-transition="false" mode="vertical"> |
| | | <!-- <el-submenu index="1"> |
| | | <template slot="title"> |
| | | <i class="el-icon-location"></i> |
| | | <span>导航一</span> |
| | | </template> |
| | | <el-menu-item-group> |
| | | <el-menu-item index="1-1">选项1</el-menu-item> |
| | | <el-menu-item index="1-2">选项2</el-menu-item> |
| | | </el-menu-item-group> |
| | | </el-submenu> --> |
| | | <sidebar-item |
| | | v-for="(route, index) in sidebarRouters" |
| | | :key="route.path + index" |
| | | :item="route" |
| | | :base-path="route.path" |
| | | /> |
| | | <!-- <menu-item-recursive :menu-list="menuData" /> --> |
| | | </el-menu> |
| | | </el-scrollbar> |
| | | </div> |
| | |
| | | import Logo from "./Logo" |
| | | import SidebarItem from "./SidebarItem" |
| | | import variables from "@/assets/styles/variables.scss" |
| | | import MenuItemRecursive from './MenuItemRecursive.vue' // 导入递归组件 |
| | | export default { |
| | | components: { SidebarItem, Logo, MenuItemRecursive }, |
| | | components: { SidebarItem, Logo }, |
| | | computed: { |
| | | ...mapState(["settings"]), |
| | | ...mapGetters(["sidebarRouters", "sidebar"]), |