| | |
| | | createWebHistory, |
| | | } from 'vue-router'; |
| | | |
| | | import { resetStaticRoutes } from '../packages/utils/src'; |
| | | import { resetStaticRoutes } from '@vben/utils'; |
| | | |
| | | import { createRouterGuard } from './guard'; |
| | | import { routes } from './routes'; |
| | | import { setupBaiduTongJi } from './tongji'; |
| | | import { mobileScroll } from '#/mobile/scroll'; |
| | | |
| | | /** |
| | | * @zh_CN 创建vue-router实例 |
| | |
| | | if (savedPosition) { |
| | | return savedPosition; |
| | | } |
| | | const mobilePosition=mobileScroll(to.path); |
| | | if(mobilePosition)return mobilePosition; |
| | | return to.hash ? { behavior: 'smooth', el: to.hash } : { left: 0, top: 0 }; |
| | | }, |
| | | // 是否应该禁止尾部斜杠。 |