Explorar el Código

admin-2025-02-17 06:05:12

genlitex hace 2 meses
padre
commit
d8e423b560
Se han modificado 6 ficheros con 54 adiciones y 48 borrados
  1. 2 1
      package-lock.json
  2. 3 3
      package.json
  3. 12 21
      src/router/index.js
  4. 24 0
      src/views/ChatView.vue
  5. 8 23
      src/views/HomeView.vue
  6. 5 0
      vite.config.js

+ 2 - 1
package-lock.json

@@ -10,7 +10,7 @@
       "dependencies": {
         "ant-design-vue": "^4.2.1",
         "vue": "^3.5.13",
-        "vue-router": "^4.0.3"
+        "vue-router": "^4.5.0"
       },
       "devDependencies": {
         "@vitejs/plugin-vue": "^5.2.1",
@@ -1863,6 +1863,7 @@
       "version": "4.5.0",
       "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.5.0.tgz",
       "integrity": "sha512-HDuk+PuH5monfNuY+ct49mNmkCRK4xJAV9Ts4z9UFc4rzdDnxQLyCMGGc8pKhZhHTVzfanpNwB/lwqevcBwI4w==",
+      "license": "MIT",
       "dependencies": {
         "@vue/devtools-api": "^6.6.4"
       },

+ 3 - 3
package.json

@@ -12,11 +12,11 @@
   "dependencies": {
     "ant-design-vue": "^4.2.1",
     "vue": "^3.5.13",
-    "vue-router": "^4.0.3"
+    "vue-router": "^4.5.0"
   },
   "devDependencies": {
     "@vitejs/plugin-vue": "^5.2.1",
-    "vite": "^6.1.0",
-    "unplugin-vue-components": "^0.27.0"
+    "unplugin-vue-components": "^0.27.0",
+    "vite": "^6.1.0"
   }
 }

+ 12 - 21
src/router/index.js

@@ -1,32 +1,23 @@
-import { createRouter, createWebHashHistory } from 'vue-router'
-import HomeView from '../views/HomeView.vue'
+import { createRouter, createWebHistory } from 'vue-router';
+import HomeView from '@/views/HomeView.vue';
+import ChatView from '@/views/ChatView.vue';
 
 const routes = [
   {
     path: '/',
     name: 'home',
-    component: HomeView
+    component: HomeView,
   },
   {
-    // path: '/about',
-    // name: 'about',
-    // route level code-splitting
-    // this generates a separate chunk (about.[hash].js) for this route
-    // which is lazy-loaded when the route is visited.
-    // component: function () {
-    //   return import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
-    // }
+    path: '/chat',
+    name: 'chat',
+    component: ChatView,
   },
-  {
-    path: '/login',
-    name: 'login',
-    component: () => import('../views/LoginView.vue')
-  }
-]
+];
 
 const router = createRouter({
-  history: createWebHashHistory(location.pathname),
-  routes
-})
+  history: createWebHistory(),
+  routes,
+});
 
-export default router
+export default router;

+ 24 - 0
src/views/ChatView.vue

@@ -0,0 +1,24 @@
+<template>
+  <div>
+    <h1>Chat Interface</h1>
+    <div id="chat-window">
+      <!-- Chat Window Content -->
+    </div>
+    <div id="file-manager">
+      <!-- File Upload/Download Management -->
+    </div>
+    <div id="session-manager">
+      <!-- Session Management -->
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'ChatView',
+};
+</script>
+
+<style scoped>
+/* Add styles for chat interface */
+</style>

+ 8 - 23
src/views/HomeView.vue

@@ -1,30 +1,15 @@
 <template>
-  <div class="home">
-    <h2>欢迎使用Prototype Design, 请您根据您的需要设计您的Prototype</h2>
-    <a-button type="primary" @click="goToLogin" class="center-button">Go To Login</a-button>
+  <div>
+    <h1>Home View</h1>
   </div>
 </template>
 
-<script setup>
-import { useRouter } from 'vue-router';
-
-const router = useRouter();
-
-function goToLogin() {
-  router.push({ name: 'login' });
-}
+<script>
+export default {
+  name: 'HomeView',
+};
 </script>
 
-<style>
-.home {
-  height: 100vh;
-  width: 100vw;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-}
-
-.center-button {
-  margin-top: 10px;
-}
+<style scoped>
+/* Add styles for home view */
 </style>

+ 5 - 0
vite.config.js

@@ -13,6 +13,11 @@ export default defineConfig({
     })
   ],
   base: `/ide/proxy/${port}/`,
+  resolve: {
+    alias: {
+      '@': '/src'
+    }
+  },
   server: {
     host: '0.0.0.0', // 监听所有网络
     port, // 确保端口匹配