瀏覽代碼

zbytest003-2025-02-26 08:47:36

genlitex 2 月之前
父節點
當前提交
9e16ff37e8

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


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


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


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


+ 2 - 2
dist/index.html

@@ -5,8 +5,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">
+    <script type="module" crossorigin src="/ide/proxy/6003/assets/index-D0LcR6tI.js"></script>
+    <link rel="stylesheet" crossorigin href="/ide/proxy/6003/assets/index-Dj3iCrS2.css">
   </head>
   <body>
     <div id="app"></div>

+ 6 - 0
src/router/index.js

@@ -1,6 +1,7 @@
 import { createRouter, createWebHashHistory } from 'vue-router'
 import HomeView from '../views/HomeView.vue'
 import LoginView from '../views/LoginView.vue'
+import HomePage from '../views/HomePage.vue'
 
 const routes = [
   {
@@ -12,6 +13,11 @@ const routes = [
     path: '/login',
     name: 'login',
     component: LoginView
+  },
+  {
+    path: '/homepage',
+    name: 'homepage',
+    component: HomePage
   }
 ]
 

+ 90 - 0
src/views/HomePage.vue

@@ -0,0 +1,90 @@
+<template>
+  <div class="min-h-screen bg-gray-100">
+    <!-- Top Navigation -->
+    <header class="bg-purple-900 text-white border-b">
+      <div class="flex items-center justify-between px-4 py-2">
+        <div class="flex items-center space-x-2">
+          <span class="text-2xl font-bold">应用名称</span>
+        </div>
+
+        <div class="flex-1 max-w-xl mx-4">
+          <div class="relative">
+            <input
+                type="text"
+                placeholder="搜索联系人或历史消息"
+                class="w-full pl-10 pr-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500"
+            />
+          </div>
+        </div>
+
+        <div class="flex items-center space-x-4">
+          <button class="px-3 py-1 text-white bg-purple-500 rounded-md">登录/注册</button>
+        </div>
+      </div>
+    </header>
+
+    <div class="flex">
+      <!-- Sidebar -->
+      <aside class="w-64 min-h-screen bg-purple-900 border-r">
+        <div class="p-4 bg-purple-800 text-white text-center">
+          <h2 class="text-lg font-bold">应用标题</h2>
+        </div>
+        <nav class="p-4">
+          <ul class="space-y-2">
+            <li v-for="(contact, index) in contacts" :key="index" class="flex items-center p-4 hover:bg-purple-800 cursor-pointer">
+              <img :src="contact.avatar" alt="Contact Avatar" class="w-10 h-10 rounded-full mr-3" />
+              <span>{{ contact.name }}</span>
+            </li>
+          </ul>
+        </nav>
+      </aside>
+
+      <!-- Main Content -->
+      <main class="flex-1 p-6 bg-gray-100">
+        <!-- Conversation Area -->
+        <div class="bg-gray-200 rounded-lg p-6 mb-4 h-full overflow-y-auto">
+          <div v-for="(message, index) in messages" :key="index" class="mb-4">
+            <div v-if="message.sender === 'user'" class="flex justify-end">
+              <div class="bg-purple-500 text-white p-3 rounded-lg max-w-2/3">
+                {{ message.text }}
+              </div>
+            </div>
+            <div v-else class="flex justify-start">
+              <div class="bg-gray-300 p-3 rounded-lg max-w-2/3">
+                {{ message.text }}
+              </div>
+            </div>
+          </div>
+        </div>
+
+        <!-- Input Area -->
+        <div class="flex items-center border-t">
+          <button class="bg-purple-500 text-white px-4 py-2 rounded-l-lg">发送</button>
+          <input
+              type="text"
+              placeholder="输入消息..."
+              class="flex-1 p-2 border-t border-b"
+          />
+          <button class="bg-purple-500 text-white px-4 py-2 rounded-r-lg">+</button>
+        </div>
+      </main>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ref } from 'vue'
+
+const contacts = [
+  { name: '张三', avatar: 'https://via.placeholder.com/100' },
+  { name: '李四', avatar: 'https://via.placeholder.com/100' },
+  { name: '王五', avatar: 'https://via.placeholder.com/100' },
+  { name: '赵六', avatar: 'https://via.placeholder.com/100' },
+  { name: '孙七', avatar: 'https://via.placeholder.com/100' }
+]
+
+const messages = [
+  { sender: 'user', text: '你好,有什么我可以帮忙的吗?' },
+  { sender: 'other', text: '你好,我想了解一下你们的服务。' }
+]
+</script>

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