VueTables options API
VueTables options API
by apasaja
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.4/vue.min.js"></script>
<script src="https://rawgit.com/matfish2/vue-tables/master/dist/vue-tables.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<div id="vue-tables-options" class="container">
<table>
<tr>
<td></td>
<td></td>
</tr>
</table>
</div>
CSS
#vue-tables-options {
text-align: center;
}
table {
text-align: left;
}
h2 {
margin-bottom: 10px;
}
thead tr:nth-child(2) th {
font-weight: normal;
}
.VueTables__sortable {
cursor: pointer;
}
JavaScript
Vue.use(VueTables.client, {
perPage: 25
})
new Vue({
el: "#vue-tables-options",
data: {
"odds": "{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1}"
}
})