Hello @lopn, your issue has been closed because it does not conform to our issue requirements. Please use the Issue Helper to create an issue, thank you!
padding-right 不能每次都加, 我觉得最合理的是应该先判断页面是否有滚动条,如果有获取bar宽度,加padding-right, 否则不加
修改成
get scrollBarWidth(): number {
if(document.body.scrollHeight <= (window.innerHeight || document.documentElement.clientHeight)){
return 0;
}
if (isNotNil(this._scrollbarWidth)) {
return this._scrollbarWidth;
}
this.initScrollBarWidth();
return this._scrollbarWidth;
}
同样的情况需要修复
同样的情况需要修复
Any news from that? I agree with the opinion of @lopn, before add a padding-right, verify if exists a scrollbar.
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.
Most helpful comment
padding-right 不能每次都加, 我觉得最合理的是应该先判断页面是否有滚动条,如果有获取bar宽度,加padding-right, 否则不加