Commit 380348e6 authored by 终究还是我们队's avatar 终究还是我们队
Browse files

Add new file

parent e189677f
No related merge requests found
Showing with 39 additions and 0 deletions
+39 -0
<template>
<div>
<h1>Login</h1>
<form @submit.prevent="login">
<div>
<label for="username">Username:</label>
<input type="text" id="username" v-model="username">
</div>
<div>
<label for="password">Password:</label>
<input type="password" id="password" v-model="password">
</div>
<button type="submit">Login</button>
</form>
</div>
</template>
<script>
export default {
name: 'Login',
data() {
return {
username: '',
password: ''
};
},
methods: {
login() {
// Simulate login
this.$store.dispatch('login', { username: this.username, password: this.password });
this.$router.push('/dashboard');
}
}
};
</script>
<style scoped>
/* Styles here */
</style>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment