页面上导航栏搜索栏显示不全bug
This commit is contained in:
@@ -85,14 +85,6 @@ function resolvePath(routePath, routeQuery) {
|
||||
if (isExternal(props.basePath)) {
|
||||
return props.basePath
|
||||
}
|
||||
// 特殊处理门诊医生站路径,确保路径正确
|
||||
if (routePath === '/doctorstation' || routePath === 'doctorstation') {
|
||||
if (routeQuery) {
|
||||
let query = JSON.parse(routeQuery);
|
||||
return { path: '/doctorstation', query: query }
|
||||
}
|
||||
return '/doctorstation'
|
||||
}
|
||||
if (routeQuery) {
|
||||
let query = JSON.parse(routeQuery);
|
||||
return { path: getNormalPath(props.basePath + '/' + routePath), query: query }
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div
|
||||
:class="{ 'has-logo': showLogo }"
|
||||
:style="{
|
||||
backgroundColor:
|
||||
sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground,
|
||||
}"
|
||||
>
|
||||
:class="{ 'has-logo': showLogo }"
|
||||
:style="{
|
||||
backgroundColor:
|
||||
sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground,
|
||||
}"
|
||||
class="sidebar-layout"
|
||||
>
|
||||
<!-- <logo v-if="showLogo" :collapse="isCollapse" /> -->
|
||||
<!-- <el-scrollbar :class="sideTheme" wrap-class="scrollbar-wrapper"> -->
|
||||
<el-menu
|
||||
:default-active="activeMenu"
|
||||
:collapse="isCollapse"
|
||||
@@ -27,7 +27,6 @@
|
||||
:base-path="route.path"
|
||||
/>
|
||||
</el-menu>
|
||||
<!-- </el-scrollbar> -->
|
||||
<navbar @setLayout="setLayout" class="navbar-container" />
|
||||
<settings ref="settingRef" />
|
||||
</div>
|
||||
@@ -40,7 +39,7 @@ import variables from '@/assets/styles/variables.module.scss';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useSettingsStore from '@/store/modules/settings';
|
||||
import usePermissionStore from '@/store/modules/permission';
|
||||
import { computed } from 'vue';
|
||||
import { computed, ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { Navbar, Settings } from '@/layout/components';
|
||||
|
||||
@@ -71,27 +70,27 @@ function setLayout() {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.scrollbar-wrapper {
|
||||
overflow-x: auto !important;
|
||||
width: 100%;
|
||||
}
|
||||
/* 移除滚动条样式 */
|
||||
|
||||
.el-menu--horizontal {
|
||||
display: flex !important;
|
||||
justify-content: center !important;
|
||||
border-bottom: none !important;
|
||||
background-color: transparent !important;
|
||||
min-width: auto;
|
||||
flex-wrap: nowrap;
|
||||
overflow: hidden !important;
|
||||
white-space: nowrap;
|
||||
|
||||
& > .el-menu-item,
|
||||
& > .el-sub-menu {
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
color: #fff;
|
||||
padding: 0 20px !important;
|
||||
padding: 0 15px !important;
|
||||
font-size: 14px;
|
||||
min-width: 120px !important;
|
||||
border: 1px solid red !important;
|
||||
min-width: auto !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
:deep(.svg-icon) {
|
||||
@@ -101,6 +100,7 @@ function setLayout() {
|
||||
|
||||
:deep(.el-sub-menu__title) {
|
||||
padding-right: 25px !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
:deep(.el-sub-menu__icon-arrow) {
|
||||
@@ -113,7 +113,20 @@ function setLayout() {
|
||||
}
|
||||
|
||||
/* 水平布局,并与 Navbar 正确配合 */
|
||||
div {
|
||||
.sidebar-layout {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
height: 50px;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
|
||||
& > .el-menu {
|
||||
flex: 1;
|
||||
height: 50px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
&.has-logo {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@@ -121,12 +134,6 @@ div {
|
||||
height: 50px;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
|
||||
& > .el-scrollbar {
|
||||
flex: 1;
|
||||
height: 50px;
|
||||
min-width: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user