mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
refactor(projects): 路由文件夹重构
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
// import { computed } from 'vue';
|
||||
// import { useRoute } from 'vue-router';
|
||||
// import { RouteNameMap } from '@/router';
|
||||
// import { ROUTE_NAME_MAP } from '@/utils';
|
||||
|
||||
export default function useRouteParam() {
|
||||
// const route = useRoute();
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { EnumRoutePath } from '@/enum';
|
||||
import { RouteNameMap } from '@/router';
|
||||
import { ROUTE_NAME_MAP } from '@/utils';
|
||||
|
||||
export default function useRouteQuery() {
|
||||
const route = useRoute();
|
||||
@ -9,7 +9,7 @@ export default function useRouteQuery() {
|
||||
/** 登录跳转链接 */
|
||||
const loginRedirectUrl = computed(() => {
|
||||
let url: EnumRoutePath | undefined;
|
||||
if (route.name === RouteNameMap.get('login')) {
|
||||
if (route.name === ROUTE_NAME_MAP.get('login')) {
|
||||
url = (route.query?.redirectUrl as EnumRoutePath) || '';
|
||||
}
|
||||
return url;
|
||||
|
Reference in New Issue
Block a user