File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change 1
1
import TinyPagination from './src/components/TinyPagination.vue'
2
2
3
- const install = ( Vue , opts = { } ) => {
3
+ export function install ( Vue ) {
4
+ if ( install . installed ) return
5
+ install . installed = true
4
6
Vue . component ( 'TinyPagination' , TinyPagination )
5
7
}
6
8
7
- if ( typeof window !== 'undefined' && window . Vue ) {
8
- install ( window . Vue )
9
+ const plugin = {
10
+ install
9
11
}
10
12
11
- module . exports = {
12
- version : '0.2.1-beta.7' ,
13
- install,
14
- TinyPagination
13
+ let GlobalVue = null
14
+ 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 )
15
21
}
16
22
17
- module . exports . default = module . exports
23
+ export { TinyPagination }
24
+ export default plugin
You can’t perform that action at this time.
0 commit comments