Trying to set up a Vue table with the help of a Vue table plugin in my application through node module is proving to be challenging. An error keeps popping up when I try to use all Vue table components. I installed all Vue table plugins using npm and imported them into my custom component.
The code snippet I used is as follows:
import Vuetable from 'vuetable/src/components/Vuetable.vue';
import VuetablePagination from 'vuetable/src/components/VuetablePagination.vue';
import VuetablePaginationDropdown from 'vuetable/src/components/VuetablePaginationDropdown.vue';
To begin, I imported the Vue table plugin into my component and then registered these components within my custom component in the Vue instance.
data () {
return{
columns: [
'name',
'nickname',
'email',
'birthdate',
'gender',
'__actions'
]
}
},
components : {
Vuetable,
VuetablePagination,
VuetablePaginationDropdown
}
For the template section, I included this block of code:
<vuetable
api-url="http://vuetable.ratiw.net/api/users"
table-wrapper="#content"
pagination-component="vuetable-pagination"
:fields="columns">
</vuetable>