vue-book-reader 1.2.5 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -35
- package/dist/index.css +3 -3
- package/dist/vue-book-reader.es.js +1386 -1305
- package/dist/vue-book-reader.umd.js +1347 -1265
- package/package.json +1 -4
package/README.md
CHANGED
|
@@ -19,13 +19,11 @@
|
|
|
19
19
|
<h2><a href="https://jinhuan138.github.io/vue-book-reader/">📖Documentation</a></h2>
|
|
20
20
|
</div>
|
|
21
21
|
|
|
22
|
-
|
|
23
22
|
# Introduction
|
|
24
23
|
|
|
25
24
|
vue-book-reader is a vue wrapper for [foliate-js](https://github.com/johnfactotum/foliate-js) - library for rendering e-books in the browser.
|
|
26
25
|
Supports EPUB, MOBI, KF8 (AZW3), FB2, CBZ, PDF (experimental; requires PDF.js), or add support for other formats yourself by implementing the book interface
|
|
27
26
|
|
|
28
|
-
|
|
29
27
|
## Basic usage
|
|
30
28
|
|
|
31
29
|
```bash
|
|
@@ -49,51 +47,47 @@ import { VueReader } from 'vue-book-reader'
|
|
|
49
47
|
|
|
50
48
|
### VueReader Attributes
|
|
51
49
|
|
|
52
|
-
| **Name**
|
|
53
|
-
|
|
|
54
|
-
| url
|
|
55
|
-
| location
|
|
56
|
-
| title
|
|
57
|
-
| showToc
|
|
58
|
-
| [BookView Attributes](#bookview-attributes)
|
|
50
|
+
| **Name** | **Description** | **Type** | **Default** |
|
|
51
|
+
| ------------------------------------------- | ------------------------------------ | ----------------- | ----------- |
|
|
52
|
+
| url | book url or File | `string`/`File` | — |
|
|
53
|
+
| location | set / update location of the book | `string`/`number` | — |
|
|
54
|
+
| title | the title of the book | `string` | — |
|
|
55
|
+
| showToc | whether to show the toc | `boolean` | true |
|
|
56
|
+
| [BookView Attributes](#bookview-attributes) | BookView attributes all can be used. | - |
|
|
59
57
|
|
|
60
58
|
### VueReader Slots
|
|
61
59
|
|
|
62
|
-
| **Name** | **Description**
|
|
63
|
-
| --------------------------------- |
|
|
64
|
-
| title |
|
|
65
|
-
| [BookView slots](#bookview-slots) |
|
|
60
|
+
| **Name** | **Description** |
|
|
61
|
+
| --------------------------------- | ------------------------------- |
|
|
62
|
+
| title | book title |
|
|
63
|
+
| [BookView slots](#bookview-slots) | BookView slots all can be used. |
|
|
66
64
|
|
|
67
65
|
### VueReader Exposes
|
|
68
|
-
|
|
69
|
-
|
|
|
70
|
-
|
|
|
66
|
+
|
|
67
|
+
| **Name** | **Description** |
|
|
68
|
+
| ------------------------------------- | --------------------------------- |
|
|
69
|
+
| [BookView Exposes](#bookview-exposes) | BookView exposes all can be used. |
|
|
70
|
+
|
|
71
71
|
## BookView API
|
|
72
72
|
|
|
73
73
|
### BookView Attributes
|
|
74
74
|
|
|
75
|
-
| **Name** | **Description**
|
|
76
|
-
| ---------- |
|
|
77
|
-
| url | book url or File | `string`/`File` |
|
|
78
|
-
| tocChanged | get an array representing the table of contents of the book | `function(href)` |
|
|
75
|
+
| **Name** | **Description** | **Type** | **Default** |
|
|
76
|
+
| ---------- | ----------------------------------------------------------- | ---------------- | ----------- |
|
|
77
|
+
| url | book url or File | `string`/`File` | |
|
|
78
|
+
| tocChanged | get an array representing the table of contents of the book | `function(href)` | |
|
|
79
79
|
|
|
80
80
|
### BookView Slots
|
|
81
81
|
|
|
82
|
-
| **Name** | **Description**
|
|
83
|
-
| ----------- |
|
|
84
|
-
| loadingView | BookView loadingView
|
|
85
|
-
| errorView | BookView errorView
|
|
82
|
+
| **Name** | **Description** |
|
|
83
|
+
| ----------- | -------------------- |
|
|
84
|
+
| loadingView | BookView loadingView |
|
|
85
|
+
| errorView | BookView errorView |
|
|
86
86
|
|
|
87
87
|
### BookView Exposes
|
|
88
88
|
|
|
89
|
-
| **Name** | **Description**
|
|
90
|
-
| ----------- |
|
|
91
|
-
| nextPage | display
|
|
92
|
-
| prevPage | display
|
|
93
|
-
| setLocation | Set the page
|
|
94
|
-
|
|
95
|
-
<style>
|
|
96
|
-
html:focus-within {
|
|
97
|
-
scroll-behavior: smooth;
|
|
98
|
-
}
|
|
99
|
-
</style>
|
|
89
|
+
| **Name** | **Description** | **Type** |
|
|
90
|
+
| ----------- | --------------------- | ---------------- |
|
|
91
|
+
| nextPage | display next page | `function` |
|
|
92
|
+
| prevPage | display previous page | `function` |
|
|
93
|
+
| setLocation | Set the page | `function(href)` |
|
package/dist/index.css
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
.reader[data-v-
|
|
2
|
+
.reader[data-v-0c743b16] {
|
|
3
3
|
position: absolute;
|
|
4
4
|
inset: 50px 50px 20px;
|
|
5
5
|
}
|
|
6
|
-
.viewHolder[data-v-
|
|
6
|
+
.viewHolder[data-v-0c743b16] {
|
|
7
7
|
height: 100%;
|
|
8
8
|
width: 100%;
|
|
9
9
|
position: relative;
|
|
10
10
|
}
|
|
11
|
-
#viewer[data-v-
|
|
11
|
+
#viewer[data-v-0c743b16] {
|
|
12
12
|
height: 100%;
|
|
13
13
|
}
|
|
14
14
|
|