Vue报错笔记(1)vue.js:515 [Vue warn]: Property or method “name“ is not defined on the instance but refere
报错:vue.js:515 [Vue warn]: Property or method "name" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option.(found in root instan
·
更多前端学习笔记可以查看 https://niexia.github.io/fe-tutorial
报错:
vue.js:515 [Vue warn]: Property or method "name" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option.
(found in root instance)
解决:
ctrl+f 搜索代码里面哪里使用了name,就是你使用了但是在data里面没有定义
name没有定义,设置一个初始值即可
name 在data那里没有定义。
要这样定义:
export default {
name: 'app',
data() {
return {
name: ''
}
},
......
更多推荐
已为社区贡献3条内容
所有评论(0)