|
@@ -1,18 +1,20 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <a-row>
|
|
|
|
|
- <a-col>
|
|
|
|
|
- <a-layout-sider
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <a-layout-sider
|
|
|
:trigger="null"
|
|
:trigger="null"
|
|
|
v-model:collapsed="collapsed"
|
|
v-model:collapsed="collapsed"
|
|
|
collapsible
|
|
collapsible
|
|
|
- style="background: #fff; height: 95%;"
|
|
|
|
|
|
|
+ :style="{backgroundColor: bgColor, overflow: 'hidden'}"
|
|
|
breakpoint="lg"
|
|
breakpoint="lg"
|
|
|
>
|
|
>
|
|
|
|
|
+ <div class="logo" >
|
|
|
|
|
+ <img :src="logoPng" alt="">
|
|
|
|
|
+ </div>
|
|
|
<a-menu
|
|
<a-menu
|
|
|
v-model:selectedKeys="selectedKeys2"
|
|
v-model:selectedKeys="selectedKeys2"
|
|
|
:openKeys="openKeys"
|
|
:openKeys="openKeys"
|
|
|
mode="inline"
|
|
mode="inline"
|
|
|
- :style="{ height: '100%', borderRight: 0 }"
|
|
|
|
|
|
|
+ :style="{ borderRight: 0 }"
|
|
|
>
|
|
>
|
|
|
<sidebar-item
|
|
<sidebar-item
|
|
|
:item="route"
|
|
:item="route"
|
|
@@ -21,19 +23,25 @@
|
|
|
:base-path="route.path"
|
|
:base-path="route.path"
|
|
|
/>
|
|
/>
|
|
|
</a-menu>
|
|
</a-menu>
|
|
|
- </a-layout-sider>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- </a-row>
|
|
|
|
|
|
|
+ </a-layout-sider>
|
|
|
|
|
+
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup >
|
|
<script lang="ts" setup >
|
|
|
|
|
|
|
|
-import { onMounted, ref, watch } from 'vue'
|
|
|
|
|
|
|
+import { onMounted, ref, computed } from 'vue'
|
|
|
import { useAppRouter } from '@/store/router'
|
|
import { useAppRouter } from '@/store/router'
|
|
|
import SidebarItem from './SidebarItem.vue'
|
|
import SidebarItem from './SidebarItem.vue'
|
|
|
import { useRouter, useRoute } from 'vue-router'
|
|
import { useRouter, useRoute } from 'vue-router'
|
|
|
import { useEmitter } from '@/hooks'
|
|
import { useEmitter } from '@/hooks'
|
|
|
import { Emitter } from '@/enum'
|
|
import { Emitter } from '@/enum'
|
|
|
|
|
+import { useDesignStore } from '@/store'
|
|
|
|
|
+
|
|
|
|
|
+const logoPng = require('@/assets/logo.png')
|
|
|
|
|
+
|
|
|
|
|
+const designStore = useDesignStore()
|
|
|
|
|
+
|
|
|
|
|
+const bgColor = computed(() => designStore.theme ? '#141414' : '#fff')
|
|
|
|
|
|
|
|
const appRouter = useAppRouter()
|
|
const appRouter = useAppRouter()
|
|
|
|
|
|
|
@@ -64,4 +72,19 @@ onMounted(() => {
|
|
|
/deep/ .ant-layout-sider-children {
|
|
/deep/ .ant-layout-sider-children {
|
|
|
margin-top: -4px;
|
|
margin-top: -4px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+.logo {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 64px;
|
|
|
|
|
+ margin: 20px 0px;
|
|
|
|
|
+ margin-top: 0px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ background-color: transparent;
|
|
|
|
|
+ img {
|
|
|
|
|
+ width: 150px;
|
|
|
|
|
+ height: 50px;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|