feat: 添加Pinia全局状态管理并重构路由逻辑
添加Pinia作为全局状态管理工具,重构路由参数传递方式 移除URL中的动态参数,改为通过Pinia store传递数据 优化导航菜单样式和交互效果,修复路由激活状态问题 新增全局状态管理示例文档,说明基础使用方法 调整页面布局和样式,提升用户体验
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
</div>
|
||||
<div class="cont2">
|
||||
<el-menu :default-active="activeIndex" class="el-menu-vertical-demo" @select="handleSelect">
|
||||
<el-menu-item index="/:type">
|
||||
<el-menu-item index="/home">
|
||||
<el-icon>
|
||||
</el-icon>
|
||||
<span>首页</span>
|
||||
@@ -144,9 +144,18 @@ onUnmounted(() => {
|
||||
display: block;
|
||||
background-color: rgba(0, 0, 0,0 ); /* 白色半透明背景 */
|
||||
}
|
||||
.cont2 .el-menu-vertical-demo ul li:hover{
|
||||
background-color: rgba(220, 53, 69, 0.9); /* 红色半透明背景 */
|
||||
color: white;
|
||||
.cont2 .el-menu-vertical-demo .el-menu-item:nth-child(3){
|
||||
border-radius: 0 0 10px 10px;
|
||||
}
|
||||
.cont2 .el-menu-vertical-demo .el-menu-item:hover{
|
||||
background-color: rgba(64, 158, 255, 0.9);
|
||||
}
|
||||
.cont2 .el-menu-vertical-demo .el-menu-item.is-active:hover{
|
||||
color: black; /* 蓝色半透明背景 */
|
||||
}
|
||||
|
||||
.cont2 .el-menu-vertical-demo .el-menu-item.is-active{
|
||||
color: var(--nav-is-active);
|
||||
}
|
||||
|
||||
/* 分类列表样式 */
|
||||
|
||||
Reference in New Issue
Block a user