From 971e3bd7ae5bf9bd9ee841f74627291d0f0a5405 Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 22 Jun 2017 10:47:05 +0800 Subject: [PATCH] add --- bi/base.js | 6 ++++-- docs/base.js | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bi/base.js b/bi/base.js index 16c2d1714..e0f5a101f 100644 --- a/bi/base.js +++ b/bi/base.js @@ -17715,7 +17715,8 @@ BI.CodeEditor = BI.inherit(BI.Single, { baseCls: 'bi-code-editor bi-card', value: '', watermark: "", - lineHeight: 2 + lineHeight: 2, + readOnly: false }); }, _init: function () { @@ -17724,7 +17725,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) { diff --git a/docs/base.js b/docs/base.js index 16c2d1714..e0f5a101f 100644 --- a/docs/base.js +++ b/docs/base.js @@ -17715,7 +17715,8 @@ BI.CodeEditor = BI.inherit(BI.Single, { baseCls: 'bi-code-editor bi-card', value: '', watermark: "", - lineHeight: 2 + lineHeight: 2, + readOnly: false }); }, _init: function () { @@ -17724,7 +17725,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) {