We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d667ac9 commit e2b384cCopy full SHA for e2b384c
index.js
@@ -1,17 +1,24 @@
1
import TinyPagination from './src/components/TinyPagination.vue'
2
3
-const install = (Vue, opts ={}) => {
+export function install (Vue) {
4
+ if (install.installed) return
5
+ install.installed = true
6
Vue.component('TinyPagination', TinyPagination)
7
}
8
-if (typeof window !== 'undefined' && window.Vue) {
- install(window.Vue)
9
+const plugin = {
10
+ install
11
12
-module.exports = {
- version: '0.2.1-beta.7',
13
- install,
14
- TinyPagination
+let GlobalVue = null
+if (typeof window !== 'undefined') {
15
+ GlobalVue = window.Vue
16
+} else if (typeof global !== 'undefined') {
17
+ GlobalVue = global.Vue
18
+}
19
+if (GlobalVue) {
20
+ GlobalVue.use(plugin)
21
22
-module.exports.default = module.exports
23
+export { TinyPagination }
24
+export default plugin
0 commit comments