1
|
|
|
import merge from 'lodash/merge'; |
2
|
|
|
import VueCsvImport from "./components/VueCsvImport.vue"; |
3
|
|
|
import VueCsvErrors from "./components/VueCsvErrors.vue"; |
4
|
|
|
import VueCsvInput from "./components/VueCsvInput.vue"; |
5
|
|
|
import VueCsvMap from "./components/VueCsvMap.vue"; |
6
|
|
|
import VueCsvTableMap from "./components/VueCsvTableMap.vue"; |
7
|
|
|
import VueCsvSubmit from "./components/VueCsvSubmit.vue"; |
8
|
|
|
import VueCsvToggleHeaders from "./components/VueCsvToggleHeaders.vue"; |
9
|
|
|
|
10
|
|
|
const VueCsvImportPlugin = { |
11
|
|
|
install(app, options) { |
12
|
|
|
options = merge({ |
13
|
|
|
components: { |
14
|
|
|
'vue-csv-import': 'vue-csv-import', |
15
|
|
|
'vue-csv-errors': 'vue-csv-errors', |
16
|
|
|
'vue-csv-input': 'vue-csv-input', |
17
|
|
|
'vue-csv-map': 'vue-csv-map', |
18
|
|
|
'vue-csv-table-map': 'vue-csv-table-map', |
19
|
|
|
'vue-csv-submit': 'vue-csv-submit', |
20
|
|
|
'vue-csv-toggle-headers': 'vue-csv-toggle-headers', |
21
|
|
|
} |
22
|
|
|
}, options); |
23
|
|
|
|
24
|
|
|
app.component(options.components['vue-csv-import'], VueCsvImport) |
25
|
|
|
app.component(options.components['vue-csv-errors'], VueCsvErrors) |
26
|
|
|
app.component(options.components['vue-csv-input'], VueCsvInput) |
27
|
|
|
app.component(options.components['vue-csv-map'], VueCsvMap) |
28
|
|
|
app.component(options.components['vue-csv-table-map'], VueCsvTableMap) |
29
|
|
|
app.component(options.components['vue-csv-submit'], VueCsvSubmit) |
30
|
|
|
app.component(options.components['vue-csv-toggle-headers'], VueCsvToggleHeaders) |
31
|
|
|
} |
32
|
|
|
} |
33
|
|
|
|
34
|
|
|
export {VueCsvToggleHeaders, VueCsvSubmit, VueCsvMap, VueCsvTableMap, VueCsvInput, VueCsvErrors, VueCsvImport, VueCsvImportPlugin}; |
35
|
|
|
|