问题遇到的现象和发生背景
在vue里面写了个v-model="showCodeModal",但是报错
用代码块功能插入代码,请勿粘贴截图
export default {
name: 'scan',
data () {
return {
showCodeModal: false
}
},
computed: {
}
}
运行结果及报错内容
vue.runtime.esm.js?2b0e:619
[Vue warn]: Property or method "showCodeModal" 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 components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.