1
0
mirror of https://github.com/FatttSnake/Pinnacle-OA.git synced 2026-04-05 23:11:24 +08:00

Fixed scrollbar

This commit is contained in:
2023-05-31 19:06:18 +08:00
parent 4e4baf81ed
commit e696b20c5b
4 changed files with 178 additions and 163 deletions

View File

@@ -5,7 +5,7 @@
--font-secondary-color: #9E9E9E; --font-secondary-color: #9E9E9E;
} }
body { .body {
color: var(--font-main-color); color: var(--font-main-color);
user-select: none; user-select: none;
min-width: 1100px; min-width: 1100px;

View File

@@ -1,5 +1,7 @@
<template> <template>
<el-backtop target=".main-box" :right="80" :bottom="80" /> <el-backtop target=".main-box" :right="80" :bottom="80" />
<el-scrollbar style="height: 100vh; width: 100vw">
<div class="body">
<div class="background"> <div class="background">
<el-container class="fill"> <el-container class="fill">
<el-aside width="collapse" class="background-white aside"> <el-aside width="collapse" class="background-white aside">
@@ -8,7 +10,10 @@
:collapse="isCollapsed" :collapse="isCollapsed"
:unique-opened="true" :unique-opened="true"
:default-active=" :default-active="
this.$route.path.indexOf('/', this.$route.path.indexOf('/') + 1) !== -1 this.$route.path.indexOf(
'/',
this.$route.path.indexOf('/') + 1
) !== -1
? this.$route.path.indexOf( ? this.$route.path.indexOf(
'/', '/',
this.$route.path.indexOf( this.$route.path.indexOf(
@@ -37,7 +42,11 @@
<el-menu-item <el-menu-item
@mousedown.left="changeCollapsed" @mousedown.left="changeCollapsed"
:disabled="true" :disabled="true"
style="cursor: pointer; opacity: 1; border-bottom: 1px #ddd solid" style="
cursor: pointer;
opacity: 1;
border-bottom: 1px #ddd solid;
"
> >
<el-icon :size="SIZE_ICON_LG()"> <el-icon :size="SIZE_ICON_LG()">
<icon-pinnacle-pinnacle :color="COLOR_PRODUCTION()" /> <icon-pinnacle-pinnacle :color="COLOR_PRODUCTION()" />
@@ -120,7 +129,10 @@
<div style="display: flex"> <div style="display: flex">
<div class="user-head"> <div class="user-head">
<el-avatar> <el-avatar>
<el-icon :size="SIZE_ICON_SM()" :color="COLOR_FONT_MAIN()"> <el-icon
:size="SIZE_ICON_SM()"
:color="COLOR_FONT_MAIN()"
>
<icon-pinnacle-user /> <icon-pinnacle-user />
</el-icon> </el-icon>
</el-avatar> </el-avatar>
@@ -143,14 +155,19 @@
> >
</div> </div>
<div> <div>
<el-button @click="logout" style="width: 100%">退出</el-button> <el-button @click="logout" style="width: 100%"
>退出</el-button
>
</div> </div>
</div> </div>
</template> </template>
</el-popover> </el-popover>
</el-header> </el-header>
<ElScrollbar v-if="$route.meta.requiresScrollbar"> <ElScrollbar v-if="$route.meta.requiresScrollbar">
<ElMain class="main-box" :class="{ noPadding: !$route.meta.requiresPadding }"> <ElMain
class="main-box"
:class="{ noPadding: !$route.meta.requiresPadding }"
>
<ElBacktop :right="100" :bottom="100" /> <ElBacktop :right="100" :bottom="100" />
<RouterView></RouterView> <RouterView></RouterView>
</ElMain> </ElMain>
@@ -166,6 +183,8 @@
</el-container> </el-container>
</el-container> </el-container>
</div> </div>
</div>
</el-scrollbar>
</template> </template>
<script lang="ts"> <script lang="ts">

View File

@@ -10,7 +10,7 @@ const infoRouter = {
meta: { meta: {
title: '员工信息管理', title: '员工信息管理',
requiresMenu: true, requiresMenu: true,
requiresScrollbar: false, requiresScrollbar: true,
requiresPadding: true requiresPadding: true
} }
} }
@@ -19,8 +19,6 @@ const infoRouter = {
title: '信息管理', title: '信息管理',
icon: shallowRef(IconPinnacleInfo), icon: shallowRef(IconPinnacleInfo),
requiresMenu: true, requiresMenu: true,
requiresScrollbar: false,
requiresPadding: true,
requiresAuth: true requiresAuth: true
} }
} }

View File

@@ -10,7 +10,7 @@ const powerRouter = {
meta: { meta: {
title: '角色管理', title: '角色管理',
requiresMenu: true, requiresMenu: true,
requiresScrollbar: false, requiresScrollbar: true,
requiresPadding: true requiresPadding: true
} }
}, },
@@ -21,7 +21,7 @@ const powerRouter = {
meta: { meta: {
title: '用户组管理', title: '用户组管理',
requiresMenu: true, requiresMenu: true,
requiresScrollbar: false, requiresScrollbar: true,
requiresPadding: true requiresPadding: true
} }
}, },
@@ -32,7 +32,7 @@ const powerRouter = {
meta: { meta: {
title: '用户管理', title: '用户管理',
requiresMenu: true, requiresMenu: true,
requiresScrollbar: false, requiresScrollbar: true,
requiresPadding: true requiresPadding: true
} }
} }
@@ -41,8 +41,6 @@ const powerRouter = {
title: '权限管理', title: '权限管理',
icon: shallowRef(IconPinnaclePower), icon: shallowRef(IconPinnaclePower),
requiresMenu: true, requiresMenu: true,
requiresScrollbar: false,
requiresPadding: true,
requiresAuth: true requiresAuth: true
} }
} }