mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe
synced 2025-04-30 19:19:29 +08:00
19 lines
385 B
JavaScript
19 lines
385 B
JavaScript
const LoginForm = {
|
|
data: () => ({
|
|
user: {},
|
|
authError: false
|
|
}),
|
|
computed: {
|
|
loggingIn () { return this.$store.state.users.loggingIn }
|
|
},
|
|
methods: {
|
|
submit () {
|
|
this.$store.dispatch('loginUser', this.user).then(
|
|
() => { this.$router.push('/main/friends')},
|
|
() => { this.authError = true }
|
|
)
|
|
}
|
|
}
|
|
}
|
|
|
|
export default LoginForm
|