Skip to content

Commit

Permalink
fix(indexes): 修复索引吸顶时,切换索引过程上一个索引直接消失的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyan-u committed Sep 6, 2024
1 parent 33d0836 commit 3e93bae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/indexes/indexes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ export default defineComponent({
wrapper.classList.add(`${wrapperClass}--sticky`);
wrapper.classList.add(`${wrapperClass}--active`);
header.classList.add(`${headerClass}--active`);
wrapper.style = `transform: translate3d(0, ${betwixt ? offset : 0}px, 0); top: ${stickyTop}px;`;
wrapper.style = `transform: translate3d(0, ${
betwixt ? offset - groupTop[index].height : 0
}px, 0); top: ${stickyTop}px;`;
} else {
wrapper.classList.remove(`${wrapperClass}--sticky`);
wrapper.classList.remove(`${wrapperClass}--active`);
Expand Down

0 comments on commit 3e93bae

Please sign in to comment.