export default {
name: 'PageData',
components: {
GridPlugin
},
data() {
return {
data: new DataManager({
url: 'http://api/data',
adaptor: new WebApiAdaptor(),
crossDomain: true
}),
pageSettings: { pageSize: 5 },
filterOptions: {
type: 'Menu'
},
filter: {
type : 'CheckBox'
},
toolbar: ['Print', 'Search','ColumnChooser'],
}
},
mounted() {
let state = { skip: 0, take: 10 };
this.dataStateChange(state);
},
methods: {
dataStateChange: function (state) {
this.orderService.execute(state).then(( gridData ) => this.data = gridData );
},
todo() {},
},
provide: {
grid: [Page, Sort, Filter, Toolbar, ColumnChooser]
},
};