You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

134 lines
3.0 KiB

<template>
2 months ago
<div :class="classObj" class="app-wrapper">
4 months ago
<!-- 头部区域独占一行 -->
<div class="header-container">
2 months ago
<navbar /> <!-- 导航栏组件 -->
4 months ago
</div>
2 months ago
4 months ago
<!-- 主内容区域 -->
<div class="main-container">
2 months ago
<!-- 左侧边栏 -->
<sidebar class="sidebar-container" />
<div style="display: flex;flex-direction: column;width: 100%;">
<!-- 面包屑 -->
<div class="breadword-container">
<Breadword></Breadword>
</div>
<!-- 右侧内容区域 -->
<div class="content-container">
2 months ago
<app-main style="background-color: #FAFAFA;" />
2 months ago
</div>
<!-- <el-backtop target=".content-container" :visibility-height = "0"></el-backtop> -->
</div>
</div>
4 months ago
2 months ago
4 months ago
<right-panel>
2 months ago
<settings />
4 months ago
</right-panel>
2 months ago
</div>
</template>
<script>
import RightPanel from '@/components/RightPanel'
import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
import ResizeMixin from './mixin/ResizeHandler'
import { mapState } from 'vuex'
import variables from '@/assets/styles/variables.scss'
4 months ago
import Breadword from './components/breadword.vue'
export default {
name: 'Layout',
components: {
AppMain,
Navbar,
RightPanel,
Settings,
Sidebar,
4 months ago
TagsView,
Breadword
},
mixins: [ResizeMixin],
computed: {
...mapState({
theme: state => state.settings.theme,
sideTheme: state => state.settings.sideTheme,
sidebar: state => state.app.sidebar,
needTagsView: state => state.settings.tagsView,
fixedHeader: state => state.settings.fixedHeader
}),
classObj() {
return {
openSidebar: this.sidebar.opened,
4 months ago
withoutAnimation: this.sidebar.withoutAnimation
}
},
variables() {
return variables;
}
},
2 months ago
methods: {}
}
</script>
<style lang="scss" scoped>
2 months ago
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
2 months ago
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
background-image: url("../../src/assets/images/bg@2x.png");
background-size: 100% 100%;
}
2 months ago
.header-container {
width: 100%;
// height: $base-header-height;
background-image: url("../../src/assets/images/top@1x.png");
background-size: 100% 100%;
background-repeat: no-repeat;
z-index: 1000;
}
2 months ago
.main-container {
display: flex;
border-radius: 1rem 1rem 0 0;
margin-right: .3rem;
flex: 1;
2 months ago
// overflow: hidden;
overflow-y: auto;
2 months ago
background-color: #FAFAFA;
}
2 months ago
.sidebar-container {
width: $base-sidebar-width;
height: calc(100% - 60px);
transition: width 0.28s;
margin-top: 60px;
background-color: #f0f2f5;
}
4 months ago
2 months ago
.breadword-container {
background-color: #fff;
border-radius: 1rem 1rem 0 0;
}
2 months ago
.content-container {
height: 100%;
overflow: hidden;
overflow-y: auto;
background-color: #f0f2f5;
transition: margin-left 0.28s;
2 months ago
&.sidebarHide {
margin-left: 0;
}
2 months ago
}
4 months ago
</style>