clay commit : 解决有三级菜单时面包屑问题
This commit is contained in:
@@ -102,7 +102,13 @@ export default {
|
||||
let time = new Date(date);
|
||||
let year = time.getFullYear();
|
||||
let month = time.getMonth() + 1
|
||||
if (month < 10){
|
||||
month = "0"+month
|
||||
}
|
||||
let day = time.getDate();
|
||||
if (day<10){
|
||||
day = "0"+ day
|
||||
}
|
||||
return year + "-" + month + "-" + day;
|
||||
},
|
||||
getContext(context) {
|
||||
@@ -177,6 +183,7 @@ export default {
|
||||
|
||||
.article_name {
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box; //作为弹性伸缩盒子模型显示。
|
||||
|
||||
@@ -217,8 +217,8 @@ export default {
|
||||
this.type = this.$route.query && this.$route.query.type
|
||||
if (this.type == 3 || this.type == 1 || this.type == 2) {
|
||||
this.secondId = id
|
||||
this.getCrumbs();
|
||||
this.showSecond = false
|
||||
this.getCrumbs();
|
||||
let info = getParentNode(this.secondId);
|
||||
console.log("获取到info", info)
|
||||
if (arcId != undefined) {
|
||||
@@ -232,8 +232,10 @@ export default {
|
||||
} else {
|
||||
console.log(this.navId, "this.navId")
|
||||
if (undefined == this.navId) {
|
||||
console.log(this.navId, "this.navId1")
|
||||
this.secondId = id
|
||||
this.getNodes()
|
||||
this.getCrumbs();
|
||||
}
|
||||
}
|
||||
this.showSecond = true
|
||||
@@ -245,7 +247,10 @@ export default {
|
||||
} catch (e) {
|
||||
}
|
||||
this.showIndex = 0
|
||||
console.log("开始循环查找id信息")
|
||||
// if (this.secondId!=id){
|
||||
// this.getCrumbs();
|
||||
// }
|
||||
console.log("开始循环查找id信息",this.secondId == id && this.navList,this.secondId , id, this.navList)
|
||||
if (this.secondId == id && this.navList) {
|
||||
for (let i = 0; i < this.navList.length; i++) {
|
||||
if (this.navId == this.navList[i].encodeId) {
|
||||
@@ -286,7 +291,7 @@ export default {
|
||||
/**
|
||||
* 获得面包屑导航
|
||||
*/
|
||||
getCrumbs() {
|
||||
getCrumbs(id) {
|
||||
crumbs(this.secondId).then(res => {
|
||||
this.crumbs = res.data
|
||||
})
|
||||
@@ -593,7 +598,6 @@ export default {
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
font-size: 1.4rem !important;
|
||||
color: #3C3C3C;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user