diff --git a/.gitignore b/.gitignore index b20d32f..43ad9c1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ docs/.vuepress/dist /tests/e2e/videos/ /tests/e2e/screenshots/ - +vue-tabulator-v*.tgz # local env files .env.local .env.*.local diff --git a/src/App.vue b/src/App.vue index 9a17ccc..6874aae 100644 --- a/src/App.vue +++ b/src/App.vue @@ -39,7 +39,7 @@ - - - diff --git a/src/entry.ts b/src/entry.ts index 5109f4d..5257795 100644 --- a/src/entry.ts +++ b/src/entry.ts @@ -1,10 +1,11 @@ import Vue from 'vue'; -import VueTabulator from '@/components/VueTabulator.vue'; +import TabulatorComponent from '@/components/TabulatorComponent.vue'; -export { VueTabulator }; +export { TabulatorComponent }; export default { - install(VueApp: typeof Vue) { - VueApp.component('VueTabulator', VueTabulator); + install(VueApp: typeof Vue, options: any = {}) { + const name = options.name || 'VueTabulator'; + VueApp.component(name, TabulatorComponent); }, }; diff --git a/tests/unit/__snapshots__/vue-tabulator.spec.ts.snap b/tests/unit/__snapshots__/vue-tabulator.spec.ts.snap index b7f97b5..5b46c70 100644 --- a/tests/unit/__snapshots__/vue-tabulator.spec.ts.snap +++ b/tests/unit/__snapshots__/vue-tabulator.spec.ts.snap @@ -1,9 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`VueTabulator.vue renders correct based in the options 1`] = ` +exports[`TabulatorComponent.vue renders correct based in the options 1`] = `