mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
chore(examples): fix dynamic components example (#5294)
This commit is contained in:
parent
3ac01df488
commit
d9db45c287
@ -1,12 +1,9 @@
|
|||||||
let VueChart = import('vue-chartjs' /* webpackChunkName: "vue-chartjs" */)
|
import { Bar } from 'vue-chartjs'
|
||||||
|
|
||||||
export default async () => {
|
export default {
|
||||||
VueChart = await VueChart
|
extends: Bar,
|
||||||
|
|
||||||
return VueChart.Bar.extend({
|
|
||||||
props: ['data'],
|
props: ['data'],
|
||||||
mounted() {
|
mounted() {
|
||||||
this.renderChart(this.data)
|
this.renderChart(this.data)
|
||||||
}
|
}
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "example-dynamic-components",
|
"name": "example-dynamic-components",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chart.js": "^2.7.0",
|
"chart.js": "^2.7.3",
|
||||||
"nuxt": "latest",
|
"nuxt": "latest",
|
||||||
"vue-chartjs": "^2.8.7"
|
"vue-chartjs": "^3.4.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nuxt",
|
"dev": "nuxt",
|
||||||
|
@ -16,7 +16,7 @@ const components = {
|
|||||||
vText: () => import('@/components/text.vue' /* webpackChunkName: "components/text" */),
|
vText: () => import('@/components/text.vue' /* webpackChunkName: "components/text" */),
|
||||||
vImage: () => import('@/components/image.vue' /* webpackChunkName: "components/image" */),
|
vImage: () => import('@/components/image.vue' /* webpackChunkName: "components/image" */),
|
||||||
vCode: () => import('@/components/code.vue' /* webpackChunkName: "components/code" */),
|
vCode: () => import('@/components/code.vue' /* webpackChunkName: "components/code" */),
|
||||||
vChart: () => import('@/components/chart.js' /* webpackChunkName: "components/chart" */).then(m => m.default())
|
vChart: () => import('@/components/chart.js' /* webpackChunkName: "components/chart" */)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -17,7 +17,7 @@ const components = {
|
|||||||
vText: () => import('@/components/text.vue' /* webpackChunkName: "components/text" */),
|
vText: () => import('@/components/text.vue' /* webpackChunkName: "components/text" */),
|
||||||
vImage: () => import('@/components/image.vue' /* webpackChunkName: "components/image" */),
|
vImage: () => import('@/components/image.vue' /* webpackChunkName: "components/image" */),
|
||||||
vCode: () => import('@/components/code.vue' /* webpackChunkName: "components/code" */),
|
vCode: () => import('@/components/code.vue' /* webpackChunkName: "components/code" */),
|
||||||
vChart: () => import('@/components/chart.js' /* webpackChunkName: "components/chart" */).then(m => m.default())
|
vChart: () => import('@/components/chart.js' /* webpackChunkName: "components/chart" */)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
Loading…
Reference in New Issue
Block a user