在vue里面写了个v-model="showCodeModal",但是报错,说我没写data,但我写了

问题遇到的现象和发生背景

在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重名了