update hub
This commit is contained in:
1 parent
731a219527
commit
2e7d636f0f
9 files changed
+162
-432
No files matched your search
@@ -0,0 +1,54 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<div class="left">
|
||||
<navigator />
|
||||
</div>
|
||||
<div class="main">
|
||||
<sidebar class="sidebar" />
|
||||
<router-view />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import Navigator from '@/components/common/Navigator.vue';
|
||||
import Sidebar from '@/components/chat/Sidebar.vue';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'LayoutChat',
|
||||
components: {
|
||||
Sidebar,
|
||||
Navigator
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
.left {
|
||||
width: 60px;
|
||||
height: 100%;
|
||||
border-right: 1px solid var(--el-border-color);
|
||||
}
|
||||
.main {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
.sidebar {
|
||||
display: block;
|
||||
width: 300px;
|
||||
height: 100%;
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,111 +0,0 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<el-aside class="aside">
|
||||
<left-navigator />
|
||||
</el-aside>
|
||||
<el-main class="main"> <router-view /> </el-main>
|
||||
<el-button round class="menu" @click="drawer = true">
|
||||
<font-awesome-icon icon="fa-solid fa-bars" class="icon-menu" />
|
||||
</el-button>
|
||||
<el-drawer v-model="drawer" :with-header="false" size="50%" class="drawer">
|
||||
<left-navigator />
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { ElMain, ElAside, ElButton, ElDrawer } from 'element-plus';
|
||||
import LeftNavigator from '@/components/common/LeftNavigator.vue';
|
||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'LayoutConversation',
|
||||
components: {
|
||||
ElMain,
|
||||
ElAside,
|
||||
ElDrawer,
|
||||
ElButton,
|
||||
LeftNavigator,
|
||||
FontAwesomeIcon
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
drawer: false
|
||||
};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.drawer {
|
||||
.el-drawer__body {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
max-width: initial;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.menu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
$width: 300px;
|
||||
.aside {
|
||||
width: $width;
|
||||
height: 100%;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main {
|
||||
width: calc(100% - $width);
|
||||
background-color: #f3f5f6;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.container {
|
||||
display: block;
|
||||
}
|
||||
.aside {
|
||||
display: none;
|
||||
}
|
||||
.header {
|
||||
display: block;
|
||||
background: white;
|
||||
padding: 15px;
|
||||
padding-top: 50px;
|
||||
height: fit-content;
|
||||
overflow: hidden;
|
||||
.logo {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.main {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.menu {
|
||||
display: block;
|
||||
position: fixed;
|
||||
right: 20px;
|
||||
top: 10px;
|
||||
z-index: 2000;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user