update 优化 登录页面redirect重定向功能

This commit is contained in:
疯狂的狮子Li 2023-08-25 12:58:52 +08:00
parent e10f112fa0
commit e7529fbb8f

View File

@ -100,6 +100,10 @@ const loginRef = ref<ElFormInstance>();
// //
const tenantList = ref<TenantVO[]>([]); const tenantList = ref<TenantVO[]>([]);
watch(() => router.currentRoute.value, (newRoute: any) => {
redirect.value = newRoute.query && newRoute.query.redirect;
}, { immediate: true });
const handleLogin = () => { const handleLogin = () => {
loginRef.value?.validate(async (valid: boolean, fields: any) => { loginRef.value?.validate(async (valid: boolean, fields: any) => {
if (valid) { if (valid) {