diff --git a/dist/bundle.js b/dist/bundle.js index 3d092db8c7..be2dbad9e3 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -82239,6 +82239,9 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/** } else { console.error("不支持此浏览器"); } + if(o.readOnly) { + newInstance.disable(); + } return newInstance; }, @@ -83048,7 +83051,8 @@ BI.RichEditor = BI.inherit(BI.Widget, { this.editor = BI.createWidget({ type: "bi.nic_editor", width: o.width, - height: o.height + height: o.height, + readOnly: o.readOnly }); this.editor.on(BI.NicEditor.EVENT_BLUR, function () { @@ -83059,6 +83063,7 @@ BI.RichEditor = BI.inherit(BI.Widget, { type: "bi.combo", element: this, toggle: false, + trigger: o.readOnly ? "" : "click", direction: "top,left", isNeedAdjustWidth: false, isNeedAdjustHeight: false, @@ -83076,6 +83081,7 @@ BI.RichEditor = BI.inherit(BI.Widget, { }); this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () { + self.fireEvent(BI.RichEditor.EVENT_AFTER_HIDEVIEW); }); }, @@ -83087,6 +83093,7 @@ BI.RichEditor = BI.inherit(BI.Widget, { return this.editor.getValue(); } }); +BI.RichEditor.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; BI.RichEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.shortcut("bi.rich_editor", BI.RichEditor);/** * 分段控件使用的button diff --git a/dist/case.js b/dist/case.js index 5582e2b01f..c48c75ead3 100644 --- a/dist/case.js +++ b/dist/case.js @@ -10297,6 +10297,9 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/** } else { console.error("不支持此浏览器"); } + if(o.readOnly) { + newInstance.disable(); + } return newInstance; }, @@ -11106,7 +11109,8 @@ BI.RichEditor = BI.inherit(BI.Widget, { this.editor = BI.createWidget({ type: "bi.nic_editor", width: o.width, - height: o.height + height: o.height, + readOnly: o.readOnly }); this.editor.on(BI.NicEditor.EVENT_BLUR, function () { @@ -11117,6 +11121,7 @@ BI.RichEditor = BI.inherit(BI.Widget, { type: "bi.combo", element: this, toggle: false, + trigger: o.readOnly ? "" : "click", direction: "top,left", isNeedAdjustWidth: false, isNeedAdjustHeight: false, @@ -11134,6 +11139,7 @@ BI.RichEditor = BI.inherit(BI.Widget, { }); this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () { + self.fireEvent(BI.RichEditor.EVENT_AFTER_HIDEVIEW); }); }, @@ -11145,6 +11151,7 @@ BI.RichEditor = BI.inherit(BI.Widget, { return this.editor.getValue(); } }); +BI.RichEditor.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; BI.RichEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.shortcut("bi.rich_editor", BI.RichEditor);/** * 分段控件使用的button diff --git a/src/case/richeditor/niceditor/niceditor.js b/src/case/richeditor/niceditor/niceditor.js index 1e93f1f8f5..8261c8416d 100644 --- a/src/case/richeditor/niceditor/niceditor.js +++ b/src/case/richeditor/niceditor/niceditor.js @@ -38,6 +38,9 @@ } else { console.error("不支持此浏览器"); } + if(o.readOnly) { + newInstance.disable(); + } return newInstance; }, diff --git a/src/case/richeditor/richeditor.js b/src/case/richeditor/richeditor.js index 42ab26a8d4..39c4763403 100644 --- a/src/case/richeditor/richeditor.js +++ b/src/case/richeditor/richeditor.js @@ -18,7 +18,8 @@ BI.RichEditor = BI.inherit(BI.Widget, { this.editor = BI.createWidget({ type: "bi.nic_editor", width: o.width, - height: o.height + height: o.height, + readOnly: o.readOnly }); this.editor.on(BI.NicEditor.EVENT_BLUR, function () { @@ -29,6 +30,7 @@ BI.RichEditor = BI.inherit(BI.Widget, { type: "bi.combo", element: this, toggle: false, + trigger: o.readOnly ? "" : "click", direction: "top,left", isNeedAdjustWidth: false, isNeedAdjustHeight: false, @@ -46,6 +48,7 @@ BI.RichEditor = BI.inherit(BI.Widget, { }); this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () { + self.fireEvent(BI.RichEditor.EVENT_AFTER_HIDEVIEW); }); }, @@ -57,5 +60,6 @@ BI.RichEditor = BI.inherit(BI.Widget, { return this.editor.getValue(); } }); +BI.RichEditor.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; BI.RichEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.shortcut("bi.rich_editor", BI.RichEditor); \ No newline at end of file