Skip to content

Commit c740cfc

Browse files
author
Javier Diaz
committed
feature: updated entryfile for new approach
1 parent 69cd871 commit c740cfc

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

Diff for: index.js

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import TinyPagination from './packages/TinyPagination/index';
2+
3+
const components = [
4+
TinyPagination,
5+
];
6+
7+
export function install(Vue) {
8+
if (install.installed) return;
9+
install.installed = true;
10+
components.forEach((component) => {
11+
Vue.component(component.name, component);
12+
});
13+
}
14+
15+
const plugin = {
16+
install,
17+
};
18+
19+
let GlobalVue = null;
20+
if (typeof window !== 'undefined') {
21+
GlobalVue = window.Vue;
22+
} else if (typeof global !== 'undefined') {
23+
GlobalVue = global.Vue;
24+
}
25+
if (GlobalVue) {
26+
GlobalVue.use(plugin);
27+
}
28+
29+
export {
30+
TinyPagination,
31+
};
32+
33+
export default plugin;

0 commit comments

Comments
 (0)