在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.
我本地测试了一下是正常的,请题主贴出完整代码,可能是其它地方错了
是不是method有个showCodeModal方法,如果是,改一下方法名,跟data重名了