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