|
@@ -0,0 +1,67 @@
|
|
|
+<template>
|
|
|
+ <div class="min-h-screen flex items-center justify-center bg-gray-100">
|
|
|
+ <div class="bg-white p-8 rounded-lg shadow-lg w-7/12">
|
|
|
+ <h2 class="text-2xl font-bold text-center mb-6">应用标题</h2>
|
|
|
+ <form @submit.prevent="handleSubmit" class="space-y-4">
|
|
|
+ <div>
|
|
|
+ <label class="block text-sm font-medium text-gray-700">请输入您的用户名</label>
|
|
|
+ <input
|
|
|
+ v-model="form.username"
|
|
|
+ type="text"
|
|
|
+ placeholder="请输入您的用户名"
|
|
|
+ class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-purple-500"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <label class="block text-sm font-medium text-gray-700">请输入您的密码</label>
|
|
|
+ <input
|
|
|
+ v-model="form.password"
|
|
|
+ type="password"
|
|
|
+ placeholder="请输入您的密码"
|
|
|
+ class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-purple-500"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="flex items-center justify-between">
|
|
|
+ <label class="flex items-center">
|
|
|
+ <input
|
|
|
+ v-model="form.remember"
|
|
|
+ type="checkbox"
|
|
|
+ class="w-4 h-4 text-purple-600 border-gray-300 rounded focus:ring-purple-500"
|
|
|
+ />
|
|
|
+ <span class="ml-2 text-sm text-gray-600">记住我</span>
|
|
|
+ </label>
|
|
|
+ <a href="#/reset-password" class="text-sm text-blue-600 hover:underline">忘记密码?</a>
|
|
|
+ </div>
|
|
|
+ <button
|
|
|
+ type="submit"
|
|
|
+ class="w-1/2 bg-purple-600 text-white py-2 px-4 rounded-md hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-offset-2"
|
|
|
+ >
|
|
|
+ 登录
|
|
|
+ </button>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+import { ref } from 'vue'
|
|
|
+import { useRouter } from 'vue-router'
|
|
|
+
|
|
|
+const router = useRouter()
|
|
|
+
|
|
|
+const form = ref({
|
|
|
+ username: '',
|
|
|
+ password: '',
|
|
|
+ remember: false
|
|
|
+})
|
|
|
+
|
|
|
+const handleSubmit = () => {
|
|
|
+ // Handle login logic here
|
|
|
+ console.log('Form submitted:', form.value)
|
|
|
+ // Example: router.push('/dashboard')
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+/* Add any additional custom styles here if needed */
|
|
|
+</style>
|