feat: 初始化前后端Node.js控制台项目基础架构
- 创建项目核心文件:package.json、vite.config.js、.gitignore - 添加前后端基础依赖和开发工具配置 - 完善OpenSpec模块,包括项目文档和核心能力规格 - 配置ESLint和Prettier代码规范 - 创建基本目录结构 - 实现前端Vue3应用框架和路由 - 添加后端Express服务器和基础路由 - 编写README项目说明文档
This commit is contained in:
23
src/frontend/router/index.js
Normal file
23
src/frontend/router/index.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import LogView from '../views/LogView.vue'
|
||||
import CommandView from '../views/CommandView.vue'
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'logs',
|
||||
component: LogView
|
||||
},
|
||||
{
|
||||
path: '/commands',
|
||||
name: 'commands',
|
||||
component: CommandView
|
||||
}
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes
|
||||
})
|
||||
|
||||
export default router
|
||||
Reference in New Issue
Block a user