vue 报错Failed to mount component: template or render function not defined

路由:

主页面组件的js由页面内改为外部引入后报此错

//再看组件引入

import fxkh from './floodControl/index'

因此vue-loader在引入时把index.js当作了入口,而不是index.vue,只需把组件引入改为

import fxkh from './floodControl/index.vue'
posted @ 2020-09-08 16:01  wwj007  阅读(334)  评论(0编辑  收藏  举报
……