Nuxt/examples/dynamic-components/components/chart.js

13 lines
249 B
JavaScript
Raw Normal View History

2017-09-21 20:27:30 +00:00
let VueChart = import('vue-chartjs' /* webpackChunkName: "vue-chartjs" */)
export default async () => {
VueChart = await VueChart
return VueChart.Bar.extend({
props: ['data'],
2017-10-31 13:43:55 +00:00
mounted() {
2017-09-21 20:27:30 +00:00
this.renderChart(this.data)
}
})
}