✨ 新页面打开执行日志.
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import type { RouteLocationRaw } from 'vue-router';
|
||||
import { createRouter, createWebHistory } from 'vue-router';
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
import { appRoutes } from './routes';
|
||||
import BASE_ROUTERS from './routes/base';
|
||||
import createRouteGuard from './guard';
|
||||
import { openWindow } from '@/utils';
|
||||
import 'nprogress/nprogress.css';
|
||||
|
||||
NProgress.configure({ showSpinner: false });
|
||||
|
||||
@@ -22,4 +24,10 @@ const router = createRouter({
|
||||
// 创建路由守卫
|
||||
createRouteGuard(router);
|
||||
|
||||
// 新页面打开路由
|
||||
export const openNewRoute = (route: RouteLocationRaw) => {
|
||||
const { href } = router.resolve(route);
|
||||
openWindow(href);
|
||||
};
|
||||
|
||||
export default router;
|
||||
|
||||
Reference in New Issue
Block a user