@@ -11,6 +11,12 @@ const route = useRoute()
|
|||||||
|
|
||||||
const showLayout = computed(() => route.meta.layout !== 'blank' && !!auth.token)
|
const showLayout = computed(() => route.meta.layout !== 'blank' && !!auth.token)
|
||||||
|
|
||||||
|
const menuColors = computed(() =>
|
||||||
|
theme.isDark
|
||||||
|
? { bg: '#282828', text: '#cfd8e3', active: '#ffffff' }
|
||||||
|
: { bg: '#f9fafb', text: '#1f2937', active: '#0f172a' },
|
||||||
|
)
|
||||||
|
|
||||||
function logout() {
|
function logout() {
|
||||||
auth.logout()
|
auth.logout()
|
||||||
router.replace('/login')
|
router.replace('/login')
|
||||||
@@ -19,14 +25,14 @@ function logout() {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-container v-if="showLayout" class="app">
|
<el-container v-if="showLayout" class="app">
|
||||||
<el-aside width="220px" class="aside">
|
<el-aside width="220px" class="aside" :class="{ 'aside-light': !theme.isDark }">
|
||||||
<div class="brand">期货报告</div>
|
<div class="brand">期货报告</div>
|
||||||
<el-menu
|
<el-menu
|
||||||
:default-active="route.path"
|
:default-active="route.path"
|
||||||
router
|
router
|
||||||
background-color="#282828"
|
:background-color="menuColors.bg"
|
||||||
text-color="#cfd8e3"
|
:text-color="menuColors.text"
|
||||||
active-text-color="#ffffff"
|
:active-text-color="menuColors.active"
|
||||||
>
|
>
|
||||||
<el-menu-item index="/scores">打分列表</el-menu-item>
|
<el-menu-item index="/scores">打分列表</el-menu-item>
|
||||||
<el-menu-item index="/chart">K 线 / 持仓</el-menu-item>
|
<el-menu-item index="/chart">K 线 / 持仓</el-menu-item>
|
||||||
@@ -79,6 +85,11 @@ body {
|
|||||||
background: #282828;
|
background: #282828;
|
||||||
color: #cfd8e3;
|
color: #cfd8e3;
|
||||||
}
|
}
|
||||||
|
.aside-light {
|
||||||
|
background: #f9fafb;
|
||||||
|
color: #1f2937;
|
||||||
|
border-right: 1px solid var(--el-border-color-light);
|
||||||
|
}
|
||||||
.brand {
|
.brand {
|
||||||
height: 60px;
|
height: 60px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -88,6 +99,9 @@ body {
|
|||||||
letter-spacing: 2px;
|
letter-spacing: 2px;
|
||||||
border-bottom: 1px solid #3a3a3a;
|
border-bottom: 1px solid #3a3a3a;
|
||||||
}
|
}
|
||||||
|
.aside-light .brand {
|
||||||
|
border-bottom: 1px solid #e5e7eb;
|
||||||
|
}
|
||||||
.header {
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|||||||
Reference in New Issue
Block a user