Commit 8ec492f7 by yanju

子栏目刷新时title 掉的问题解决

parent 7f638e62
......@@ -93,7 +93,6 @@ export default {
},
created() {
this.dataGetBlogCategory();
this.getLabelTitle();
this.dataGetHotTagsList();
this.dataGetHotBloggersList();
this.handleArticleList();
......@@ -111,6 +110,8 @@ export default {
},
dataGetBlogCategory(){
let type = this.$route.query.type;
this.typeList.map((val) => {
this.list.push({
label: val.category,
......@@ -119,6 +120,9 @@ export default {
childList:[],
title:val.categoryFull
})
if(val.categoryId.toString()===type){
this.labelTitle = val.categoryFull||val.category
}
})
this.typeList.map(async (val,index) => {
if(!val.leaf){
......@@ -131,6 +135,9 @@ export default {
childId: val.categoryId.toString(),
title:val.categoryFull
})
if(val.categoryId.toString()===type){
this.labelTitle = val.categoryFull||val.category
}
})
this.list[index+1].childList = childList
}
......@@ -139,19 +146,19 @@ export default {
getLabelTitle(){
let type = this.$route.query.type;
this.list.map((val,index)=>{
this.list.map((val,index)=>{
if(val.childList){
val.childList.map((chVal) => {
if(chVal.childId===type){
this.labelTitle = chVal.title||chVal.label
}
})
}
if(val.type===type){
this.labelTitle = val.title||val.label
}
})
if(val.childList){
val.childList.map((chVal) => {
if(chVal.childId===type){
this.labelTitle = chVal.title||chVal.label
}
})
}
if(val.type===type){
this.labelTitle = val.title||val.label
}
})
},
restartPagination(){
if(process.browser){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment