mirror of
https://github.com/iczer/vue-antd-admin
synced 2025-04-05 19:41:37 +08:00
fix: the position problem of pop component in fixed side mode;🐛
修复:固定侧边栏模式下弹出式组件的位置问题;
This commit is contained in:
parent
4e29918bac
commit
8c3afcc3ab
@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<a-layout :class="['admin-layout', fixedSideBar ? 'fixed-side-bar' : '', 'beauty-scroll']">
|
||||
<a-layout :class="['admin-layout', 'beauty-scroll']">
|
||||
<drawer v-if="isMobile" v-model="collapsed">
|
||||
<side-menu :theme="theme.mode" :menuData="menuData" :collapsed="false" :collapsible="false" @menuSelect="onMenuSelect"/>
|
||||
</drawer>
|
||||
<side-menu :theme="theme.mode" v-else-if="layout === 'side'" :menuData="menuData" :collapsed="collapsed" :collapsible="true" />
|
||||
<side-menu :class="[fixedSideBar ? 'fixed-side' : '']" :theme="theme.mode" v-else-if="layout === 'side'" :menuData="menuData" :collapsed="collapsed" :collapsible="true" />
|
||||
<div v-if="fixedSideBar" :style="`width: ${sideMenuWidth}`" class="virtual-side"></div>
|
||||
<drawer v-if="!hideSetting" v-model="showSetting" placement="right">
|
||||
<div class="setting" slot="handler">
|
||||
<a-icon :type="showSetting ? 'close' : 'setting'"/>
|
||||
@ -78,12 +79,17 @@ export default {
|
||||
|
||||
<style lang="less" scoped>
|
||||
.admin-layout{
|
||||
&.fixed-side-bar{
|
||||
height: 100vh;
|
||||
.admin-layout-main{
|
||||
overflow: scroll;
|
||||
.side-menu{
|
||||
&.fixed-side{
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
.virtual-side{
|
||||
display: inline-block;
|
||||
transition: width 0.2s;
|
||||
}
|
||||
.admin-layout-main{
|
||||
.admin-header{
|
||||
top: 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user