mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
feat: update dynamic-component example
This commit is contained in:
parent
d2a57bc329
commit
725283ebce
@ -6,7 +6,7 @@ export const messages = [
|
|||||||
component: 'vChart',
|
component: 'vChart',
|
||||||
data: {
|
data: {
|
||||||
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
||||||
datasets:[
|
datasets: [
|
||||||
{
|
{
|
||||||
label: 'Activity',
|
label: 'Activity',
|
||||||
backgroundColor: '#41b883',
|
backgroundColor: '#41b883',
|
||||||
@ -15,7 +15,7 @@ export const messages = [
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ component: 'vText', data: 'End of demo 🎉' },
|
{ component: 'vText', data: 'End of demo 🎉' }
|
||||||
]
|
]
|
||||||
|
|
||||||
async function streamMessages (fn, i = 0) {
|
async function streamMessages (fn, i = 0) {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "dynamic-components-nuxt",
|
"name": "dynamic-components-nuxt",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chart.js": "^2.7.0",
|
"chart.js": "^2.7.0",
|
||||||
"nuxt": "^1.0.0-rc11",
|
"nuxt": "latest",
|
||||||
"vue-chartjs": "^2.8.7"
|
"vue-chartjs": "^2.8.7"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -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" */).then((m) => m.default())
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
Loading…
Reference in New Issue
Block a user