Skip to content

Commit c422d81

Browse files
committed
fix: readingHeight
1 parent 4bee077 commit c422d81

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
[README](README.md) | [CHANGELOG](CHANGELOG.md)
44

5+
## 1.0.9
6+
7+
- fix bug about readingHeight
8+
59
## 1.0.8
610

711
- add RegExp for readingDir

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ module.exports = {
2828
}
2929
```
3030

31-
[ Vuepress documentation](https://v1.vuepress.vuejs.org/plugin/using-a-plugin.html)
31+
[ Vuepress documentation](https://vuepress.vuejs.org/plugin/using-a-plugin.html)
3232

3333

3434
## Options
3535

3636
### readingDir
3737
- Type: `null`, `string`, `array`, `object`, `RegExp`
38-
- Default: `null`
38+
- Required: `false`
3939

4040
Specify regularPath that display reading progress bar
4141

@@ -70,7 +70,7 @@ set position for reading progress bar
7070

7171
Change the reading progress bar display of the current page by use `readingShow`
7272
- Type: `string`, `boolean`
73-
- Default: `null`
73+
- Required: `false`
7474
- one of `top`, `bottom`, `left`, `right`, `true`, `false`
7575

7676
``` md

ReadingProgress.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export default {
4040
this.progressStyle = this.getProgressStyle()
4141
},
4242
getReadingHeight () {
43-
return document.body.offsetHeight
44-
|| document.body.scrollHeight
43+
return document.body.scrollHeight
44+
|| document.body.offsetHeight
4545
|| 0
4646
},
4747
getScreenHeight () {
@@ -52,7 +52,6 @@ export default {
5252
getReadingTop () {
5353
return window.pageYOffset
5454
|| document.documentElement.scrollTop
55-
|| document.body.scrollTop
5655
|| 0
5756
},
5857
getTransform () {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vuepress-plugin-reading-progress",
3-
"version": "1.0.8",
3+
"version": "1.0.9",
44
"main": "index.js",
55
"description": "A reading progress bar plugin for VuePress",
66
"author": "tolking <qw13131wang@gmail.com>",
@@ -10,7 +10,7 @@
1010
"url": "https://github.com/tolking/vuepress-plugin-reading-progress/issues"
1111
},
1212
"homepage": "https://github.com/tolking/vuepress-plugin-reading-progress",
13-
"doc": "https://ououe.com/lib/vuepress-plugin-reading-progress.html",
13+
"doc": "https://github.com/tolking/vuepress-plugin-reading-progress",
1414
"keywords": [
1515
"vue",
1616
"vuepress",

0 commit comments

Comments
 (0)