Browse Source

少属性

es6
windy 7 years ago
parent
commit
1c63a47d63
  1. 6
      src/base/single/editor/editor.code.js

6
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) {

Loading…
Cancel
Save