Browse Source

无jira editor自适应

es6
zsmj 2 years ago
parent
commit
23a1aa75ce
  1. 24
      src/case/editor/editor.shelter.js
  2. 24
      src/case/editor/editor.state.js

24
src/case/editor/editor.shelter.js

@ -58,17 +58,6 @@ BI.ShelterEditor = BI.inherit(BI.Widget, {
height: o.height, height: o.height,
hgap: o.hgap + 2 hgap: o.hgap + 2
}); });
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: this.text,
left: 0,
right: 0,
top: 0,
bottom: 0
}]
});
this.text.on(BI.Controller.EVENT_CHANGE, function () { this.text.on(BI.Controller.EVENT_CHANGE, function () {
arguments[2] = self; arguments[2] = self;
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
@ -134,10 +123,17 @@ BI.ShelterEditor = BI.inherit(BI.Widget, {
self.fireEvent(BI.ShelterEditor.EVENT_EMPTY, arguments); self.fireEvent(BI.ShelterEditor.EVENT_EMPTY, arguments);
}); });
BI.createWidget({ BI.createWidget({
type: "bi.vertical", type: "bi.absolute",
scrolly: false,
element: this, element: this,
items: [this.editor] items: [
{
el: this.text,
inset: 0,
}, {
el: this.editor,
inset: 0,
}
]
}); });
this._showHint(); this._showHint();
self._checkText(); self._checkText();

24
src/case/editor/editor.state.js

@ -77,17 +77,6 @@ BI.StateEditor = BI.inherit(BI.Widget, {
self.fireEvent(BI.StateEditor.EVENT_CLICK_LABEL); self.fireEvent(BI.StateEditor.EVENT_CLICK_LABEL);
}); });
}); });
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: this.text,
left: 0,
right: 0,
top: 0,
bottom: 0
}]
});
this.editor.on(BI.Controller.EVENT_CHANGE, function () { this.editor.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
}); });
@ -143,10 +132,17 @@ BI.StateEditor = BI.inherit(BI.Widget, {
self.fireEvent(BI.StateEditor.EVENT_EMPTY, arguments); self.fireEvent(BI.StateEditor.EVENT_EMPTY, arguments);
}); });
BI.createWidget({ BI.createWidget({
type: "bi.vertical", type: "bi.absolute",
scrolly: false,
element: this, element: this,
items: [this.editor] items: [
{
el: this.text,
inset: 0,
}, {
el: this.editor,
inset: 0,
}
]
}); });
this._showHint(); this._showHint();
if (BI.isNotNull(o.text)) { if (BI.isNotNull(o.text)) {

Loading…
Cancel
Save