Skip to content

Commit e7aa62a

Browse files
committed
fix(login): show component on activated instead of mounted
1 parent 15bdfd8 commit e7aa62a

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/components/views/login/LoginComponent.vue

+2-10
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,7 @@ import {
1616
NText,
1717
} from 'naive-ui';
1818
19-
import {
20-
computed,
21-
onActivated,
22-
onDeactivated,
23-
onMounted,
24-
ref,
25-
Transition,
26-
watch,
27-
} from 'vue';
19+
import { computed, onActivated, onDeactivated, ref, Transition, watch } from 'vue';
2820
2921
import { useRoute, useRouter } from 'vue-router';
3022
@@ -52,7 +44,7 @@ const onRedirect = (authenticated = isAuthenticated.value) => {
5244
5345
const show = ref(false);
5446
55-
onMounted(() => {
47+
onActivated(() => {
5648
onRedirect();
5749
watch(isAuthenticated, authenticated => {
5850
onRedirect(authenticated);

0 commit comments

Comments
 (0)