@airhang/vue-book-reader 1.0.0

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/src/index.js ADDED
@@ -0,0 +1,30 @@
1
+ import BookReader from './components/BookReader.vue'
2
+ import BookCatalogueDrawer from './components/BookCatalogueDrawer.vue'
3
+
4
+ const components = {
5
+ BookReader,
6
+ BookCatalogueDrawer
7
+ }
8
+
9
+ const install = function(Vue) {
10
+ if (install.installed) return
11
+ install.installed = true
12
+ Object.keys(components).forEach(key => {
13
+ Vue.component(key, components[key])
14
+ })
15
+ }
16
+
17
+ if (typeof window !== 'undefined' && window.Vue) {
18
+ install(window.Vue)
19
+ }
20
+
21
+ export default {
22
+ install,
23
+ BookReader,
24
+ BookCatalogueDrawer
25
+ }
26
+
27
+ export {
28
+ BookReader,
29
+ BookCatalogueDrawer
30
+ }