refactor:change layout

This commit is contained in:
Pan 2017-11-24 14:01:54 +08:00 committed by 花裤衩
parent cd047c5ac4
commit 4332f02642
7 changed files with 11 additions and 11 deletions

View File

@ -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;

View File

@ -12,7 +12,7 @@
<script>
import { Navbar, Sidebar, AppMain } from '@/views/layout'
import { Navbar, Sidebar, AppMain } from '@/views/layout/components'
export default {
name: 'layout',

View File

@ -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: {

View File

@ -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'