写一段注册页面的代码用vue
时间: 2024-06-04 19:13:15 浏览: 3
Sure, here's some sample code for a registration page using Vue:
<template>
<div>
<h2>Register</h2>
<form>
<label for="username">Username:</label>
<input type="text" id="username" v-model="username" required>
<label for="email">Email:</label>
<input type="email" id="email" v-model="email" required>
<label for="password">Password:</label>
<input type="password" id="password" v-model="password" required>
<button @click.prevent="submitForm">Submit</button>
</form>
</div>
</template>
<script>
export default {
data() {
return {
username: '',
email: '',
password: ''
}
},
methods: {
submitForm() {
// handle form submission here
}
}
}
</script>
This is just a basic example, but it should get you started. Let me know if you have any other questions!