vue-codemirror icon indicating copy to clipboard operation
vue-codemirror copied to clipboard

n is not a function

Open zhouhaibing opened this issue 5 years ago • 0 comments

BUG REPORT TEMPLATE

image

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",

zhouhaibing avatar Nov 02 '20 14:11 zhouhaibing