2017-08-05 10:16:28 +00:00
|
|
|
Vue.component('results', {
|
|
|
|
template: '#results-template',
|
|
|
|
props: ['results', 'cols'],
|
2017-08-05 09:16:19 +00:00
|
|
|
methods: {
|
2017-08-05 10:16:28 +00:00
|
|
|
sortBy: function(col) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
Vue.component('paginate', {
|
|
|
|
template: '#paginate-template',
|
|
|
|
props: ['page'],
|
|
|
|
methods: {
|
|
|
|
prevPage: function() {
|
2017-08-05 09:16:19 +00:00
|
|
|
},
|
2017-08-05 10:16:28 +00:00
|
|
|
nextPage: function() {
|
2017-08-05 09:16:19 +00:00
|
|
|
}
|
|
|
|
}
|
2017-08-05 10:16:28 +00:00
|
|
|
});
|
|
|
|
var index = new Vue({
|
|
|
|
el: '#index',
|
2017-07-30 13:39:20 +00:00
|
|
|
data: {
|
|
|
|
page: 1,
|
|
|
|
perpage: 20,
|
|
|
|
sort_by: null,
|
2017-08-05 09:16:19 +00:00
|
|
|
order_desc: false,
|
2017-08-05 10:16:28 +00:00
|
|
|
cols: [{name:'test'}, {name:'test2'}],
|
|
|
|
results: [{}]
|
2017-07-30 13:39:20 +00:00
|
|
|
},
|
|
|
|
methods: {
|
2017-08-05 10:16:28 +00:00
|
|
|
showSeries: function() {
|
|
|
|
console.log("Series");
|
2017-08-05 09:16:19 +00:00
|
|
|
},
|
2017-08-05 10:16:28 +00:00
|
|
|
showAuthors: function() {
|
|
|
|
console.log("Authors");
|
2017-07-30 13:39:20 +00:00
|
|
|
},
|
2017-08-05 10:16:28 +00:00
|
|
|
showBooks: function() {
|
|
|
|
console.log("Books");
|
2017-07-30 13:39:20 +00:00
|
|
|
}
|
|
|
|
}
|
2017-08-05 10:16:28 +00:00
|
|
|
});
|