feat: 项目详情路由调整

This commit is contained in:
huangchenhao 2026-04-09 18:27:00 +08:00
parent 17b0871ab5
commit 0a062cb564

View File

@ -1,12 +1,8 @@
<template>
<div class="breadcrumb-container">
<el-breadcrumb separator="/">
<el-breadcrumb-item
v-for="(item, index) in breadcrumbList"
:key="index"
:class="{ 'is-link': index < breadcrumbList.length - 1 }"
@click="handleBreadcrumbClick(item, index)"
>
<el-breadcrumb-item v-for="(item, index) in breadcrumbList" :key="index"
:class="{ 'is-link': index < breadcrumbList.length - 1 }" @click="handleBreadcrumbClick(item, index)">
{{ item.title }}
</el-breadcrumb-item>
</el-breadcrumb>
@ -15,7 +11,9 @@
<div class="breadcrumb-actions" v-if="breadcrumbList.length > 1">
<el-dropdown trigger="click" @command="handleCloseAction">
<el-button type="text" size="small" class="close-btn">
<el-icon><Close /></el-icon>
<el-icon>
<Close />
</el-icon>
关闭
</el-button>
<template #dropdown>
@ -23,7 +21,8 @@
<el-dropdown-item command="close-current">关闭当前页</el-dropdown-item>
<el-dropdown-item command="close-other" :disabled="breadcrumbList.length <= 2">关闭其他页</el-dropdown-item>
<el-dropdown-item command="close-left" :disabled="currentIndex === 0">关闭左侧</el-dropdown-item>
<el-dropdown-item command="close-right" :disabled="currentIndex === breadcrumbList.length - 1">关闭右侧</el-dropdown-item>
<el-dropdown-item command="close-right"
:disabled="currentIndex === breadcrumbList.length - 1">关闭右侧</el-dropdown-item>
<el-dropdown-item command="close-all" :disabled="breadcrumbList.length <= 1">全部关闭</el-dropdown-item>
</el-dropdown-menu>
</template>
@ -102,7 +101,25 @@ const generateBreadcrumb = () => {
name: 'projectAdd',
meta: { title: '项目填报' }
})
} else {
} else if (currentPath.includes('/projectDetail')) {
//
//
breadcrumbList.value.push({
title: '项目管理',
path: '/projectManagement',
name: 'projectManagement',
meta: { title: '项目管理' }
})
//
breadcrumbList.value.push({
title: '项目详情',
path: currentPath,
name: 'projectDetail',
meta: { title: '项目详情' }
})
}
else {
//
matched.forEach((record, index) => {
//