mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
fix(projects): 修复登录的重定向地址
This commit is contained in:
@ -1,20 +1,7 @@
|
||||
import { computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { RouteNameMap } from '@/router';
|
||||
// import { computed } from 'vue';
|
||||
// import { useRoute } from 'vue-router';
|
||||
// import { RouteNameMap } from '@/router';
|
||||
|
||||
export default function useRouteParam() {
|
||||
const route = useRoute();
|
||||
|
||||
/** 登录跳转链接 */
|
||||
const loginRedirectUrl = computed(() => {
|
||||
let url = '';
|
||||
if (route.name === RouteNameMap.get('login')) {
|
||||
url = (route.params?.redirectUrl as string) ?? '';
|
||||
}
|
||||
return url;
|
||||
});
|
||||
|
||||
return {
|
||||
loginRedirectUrl
|
||||
};
|
||||
// const route = useRoute();
|
||||
}
|
||||
|
Reference in New Issue
Block a user