Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【问题】:6.0版本阅读进度条不能显示 #920

Open
3 tasks done
Tidra opened this issue Apr 11, 2024 · 1 comment
Open
3 tasks done

【问题】:6.0版本阅读进度条不能显示 #920

Tidra opened this issue Apr 11, 2024 · 1 comment
Labels
help 使用遇到问题(报错、样式与示例不一致等)

Comments

@Tidra
Copy link

Tidra commented Apr 11, 2024

检查清单

  • 已经搜索过,没有发现类似 issue。
  • 已经搜索过主题文档,没有发现相关内容。
  • 已经尝试使用过最新版,问题依旧存在。

主题版本

6.x

复现地址

问题描述

进入文章无法显示阅读进度条。

排查步骤:
1、pace的js和css正常加载;
2、搜索主题文件找到pace的调用Pace.bar.update(volantis.scroll.progress() * 100)中的volantis.scroll.progress()的值存在问题,一直是Infinity
3、调试发现volantis.scroll.scrollHeight()volantis.scroll.offsetHeight()一直相等,但两函数实现并无问题,应该是body样式问题导致无法获取offsetHeight的真实高度
4、body中搜索height样式,只有继承html的height,尝试加入属性height: 100%;,正常显示。

配置文件

站点配置文件

theme: volantis

主题配置文件

默认配置

环境信息

node.js & npm

v18.19.0
9.2.0

package.json

[email protected] /workspace/project/blog
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

@Tidra Tidra added the help 使用遇到问题(报错、样式与示例不一致等) label Apr 11, 2024
@Tidra
Copy link
Author

Tidra commented Apr 11, 2024

不知道是不是我自己环境的问题,但是我看到官方主页body也是有height属性的,建议在body样式里加入height: 100%;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help 使用遇到问题(报错、样式与示例不一致等)
Projects
None yet
Development

No branches or pull requests

1 participant