feat: 实现文章搜索功能并优化留言系统

- 添加文章标题搜索功能,支持通过路由参数搜索
- 重构留言板组件,优化留言嵌套结构和交互
- 新增评论演示页面展示嵌套留言功能
- 调整主布局样式和导航菜单路由
- 修复留言板样式问题和数据字段不一致问题
This commit is contained in:
qingfeng1121
2025-10-16 16:11:58 +08:00
parent ed09611d02
commit 266310dea3
9 changed files with 501 additions and 33 deletions

View File

@@ -6,6 +6,7 @@ import NonsensePage from '../views/nonsense.vue'
import MessageBoardPage from '../views/messageboard.vue'
import AboutMePage from '../views/aboutme.vue'
import ArticleContentPage from '../views/articlecontents.vue'
import CommentDemoPage from '../views/commentDemo.vue'
/**
* 路由配置数组
@@ -14,16 +15,56 @@ import ArticleContentPage from '../views/articlecontents.vue'
const routes = [
{
path: '/',
redirect: '/all' // 默认跳转到首页,显示所有文章
redirect: '/home' // 默认跳转到首页,显示所有文章
},
{
path: '/:type',
name: 'home',
component: HomePage,
path: '/comment-demo',
name: 'commentDemo',
component: CommentDemoPage,
meta: {
title: '首页'
title: '嵌套留言Demo'
}
},
{
path: '/home',
name: 'home',
component: HomePage,
meta: { title: '首页' },
children: [
{
path: 'aericletype/:type',
name: 'homeByType'
},
{
path: 'aericletitle/:title',
name: 'homeByTitle'
}
]
},
// {
// path: '/home',
// name: 'home',
// component: HomePage,
// meta: {
// title: '首页'
// }
// },
// {
// path: '/home/aericletype/:type',
// name: 'homeByType',
// component: HomePage,
// meta: {
// title: '首页'
// }
// },
// {
// path: '/home/aericletitle/:title',
// name: 'homeByTitle',
// component: HomePage,
// meta: {
// title: '首页'
// }
// },
{
path: '/article-list',
name: 'articleList',