Commit 4bd45319 authored by shj's avatar shj

[FIX] 페이지네이션으로 가이드 이동 시 nav 활성화 되도록

parent 3800a25a
...@@ -507,6 +507,9 @@ export default{ ...@@ -507,6 +507,9 @@ export default{
activeTargetPaths.push(path.substr(0, index + 1)) activeTargetPaths.push(path.substr(0, index + 1))
} }
// 전체 인덱스 비활성화
this.resetNavActivation(this.guideIndex)
// 활성화 // 활성화
let guideList = this.guideIndex let guideList = this.guideIndex
for(let i=0; i<activeTargetPaths.length; ++i){ for(let i=0; i<activeTargetPaths.length; ++i){
...@@ -520,6 +523,16 @@ export default{ ...@@ -520,6 +523,16 @@ export default{
} }
} }
}, },
// 재귀호출로 tree 전체 active = false 처리
resetNavActivation(parent){
for(let i=0; i<parent.length; ++i){
parent[i].active = false
if(parent[i].children.length > 0){
this.resetNavActivation(parent[i].children)
}
}
}
}, },
mounted(){ mounted(){
this.getGuideIndex() this.getGuideIndex()
...@@ -534,6 +547,9 @@ export default{ ...@@ -534,6 +547,9 @@ export default{
'$store.state.guideNavigator'() { '$store.state.guideNavigator'() {
this.navPositionList = this.$store.state.guideNavigator.map((nav) => nav.position) this.navPositionList = this.$store.state.guideNavigator.map((nav) => nav.position)
}, },
'$route.params.guide'() {
this.activeNav()
},
showSearch(val){ showSearch(val){
if(val){ if(val){
this.$nextTick(()=>{ this.$nextTick(()=>{
......
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