feat: update dynamic-component example

This commit is contained in:
Clark Du 2017-10-20 14:45:34 +08:00 committed by Pooya Parsa
parent d2a57bc329
commit 725283ebce
3 changed files with 10 additions and 10 deletions

View File

@ -6,16 +6,16 @@ export const messages = [
component: 'vChart',
data: {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
datasets:[
{
label: 'Activity',
backgroundColor: '#41b883',
data: [40, 20, 12, 39, 10, 40, 39, 50, 40, 20, 12, 11]
}
datasets: [
{
label: 'Activity',
backgroundColor: '#41b883',
data: [40, 20, 12, 39, 10, 40, 39, 50, 40, 20, 12, 11]
}
]
}
},
{ component: 'vText', data: 'End of demo 🎉' },
{ component: 'vText', data: 'End of demo 🎉' }
]
async function streamMessages (fn, i = 0) {

View File

@ -2,7 +2,7 @@
"name": "dynamic-components-nuxt",
"dependencies": {
"chart.js": "^2.7.0",
"nuxt": "^1.0.0-rc11",
"nuxt": "latest",
"vue-chartjs": "^2.8.7"
},
"scripts": {

View File

@ -16,7 +16,7 @@ const components = {
vText: () => import('@/components/text.vue' /* webpackChunkName: "components/text" */),
vImage: () => import('@/components/image.vue' /* webpackChunkName: "components/image" */),
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" */).then((m) => m.default())
}
export default {