vue-codemirror
vue-codemirror copied to clipboard
n is not a function
BUG REPORT TEMPLATE

my code: html:
<codemirror
ref="cmEditor"
:value="curCode"
:options="cmOptions"
@ready="onCmReady"
@focus="onCmFocus"
@input="onCmCodeChange">
</codemirror>
data:
curCode:'',
cmOptions:{
tabSize: 4,
mode: 'application/json',
theme: 'rubyblue',
gutters: ['CodeMirror-lint-markers'],
lineNumbers: true,
line: true,
lint: true
},
method:
onCmReady(cm) {
console.log('the editor is readied!', cm)
},
onCmFocus(cm) {
console.log('the editor is focused!', cm)
},
onCmCodeChange(newCode) {
console.log('this is new code', newCode)
this.curCode = newCode
this.editForm.mock_result = newCode
},
my exception is TypeError: n is not a function as show the above please tell me why?
"vue": "^2.5.2", "element-ui": "^2.0.9", "vue-codemirror": "^4.0.6",