mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 10:07:07 +00:00
fix docs
This commit is contained in:
@@ -47,11 +47,10 @@ router.beforeEach((route, redirect, next) => {
|
||||
});
|
||||
|
||||
router.afterEach((route) => {
|
||||
if (route.page !== '/') {
|
||||
const sideNavHeight = document.querySelector('.side-nav').clientHeight;
|
||||
if (route.path !== '/') {
|
||||
const sideNavBox = document.querySelector('.side-nav');
|
||||
const pageContentBox = document.querySelector('.page-content');
|
||||
const pageContentHeight = pageContentBox.clientHeight;
|
||||
pageContentBox.style.height = Math.max(sideNavHeight, pageContentHeight) + 'px';
|
||||
pageContentBox.style.height = Math.max(sideNavBox && sideNavBox.clientHeight, pageContentBox && pageContentBox.clientHeight) + 'px';
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user