fix(layout): 窄屏模式下点击空白关闭菜单栏
Former-commit-id: 990a347264c7151fe05c4c1c43a08a0042ecc019
This commit is contained in:
@@ -10,7 +10,6 @@ import { useSettingsStore } from '@/store/modules/settings';
|
|||||||
|
|
||||||
const { width } = useWindowSize();
|
const { width } = useWindowSize();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 响应式布局容器固定宽度
|
* 响应式布局容器固定宽度
|
||||||
*
|
*
|
||||||
@@ -60,6 +59,7 @@ function handleOutsideClick() {
|
|||||||
<!-- 手机设备 && 侧边栏 → 显示遮罩层 -->
|
<!-- 手机设备 && 侧边栏 → 显示遮罩层 -->
|
||||||
<div
|
<div
|
||||||
v-if="classObj.mobile && classObj.openSidebar"
|
v-if="classObj.mobile && classObj.openSidebar"
|
||||||
|
class="drawer-bg"
|
||||||
@click="handleOutsideClick"
|
@click="handleOutsideClick"
|
||||||
></div>
|
></div>
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ function handleOutsideClick() {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.app-wrapper {
|
.app-wrapper {
|
||||||
&:after {
|
&:after {
|
||||||
content: '';
|
content: '';
|
||||||
display: table;
|
display: table;
|
||||||
clear: both;
|
clear: both;
|
||||||
@@ -99,15 +99,6 @@ function handleOutsideClick() {
|
|||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.drawer-bg {
|
|
||||||
background: #000;
|
|
||||||
opacity: 0.3;
|
|
||||||
width: 100%;
|
|
||||||
top: 0;
|
|
||||||
height: 100%;
|
|
||||||
position: absolute;
|
|
||||||
z-index: 999;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fixed-header {
|
.fixed-header {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -123,4 +114,14 @@ function handleOutsideClick() {
|
|||||||
.mobile .fixed-header {
|
.mobile .fixed-header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.drawer-bg {
|
||||||
|
background: #000;
|
||||||
|
opacity: 0.3;
|
||||||
|
width: 100%;
|
||||||
|
top: 0;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user