局部组件的组件的声明时会有这个 :
You are using the runtime-only build of Vue where the template compiler is not available. Either pre警告
解决办法
配置项目 在项目的根目录下建立一个vue.config.js
然后把这段代码贴上去:
module.exports = {
configureWebpack: {
resolve: {
alias: {
'vue$': 'vue/dist/vue.esm.js'
}
}
}
}
重启项目,问题解决!