-
Notifications
You must be signed in to change notification settings - Fork 110
Expand file tree
/
Copy pathindex.js
More file actions
26 lines (22 loc) · 854 Bytes
/
index.js
File metadata and controls
26 lines (22 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Import vue component
import component from './el-data-table.vue'
// `Vue.use` automatically prevents you from using the same plugin more than once,
// so calling it multiple times on the same plugin will install the plugin only once
component.install = Vue => {
Vue.component(component.name, component)
}
// To auto-install when vue is found
let GlobalVue = null
if (typeof window !== 'undefined') {
GlobalVue = window.Vue
} else if (typeof global !== 'undefined') {
GlobalVue = global.Vue
}
if (GlobalVue) {
GlobalVue.use(component)
}
// To allow use as module (npm/webpack/etc.) export component
export default component
// It's possible to expose named exports when writing components that can
// also be used as directives, etc. - eg. import { RollupDemoDirective } from 'rollup-demo';
// export const RollupDemoDirective = component;