Skip to content

Commit d74030c

Browse files
committed
fix: edge sider height
1 parent a22763e commit d74030c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/components/page/GlobalLayout.vue

+14
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,18 @@ export default {
121121
this.menus = this.mainMenu.find((item) => item.path === '/').children
122122
this.collapsed = !this.sidebarOpened
123123
},
124+
mounted () {
125+
const userAgent = navigator.userAgent
126+
if (userAgent.indexOf('Edge') > -1) {
127+
this.$nextTick(() => {
128+
this.collapsed = !this.collapsed
129+
setTimeout(() => {
130+
this.collapsed = !this.collapsed
131+
}, 16)
132+
})
133+
}
134+
135+
},
124136
methods: {
125137
...mapActions(['setSidebar']),
126138
toggle () {
@@ -158,6 +170,7 @@ export default {
158170
}
159171
160172
.layout.ant-layout {
173+
height: auto;
161174
overflow-x: hidden;
162175
163176
&.mobile,&.tablet {
@@ -488,6 +501,7 @@ export default {
488501
box-shadow: 2px 0 6px rgba(0, 21, 41, .35);
489502
position: relative;
490503
z-index: 10;
504+
height: auto;
491505
492506
.ant-layout-sider-children:hover {
493507
overflow-y: auto;

0 commit comments

Comments
 (0)