mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-21 04:50:14 +08:00
fix(anchor): active link not correct
This commit is contained in:
parent
b26f98da4e
commit
fe83212c06
@ -173,7 +173,7 @@ export default {
|
|||||||
})
|
})
|
||||||
const currentActiveHref = this.activeHref
|
const currentActiveHref = this.activeHref
|
||||||
const activeLink = links.reduce((prevLink, link, index) => {
|
const activeLink = links.reduce((prevLink, link, index) => {
|
||||||
if (index === links.length - 1 && link.top + link.height < 0) {
|
if (link.top + link.height < 0) {
|
||||||
return prevLink
|
return prevLink
|
||||||
}
|
}
|
||||||
if (link.top <= this.bound) {
|
if (link.top <= this.bound) {
|
||||||
|
Loading…
Reference in New Issue
Block a user