Uncaught ReferenceError: options is not defined
at Object.render (app.js:53864)
at __webpack_require__ (app.js:20)
at Object.<anonymous> (app.js:53762)
at __webpack_require__ (app.js:20)
at Object.<anonymous> (app.js:16082)
at __webpack_require__ (app.js:20)
at Object.<anonymous> (app.js:16055)
at __webpack_require__ (app.js:20)
at app.js:63
at app.js:66
<template>
<div>
<v-server-table url="/api/test" :columns="columns" :options="options"></v-server-table>
</div>
</template>
<script>
import {ServerTable, ClientTable, Event} from 'vue-tables-2';
Vue.use(ServerTable, [options = {}], [useVuex = false], [theme = 'bootstrap4'], [template = 'default']);
export default {
name: "TestTableComponent",
data() {
return {
columns: ['id', 'name'],
options: {
perPage: 10
}
}
}
</script>
I can't understand why error occured. I've defined options inside data() and in documentation is was said "You can also nest it within other components" that I did. Or I have to create a new Vue component with el: "#DIV_ID" anyway?
Vue.use(ServerTable, [options = {}], [useVuex = false], [theme = 'bootstrap4'], [template = 'default']);
The above code is only for the purpose of documentation. You should use:
Vue.use(ServerTable, {}, false, 'bootstrap4');
Most helpful comment
The above code is only for the purpose of documentation. You should use: