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

13 lines
250 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'],
mounted () {
this.renderChart(this.data)
}
})
}