fix: 修复桌面端文章目录滚动跟随问题
- 在 headIndex 插件中添加 defaultExpanded 选项支持 - 修改 current 方法,当 defaultExpanded 为 true 时不折叠其他子项 - 在 sidebar.php 中配置 defaultExpanded: true - 添加目录容器自动滚动功能,确保当前项保持在可视区域 - 添加独立的 window scroll 监听和 PJAX 后更新逻辑
This commit is contained in:
2
assets/vendor/headindex/headindex.js
vendored
2
assets/vendor/headindex/headindex.js
vendored
@@ -143,6 +143,8 @@
|
||||
|
||||
indexItem.addClass(currentClass);
|
||||
|
||||
// 自动滚动目录容器,让当前项保持在可视区域
|
||||
|
||||
if (this.mouseHovered) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user