refactor:change layout
This commit is contained in:
23
src/views/layout/components/Sidebar/index.vue
Normal file
23
src/views/layout/components/Sidebar/index.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<el-menu mode="vertical" theme="dark" :default-active="$route.path">
|
||||
<sidebar-item :routes="routes"></sidebar-item>
|
||||
</el-menu>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SidebarItem from './SidebarItem'
|
||||
export default {
|
||||
components: { SidebarItem },
|
||||
computed: {
|
||||
routes() {
|
||||
return this.$router.options.routes
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.el-menu {
|
||||
min-height: 100%;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user