fix: fix incorrent usage of vue router
This commit is contained in:
parent
6ec5588ed4
commit
40f9ac1a6b
@ -3,6 +3,6 @@ import { router } from '@/router'
|
|||||||
export function toLogin() {
|
export function toLogin() {
|
||||||
router.replace({
|
router.replace({
|
||||||
path: '/login',
|
path: '/login',
|
||||||
query: { ...router.currentRoute.query, redirect: router.currentRoute.path },
|
query: { ...router.currentRoute.value.query, redirect: router.currentRoute.value.path },
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ import { useStorage } from '@vueuse/core'
|
|||||||
const title = import.meta.env.VITE_APP_TITLE
|
const title = import.meta.env.VITE_APP_TITLE
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const query = unref(router.currentRoute).query
|
const { query } = useRoute()
|
||||||
|
|
||||||
const loginInfo = ref({
|
const loginInfo = ref({
|
||||||
name: '',
|
name: '',
|
||||||
|
Loading…
Reference in New Issue
Block a user