-
Notifications
You must be signed in to change notification settings - Fork 44
Closed
Description
Hi,
I am registering the component as per the docs and importing Vue as per my other components but getting the error "Error in created hook: "ReferenceError: Vue is not defined".
Below is the complete .vue file.
Any help greatly appreciated.
Thanks.
<template>
<div>
<datatable :columns="columns" :data="rows"></datatable>
</div>
</template>
<script>
import Vue from "vue"
import DatatableFactory from "vuejs-datatable"
Vue.use(DatatableFactory)
export default {
data () {
return {
columns: [
{label: "id", field: "id"},
{label: "Username", field: "user.username"},
{label: "First Name", field: "user.first_name"},
{label: "Last Name", field: "user.last_name"},
{label: "Email", field: "user.email"},
{label: "address",
representedAs: function (row) {
return row.address + "<br />" + row.city + ", " + row.state
},
interpolate: true
}
],
rows: [
{
"id": 1,
"user": {
"username": "dprice0",
"first_name": "Daniel",
"last_name": "Price",
"email": "dprice0@blogs.com"
},
"address": "3 Toban Park",
"city": "Pocatello",
"state": "Idaho"
}
]
}
}
}
</script>
Metadata
Metadata
Assignees
Labels
No labels