feat(前端): 实现用户登录、注册和搜索功能

- 新增登录和注册页面组件
- 实现用户登录、注册和登出逻辑
- 添加笔记搜索功能
- 更新主页组件,支持用户状态显示和搜索
- 引入 Pinia 状态管理库
This commit is contained in:
2025-07-31 09:45:49 +08:00
parent ab4891d8db
commit 2f9e68c636
13 changed files with 523 additions and 6 deletions

View File

@@ -1,6 +1,8 @@
import { createRouter, createWebHistory } from 'vue-router';
import HomePage from '../components/HomePage.vue';
import MarkdownEditor from '../components/MarkdownEditor.vue';
import LoginPage from '../components/LoginPage.vue';
import RegisterPage from '../components/RegisterPage.vue';
const routes = [
{
@@ -22,6 +24,16 @@ const routes = [
name: 'EditMarkdown',
component: MarkdownEditor,
props: true
},
{
path: '/login',
name: 'Login',
component: LoginPage
},
{
path: '/register',
name: 'Register',
component: RegisterPage
}
];