Skip to content

Commit 4e9c030

Browse files
committed
[Fix]修复文章目录 active 效果不显示
1 parent 6ca99e1 commit 4e9c030

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/Catalog.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@
6666
this.$tool.removeClass(list[i], 'catalog-item-active')
6767
}
6868
if (scrollTop >= arr[len - 1]) {
69-
this.$tool.addClass(list[len - 1], 'catalog-active')
69+
this.$tool.addClass(list[len - 1], 'catalog-item-active')
7070
list[i].scrollIntoView()
7171
} else {
72-
this.$tool.removeClass(list[len - 1], 'catalog-active')
72+
this.$tool.removeClass(list[len - 1], 'catalog-item-active')
7373
}
7474
}
7575
})

0 commit comments

Comments
 (0)