加入图标,开始加入vuex
This commit is contained in:
parent
3eadf4a27a
commit
922fb4ca4a
|
@ -2,7 +2,7 @@
|
|||
* @Author: Kane
|
||||
* @Date: 2022-12-17 11:08:18
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2023-01-05 16:26:49
|
||||
* @LastEditTime: 2023-01-07 20:54:14
|
||||
* @FilePath: \admin_system\public\index.html
|
||||
* @Description:
|
||||
*
|
||||
|
@ -35,6 +35,9 @@
|
|||
|
||||
body {
|
||||
overflow: hidden;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
max-height: 100vh;
|
||||
}
|
||||
</style>
|
||||
</html>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
* @Author: Kane
|
||||
* @Date: 2023-01-04 11:05:44
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2023-01-06 17:45:34
|
||||
* @FilePath: \admin_system\src\layout\index.vue
|
||||
* @LastEditTime: 2023-01-07 23:16:13
|
||||
* @FilePath: \admin_system\src\layout\Index.vue
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
|
@ -13,7 +13,7 @@
|
|||
<el-header id="layout-header">
|
||||
<LayoutHeader />
|
||||
</el-header>
|
||||
<el-container>
|
||||
<el-container id="layout-container-down">
|
||||
<el-aside id="layout-aside">
|
||||
<LayoutAside />
|
||||
</el-aside>
|
||||
|
@ -40,7 +40,7 @@ export default {
|
|||
<style scoped>
|
||||
#layout-container {
|
||||
height: 100vh;
|
||||
overflow: hiddens;
|
||||
/* overflow: hiddens; */
|
||||
}
|
||||
|
||||
#layout-aside {
|
||||
|
@ -57,7 +57,12 @@ export default {
|
|||
|
||||
#layout-main {
|
||||
background-color: #ddd;
|
||||
overflow-y: auto;
|
||||
overflow-x: auto;
|
||||
/* height: 0; */
|
||||
/* flex-grow: 1; */
|
||||
}
|
||||
|
||||
#layout-container-down {
|
||||
height: calc(100vh - 50px);
|
||||
/* max-height: calc(100vh - 50px); */
|
||||
}
|
||||
</style>
|
|
@ -2,15 +2,15 @@
|
|||
* @Author: Kane
|
||||
* @Date: 2023-01-04 11:30:33
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2023-01-07 16:44:11
|
||||
* @LastEditTime: 2023-01-08 00:02:15
|
||||
* @FilePath: \admin_system\src\layout\components\Aside.vue
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
-->
|
||||
<template>
|
||||
<el-menu id="side-bar" router default-active="/desktop" unique-opened=true background-color="#223142"
|
||||
text-color="#fff" active-text-color="#ffd04b">
|
||||
<el-menu id="side-bar" router :default-active="currentPath" background-color="#223142" text-color="#fff"
|
||||
active-text-color="#ffd04b">
|
||||
<template v-for="route in this.routers" :key="route.path">
|
||||
<template v-if="!route.hidden">
|
||||
<template v-if="hasOnlyChild(route.children)">
|
||||
|
@ -43,7 +43,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { useRouter } from "vue-router";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
|
||||
export default {
|
||||
name: "LayoutAside",
|
||||
|
@ -78,6 +78,13 @@ export default {
|
|||
},
|
||||
|
||||
},
|
||||
computed: {
|
||||
//获取当前的路由
|
||||
currentPath()
|
||||
{
|
||||
return useRoute().path;
|
||||
}
|
||||
},
|
||||
created()
|
||||
{
|
||||
this.routers = useRouter().options.routes;
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2023-01-07 22:25:43
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2023-01-07 22:26:51
|
||||
* @FilePath: \admin_system\src\store\modules\app.js
|
||||
* @Description: app模块
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
const state = {};
|
||||
const getters = {};
|
||||
const mutations = {};
|
||||
const actions = {};
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
getters,
|
||||
mutations,
|
||||
actions
|
||||
};
|
|
@ -2,14 +2,14 @@
|
|||
* @Author: Kane
|
||||
* @Date: 2023-01-06 15:30:12
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2023-01-06 15:30:14
|
||||
* @LastEditTime: 2023-01-07 20:37:55
|
||||
* @FilePath: \admin_system\src\views\overview\OverView.vue
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
-->
|
||||
<template>
|
||||
总览
|
||||
<div class="fill"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -19,5 +19,9 @@ export default {
|
|||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.fill {
|
||||
border: 1px solid salmon;
|
||||
height: 2000px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue