-
Notifications
You must be signed in to change notification settings - Fork 67
lesson 16
Rati Wannapanop edited this page May 24, 2017
·
5 revisions
In this lesson, we will start working on refactoring our MyVuetable
component to accept properties and make it work as the same.
As a summary, here are the list of properties that we are going to make:
- api-url
- fields
- multi-sort
- sort-order
- append-params
First, we need to define that our component accepts those properties.
// MyVuetable.vue
//..
export default {
name: 'my-vuetable',
components: {
//..
},
props: {
apiUrl: {
type: String,
required: true
},
fields: {
type: Array,
required: true
},
sortOrder: {
type: Array,
default() {
return []
}
},
appendParams: {
type: Object,
default() {
return {}
}
},
detailRowComponent: {
type: String
}
}
}
- Your first Vuetable
- Displaying more fields
- Cleaning up code
- Make change to field title
- Column alignment
- Format fields using
callback
option - Adding pagination
- Displaying pagination information
- Customizing Vuetable
- Make columns sortable
- Using special fields
- Adding Detail Row
- Adding Search Filter
- Moving Field Definitions to another file
- Passing Props to MyVuetable - Part 1
- Passing Props to MyVuetable - Part 2
- Passing Scoped Slot to MyVuetable
- Using Twitter's Bootstrap CSS with Vuetable
- Pagination for Twitter's Bootstrap