refactor:change layout
This commit is contained in:
parent
cd047c5ac4
commit
4332f02642
|
@ -1,9 +1,11 @@
|
|||
<template>
|
||||
<el-breadcrumb class="app-levelbar" separator="/">
|
||||
<el-breadcrumb class="app-breadcrumb" separator="/">
|
||||
<transition-group name="breadcrumb">
|
||||
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
||||
<router-link v-if='item.redirect==="noredirect"||index==levelList.length-1' to="" class="no-redirect">{{item.name}}</router-link>
|
||||
<router-link v-else :to="item.redirect||item.path">{{item.name}}</router-link>
|
||||
</el-breadcrumb-item>
|
||||
</transition-group>
|
||||
</el-breadcrumb>
|
||||
</template>
|
||||
|
||||
|
@ -36,7 +38,7 @@ export default {
|
|||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.app-levelbar.el-breadcrumb {
|
||||
.app-breadcrumb.el-breadcrumb {
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
line-height: 50px;
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
|
||||
<script>
|
||||
import { Navbar, Sidebar, AppMain } from '@/views/layout'
|
||||
import { Navbar, Sidebar, AppMain } from '@/views/layout/components'
|
||||
|
||||
export default {
|
||||
name: 'layout',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<el-menu class="navbar" mode="horizontal">
|
||||
<hamburger class="hamburger-container" :toggleClick="toggleSideBar" :isActive="sidebar.opened"></hamburger>
|
||||
<levelbar></levelbar>
|
||||
<breadcrumb></breadcrumb>
|
||||
<el-dropdown class="avatar-container" trigger="click">
|
||||
<div class="avatar-wrapper">
|
||||
<img class="user-avatar" :src="avatar+'?imageView2/1/w/80/h/80'">
|
||||
|
@ -13,7 +13,9 @@
|
|||
Home
|
||||
</el-dropdown-item>
|
||||
</router-link>
|
||||
<el-dropdown-item divided><span @click="logout" style="display:block;">LogOut</span></el-dropdown-item>
|
||||
<el-dropdown-item divided>
|
||||
<span @click="logout" style="display:block;">LogOut</span>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</el-menu>
|
||||
|
@ -21,12 +23,12 @@
|
|||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import Levelbar from './Levelbar'
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import Hamburger from '@/components/Hamburger'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Levelbar,
|
||||
Breadcrumb,
|
||||
Hamburger
|
||||
},
|
||||
computed: {
|
|
@ -1,7 +1,3 @@
|
|||
export { default as Navbar } from './Navbar'
|
||||
|
||||
export { default as Sidebar } from './Sidebar'
|
||||
|
||||
export { default as Levelbar } from './Levelbar'
|
||||
|
||||
export { default as AppMain } from './AppMain'
|
Loading…
Reference in New Issue