瀏覽代碼

zbytest003-2025-02-17 07:27:52

genlitex 2 月之前
父節點
當前提交
b31766540f
共有 5 個文件被更改,包括 94 次插入18 次删除
  1. 0 0
      dist/assets/index-Btspm7_H.css
  2. 0 4
      dist/assets/index-malWbV8K.js
  3. 0 13
      dist/index.html
  4. 7 1
      src/router/index.js
  5. 87 0
      src/views/Login.vue

文件差異過大導致無法顯示
+ 0 - 0
dist/assets/index-Btspm7_H.css


文件差異過大導致無法顯示
+ 0 - 4
dist/assets/index-malWbV8K.js


+ 0 - 13
dist/index.html

@@ -1,13 +0,0 @@
-<!doctype html>
-<html lang="en">
-  <head>
-    <meta charset="UTF-8" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>Prototype Design</title>
-    <script type="module" crossorigin src="/prototype/3000/assets/index-malWbV8K.js"></script>
-    <link rel="stylesheet" crossorigin href="/prototype/3000/assets/index-Btspm7_H.css">
-  </head>
-  <body>
-    <div id="app"></div>
-  </body>
-</html>

+ 7 - 1
src/router/index.js

@@ -1,11 +1,17 @@
 import { createRouter, createWebHashHistory } from 'vue-router'
-import HomeView from '../views/HomeView.vue'
+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
   }
 ]
 

+ 87 - 0
src/views/Login.vue

@@ -0,0 +1,87 @@
+<template>
+  <div class="login-container">
+    <h2>Login</h2>
+    <form @submit.prevent="handleSubmit">
+      <div>
+        <label for="account">Account:</label>
+        <input id="account" v-model="account" type="text" placeholder="Enter admin" required>
+      </div>
+      <div>
+        <label for="password">Password:</label>
+        <input id="password" v-model="password" type="password" placeholder="Enter admin" required>
+      </div>
+      <div>
+        <label for="rememberMe">Remember Me:</label>
+        <input id="rememberMe" v-model="rememberMe" type="checkbox">
+      </div>
+      <button type="submit">Login</button>
+    </form>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      account: 'admin',
+      password: 'admin',
+      rememberMe: false,
+    };
+  },
+  methods: {
+    handleSubmit() {
+      if (this.account !== 'admin') {
+        alert('Invalid account');
+        return;
+      }
+      // Handle login logic here
+      console.log('Login attempted with account:', this.account);
+    },
+  },
+};
+</script>
+
+<style scoped>
+.login-container {
+  width: 100%;
+  max-width: 400px;
+  margin: 0 auto;
+  padding: 20px;
+  border: 1px solid #ccc;
+  border-radius: 5px;
+  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
+}
+
+.login-container h2 {
+  margin-bottom: 20px;
+}
+
+.login-container label {
+  display: block;
+  margin-top: 10px;
+}
+
+.login-container input[type="text"],
+.login-container input[type="password"] {
+  width: 100%;
+  padding: 8px;
+  margin-top: 5px;
+  border: 1px solid #ccc;
+  border-radius: 3px;
+}
+
+.login-container button {
+  width: 100%;
+  padding: 10px;
+  margin-top: 20px;
+  background-color: #007bff;
+  color: white;
+  border: none;
+  border-radius: 3px;
+  cursor: pointer;
+}
+
+.login-container button:hover {
+  background-color: #0056b3;
+}
+</style>

部分文件因文件數量過多而無法顯示