Skip to content

Commit

Permalink
fix: 侧边栏消失问题 (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
nexmoe committed Mar 14, 2023
2 parents ca62b59 + 21514d8 commit 44eda7c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions source/lib/mdui_043tiny/mdui.js
Original file line number Diff line number Diff line change
Expand Up @@ -5003,6 +5003,9 @@
// 没有强制关闭,则状态为打开状态
if (!_this.$drawer.hasClass('mdui-drawer-close')) {
_this.state = 'opened';
} else {
// 宽屏下应显示侧边栏
_this.$drawer.removeClass('mdui-drawer-close');
}
}

Expand Down Expand Up @@ -5211,9 +5214,9 @@
_this.state = 'opening';
componentEvent('open', 'drawer', _this, _this.$drawer);

if (!_this.options.overlay) {
$('body').addClass('mdui-drawer-body-' + _this.position);
}
// if (!_this.options.overlay) {
// $('body').addClass('mdui-drawer-body-' + _this.position);
// }

_this.$drawer
.removeClass('mdui-drawer-close')
Expand Down Expand Up @@ -5245,9 +5248,9 @@
_this.state = 'closing';
componentEvent('close', 'drawer', _this, _this.$drawer);

if (!_this.options.overlay) {
$('body').removeClass('mdui-drawer-body-' + _this.position);
}
// if (!_this.options.overlay) {
// $('body').removeClass('mdui-drawer-body-' + _this.position);
// }

_this.$drawer
.addClass('mdui-drawer-close')
Expand Down

0 comments on commit 44eda7c

Please sign in to comment.