fix(anchor):[anchor]When the anchor component has a default currentLink, the style is not the expected style (#1368)

* fix(anchor):[anchor]When the anchor component has a default currentLink, the style is not the expected style

* fix(anchor):[anchor]Fix formatting issues
This commit is contained in:
张烟铃 2024-02-05 11:29:03 +08:00 committed by GitHub
parent 6c016bfcc0
commit d051bea3a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -165,6 +165,7 @@ export const onItersectionObserver =
({ state, props, api, vm, emit }: Pick<IAnchorRenderlessParams, 'state' | 'props' | 'api' | 'vm' | 'emit'>) =>
() => {
const { expandLink, scrollContainer } = state
state.currentLink && updateSkidPosition({ vm, state, emit })
state.intersectionObserver = new IntersectionObserver(
(entries) => {
const { top } = scrollContainer.getBoundingClientRect()