From 1c63a47d63d6e3ea97310b8a288be56f35491f24 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Thu, 22 Jun 2017 09:35:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=91=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/editor/editor.code.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/base/single/editor/editor.code.js b/src/base/single/editor/editor.code.js index f97564f62..b82b0d29e 100644 --- a/src/base/single/editor/editor.code.js +++ b/src/base/single/editor/editor.code.js @@ -10,7 +10,8 @@ BI.CodeEditor = BI.inherit(BI.Single, { baseCls: 'bi-code-editor bi-card', value: '', watermark: "", - lineHeight: 2 + lineHeight: 2, + readOnly: false }); }, _init: function () { @@ -19,7 +20,8 @@ BI.CodeEditor = BI.inherit(BI.Single, { this.editor = CodeMirror(this.element[0], { textWrapping: true, lineWrapping: true, - lineNumbers: false + lineNumbers: false, + readOnly: o.readOnly }); o.lineHeight === 1 ? this.element.addClass("codemirror-low-line-height") : this.element.addClass("codemirror-high-line-height"); this.editor.on("change", function (cm, change) {