Nuxt/examples/dynamic-components/components/chart.js
2017-10-31 21:43:55 +08:00

13 lines
249 B
JavaScript

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)
}
})
}