| | |
| | | import { Modal, notification } from 'ant-design-vue'; |
| | | import { warn } from '@/utils/log'; |
| | | import { unref } from 'vue'; |
| | | import { prefixCls } from '@/settings/designSetting'; |
| | | import { setRouteChange } from '@/logics/mitt/routeChange'; |
| | | import { createPermissionGuard } from './permissionGuard'; |
| | | import { createStateGuard } from './stateGuard'; |
| | |
| | | router.afterEach(async (to) => { |
| | | // scroll top |
| | | isHash((to as RouteLocationNormalized & { href: string })?.href) && |
| | | document.querySelector('.vben-layout-content')?.scrollTo(0, 0); |
| | | document.querySelector(`.${prefixCls}-layout-content`)?.scrollTo(0, 0); |
| | | return true; |
| | | }); |
| | | } |