Browse Source

zbytest003-2025-02-26 08:30:14

genlitex 2 months ago
parent
commit
e12b1e2027
5 changed files with 91 additions and 0 deletions
  1. 0 0
      dist/assets/index-FfLi6qx6.css
  2. 4 0
      dist/assets/index-fMVyBumK.js
  3. 14 0
      dist/index.html
  4. 6 0
      src/router/index.js
  5. 67 0
      src/views/LoginView.vue

File diff suppressed because it is too large
+ 0 - 0
dist/assets/index-FfLi6qx6.css


File diff suppressed because it is too large
+ 4 - 0
dist/assets/index-fMVyBumK.js


+ 14 - 0
dist/index.html

@@ -0,0 +1,14 @@
+<!doctype html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Vite + Vue</title>
+    <script type="module" crossorigin src="/ide/proxy/6004/assets/index-fMVyBumK.js"></script>
+    <link rel="stylesheet" crossorigin href="/ide/proxy/6004/assets/index-FfLi6qx6.css">
+  </head>
+  <body>
+    <div id="app"></div>
+  </body>
+</html>

+ 6 - 0
src/router/index.js

@@ -1,11 +1,17 @@
 import { createRouter, createWebHashHistory } from 'vue-router'
 import HomeView from '../views/HomeView.vue'
+import LoginView from '../views/LoginView.vue'
 
 const routes = [
   {
     path: '/',
     name: 'home',
     component: HomeView
+  },
+  {
+    path: '/login',
+    name: 'login',
+    component: LoginView
   }
 ]
 

+ 67 - 0
src/views/LoginView.vue

@@ -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>

Some files were not shown because too many files changed in this diff