|
|
@ -3,7 +3,7 @@ |
|
|
|
<div id="container"> |
|
|
|
<div class="leftSidebar" :style="{ width: state.menuWidth }"> |
|
|
|
<a-flex justify="center" align="center" style="height: 48px;"> |
|
|
|
<TitleOutLined :class="collapsed ? 'small' : 'large'" /> |
|
|
|
<component :is=iconComponents.TitleOutLined :class="collapsed ? 'small' : 'large'" /> |
|
|
|
<span v-if="!collapsed">{{ state.name }}</span> |
|
|
|
</a-flex> |
|
|
|
<a-menu v-model:openKeys="state.openKeys" v-model:selectedKeys="state.selectedKeys" mode="inline" theme="light" |
|
|
@ -41,13 +41,12 @@ |
|
|
|
|
|
|
|
<script setup lang='ts'> |
|
|
|
import { computed, ref, onMounted, h, reactive } from 'vue'; |
|
|
|
import { TitleOutLined } from "@/assets/index" |
|
|
|
import iconComponents from "@/assets/index" |
|
|
|
import { RouterView, useRouter } from 'vue-router' |
|
|
|
import { MenuFoldOutlined, MenuUnfoldOutlined, LogoutOutlined, DashboardOutlined } from '@ant-design/icons-vue'; |
|
|
|
import { get } from "@/tools/request" |
|
|
|
import { message } from 'ant-design-vue'; |
|
|
|
import { useAuthStore } from '@/store/index' |
|
|
|
import { BlogOutLined, SystemOutLined, PhotoOutLined, FileOutLined, DiaryOutLined, CommentOutLined, TypeOutLined } from "@/assets" |
|
|
|
|
|
|
|
const state = reactive({ |
|
|
|
collapsed: false, |
|
|
@ -66,49 +65,49 @@ const items = reactive([ |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: '2', |
|
|
|
icon: () => h(BlogOutLined), |
|
|
|
icon: () => h(iconComponents.BlogOutLined), |
|
|
|
label: '博客管理', |
|
|
|
title: '博客管理', |
|
|
|
url: '/admin/blogmanage' |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: '3', |
|
|
|
icon: () => h(DiaryOutLined), |
|
|
|
icon: () => h(iconComponents.DiaryOutLined), |
|
|
|
label: '日记管理', |
|
|
|
title: '日记管理', |
|
|
|
url: '/admin/diarymanage' |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: '4', |
|
|
|
icon: () => h(TypeOutLined), |
|
|
|
icon: () => h(iconComponents.TypeOutLined), |
|
|
|
label: '分类管理', |
|
|
|
title: '分类管理', |
|
|
|
url: '/admin/typemanage' |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: '5', |
|
|
|
icon: () => h(CommentOutLined), |
|
|
|
icon: () => h(iconComponents.CommentOutLined), |
|
|
|
label: '评论管理', |
|
|
|
title: '评论管理', |
|
|
|
url: '/admin/commentmanage' |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: '6', |
|
|
|
icon: () => h(PhotoOutLined), |
|
|
|
icon: () => h(iconComponents.PhotoOutLined), |
|
|
|
label: '相册管理', |
|
|
|
title: '相册管理', |
|
|
|
url: '/admin/imagemanage' |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: '7', |
|
|
|
icon: () => h(FileOutLined), |
|
|
|
icon: () => h(iconComponents.FileOutLined), |
|
|
|
label: '文件管理', |
|
|
|
title: '文件管理', |
|
|
|
url: '/admin/filemanage' |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: '8', |
|
|
|
icon: () => h(SystemOutLined), |
|
|
|
icon: () => h(iconComponents.SystemOutLined), |
|
|
|
label: '系统设置', |
|
|
|
title: '系统设置', |
|
|
|
url: '/admin/systemmanage' |
|
|
|