mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 03:44:48 +00:00
Doc: optimzie mobile demo
This commit is contained in:
@@ -25,15 +25,12 @@ const router = new VueRouter({
|
||||
base: '/zanui/vue/examples',
|
||||
routes: routesConfig
|
||||
});
|
||||
router.beforeEach((to, from, next) => {
|
||||
|
||||
router.afterEach(() => {
|
||||
const container = document.querySelector('.examples-container');
|
||||
if (container) {
|
||||
document.querySelector('.examples-container').scrollTop = 0;
|
||||
}
|
||||
next();
|
||||
});
|
||||
|
||||
router.afterEach(() => {
|
||||
window.syncPath();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user