学习下Vue框架
照着教程App.vue加了一个
copyright : {{ corpright }}
main.js
new Vue({
el: ‘#app‘,
data:{
corpright:"wf"
},
methods:{
a:function(){
return ‘afei‘;
}
},
render: h => h(App),
}).$mount(‘#app‘)
刷新页面不显示{{ corpright }}
Property or method "corpright" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based
后来查询到解决方案
在App.vue文件后加
<script>
export default {
name: ‘hello‘,
data () {
return {
corpright: ‘afei export default‘
}
},
methods: {
}
}
</script>
显示出来了

Vue Property or method "" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based
原文:https://www.cnblogs.com/kala00k/p/13234194.html