修改历史记录路由名字
This commit is contained in:
@@ -84,10 +84,10 @@ const routes: Array<RouteRecordRaw> = [
|
||||
component: () => import("@/views/HomeView/library.vue"),
|
||||
},
|
||||
{
|
||||
path: "history111",
|
||||
name: "history111",
|
||||
path: "history",
|
||||
name: "history",
|
||||
meta: { enter: "all" },
|
||||
component: () => import("@/views/HomeView/history111.vue"),
|
||||
component: () => import("@/views/HomeView/history.vue"),
|
||||
},
|
||||
{
|
||||
path: "works",
|
||||
|
||||
@@ -361,11 +361,11 @@ const navTypeList = (t)=>{
|
||||
// Earlierlist:[
|
||||
// ],
|
||||
// },
|
||||
history111:{
|
||||
history:{
|
||||
icon:'fi-br-time-past',
|
||||
label:t('HistoryPage.History'),
|
||||
value:'history111',
|
||||
router:'/home/history111'
|
||||
value:'history',
|
||||
router:'/home/history'
|
||||
},
|
||||
gallery:{
|
||||
icon:'fi-rr-gallery',
|
||||
|
||||
@@ -18,17 +18,17 @@
|
||||
<p>{{$t('Header.NewProject')}}</p>
|
||||
</div>
|
||||
<div class="navList ">
|
||||
<div class="tools list" v-for="item in navTypeList" :class="{active:openType == item.value,history:item.value == 'history','show-history' : showHistory && item.value === 'history111','isHistory' : item.value === 'history111'}">
|
||||
<div class="tools list" v-for="item in navTypeList" :class="{active:openType == item.value,history:item.value == 'history','show-history' : showHistory && item.value === 'history','isHistory' : item.value === 'history'}">
|
||||
<div class="titleBox" @click="setOpenType(item.value,item.list)">
|
||||
<div class="left">
|
||||
<i :class="['fi',item.icon]"></i>
|
||||
<span>{{item.label}}</span>
|
||||
</div>
|
||||
<div class="right" v-if="item.value !== 'history111' ">
|
||||
<div class="right" v-if="item.value !== 'history' ">
|
||||
<i class="fi fi-br-angle-small-down"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detailBox" v-if="item.value != 'history111'" v-show="openType">
|
||||
<div class="detailBox" v-if="item.value != 'history'" v-show="openType">
|
||||
<div class="detail" v-if="item.value != 'history' && item.value != 'cloud'" v-show="openType == item.value">
|
||||
<div class="detailItem" v-for="childItem in item.list" @click="setRouter(item,childItem)" :class="{active:openTypeChild == childItem.value}">
|
||||
<i v-show="childItem.icon" :class="['fi',childItem.icon]"></i>
|
||||
@@ -424,9 +424,9 @@ export default defineComponent({
|
||||
{ immediate: true } // 立即触发一次以处理初始参数
|
||||
);
|
||||
|
||||
// 监听路由,当路由地址为/home/history111时homeMainData.showHistory为true,改变左侧菜单颜色
|
||||
// 监听路由,当路由地址为/home/history时homeMainData.showHistory为true,改变左侧菜单颜色
|
||||
watch(() => route.path, () => {
|
||||
if(route.path == '/home/history111'){
|
||||
if(route.path == '/home/history'){
|
||||
homeMainData.showHistory = true
|
||||
}else{
|
||||
homeMainData.showHistory = false
|
||||
@@ -570,8 +570,8 @@ export default defineComponent({
|
||||
homeMainData.openType = ''
|
||||
}else {
|
||||
homeMainData.openType = type
|
||||
if (type === 'history111') {
|
||||
router.push('/home/history111')
|
||||
if (type === 'history') {
|
||||
router.push('/home/history')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user