VUE初始化报错 Cannot read property '$createElement' of undefined

import Vue from 'vue';
import Router from 'vue-router';
import V404 from '../views/business/404.vue';
import V403 from '../views/business/403.vue';
import Login from '../views/basic/login/login';
import Sync from '../views/business/sync/sync.vue';

Vue.use(Router);
export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            {
                path: '/sync',
                components: Sync,
                meta: { title: '同步管理' }

            },
            {
                path: '/404',
                component: V404,
                meta: { title: '404' }
            },
            {
                path: '/403',
                component: V403,
                meta: { title: '403' }
            }]
        },
        {
            path: '/login',
            component: Login
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
})

解决方法: components改为component

发布了14 篇原创文章 · 获赞 18 · 访问量 2224

猜你喜欢

转载自blog.csdn.net/qq_41144667/article/details/104014465
今日推荐