{"remainingRequest":"D:\\cloud\\cemp\\cemp-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\cloud\\cemp\\cemp-ui\\src\\components\\editor\\index.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\cloud\\cemp\\cemp-ui\\src\\components\\editor\\index.vue","mtime":1619070292866},{"path":"D:\\cloud\\cemp\\cemp-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\cloud\\cemp\\cemp-ui\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\cloud\\cemp\\cemp-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\cloud\\cemp\\cemp-ui\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n\nimport CodeMirror from 'codemirror'\nimport 'codemirror/lib/codemirror.css'\n// 替换主题这里需修改名称\nimport 'codemirror/theme/idea.css'\nimport 'codemirror/mode/clike/clike'\nexport default {\n props: {\n value: {\n type: String,\n required: true\n },\n height: {\n type: String,\n required: true\n }\n },\n data() {\n return {\n editor: false\n }\n },\n watch: {\n value(value) {\n const editorValue = this.editor.getValue()\n if (value !== editorValue) {\n this.editor.setValue(this.value)\n }\n },\n height(value) {\n this.editor.setSize('auto', this.height)\n }\n },\n mounted() {\n this.editor = CodeMirror.fromTextArea(this.$refs.textarea, {\n mode: 'text/x-java',\n lineNumbers: true,\n lint: true,\n lineWrapping: true,\n tabSize: 2,\n cursorHeight: 0.9,\n // 替换主题这里需修改名称\n theme: 'idea',\n readOnly: true\n })\n this.editor.setSize('auto', this.height)\n this.editor.setValue(this.value)\n },\n methods: {\n getValue() {\n return this.editor.getValue()\n }\n }\n}\n",{"version":3,"sources":["index.vue"],"names":[],"mappings":";;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"index.vue","sourceRoot":"src/components/editor","sourcesContent":["\r\n \r\n \r\n
\r\n\r\n\r\n\r\n\r\n\r\n"]}]}