Browse Source

refactor: 调整命名

qufenxi
alan 6 years ago
parent
commit
f83871023f
  1. 16
      src/plugins/jndi/jndi.edit.ts
  2. 16
      src/plugins/jndi/jndi.preview.ts

16
src/plugins/jndi/jndi.edit.ts

@ -31,7 +31,7 @@ const Widget = BI.inherit(BI.Widget, {
text: BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Context'), text: BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Context'),
height: 160, height: 160,
ref: _ref => { ref: _ref => {
this.JndiForm = _ref; this.jndiFormRef = _ref;
}, },
form: { form: {
type: Vertical, type: Vertical,
@ -100,16 +100,16 @@ const Widget = BI.inherit(BI.Widget, {
textAlign: 'right', textAlign: 'right',
value: true, value: true,
ref: _ref => { ref: _ref => {
this.Collapse = _ref; this.collapseRef = _ref;
}, },
handler: () => { handler: () => {
const isCollapse = this.Collapse.getValue(); const isCollapse = this.collapseRef.getValue();
const height = isCollapse ? 550 : 160; const height = isCollapse ? 550 : 160;
const text = isCollapse ? BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Collapse-Attributes') : BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Other_Attributes'); const text = isCollapse ? BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Collapse-Attributes') : BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Other_Attributes');
this.JndiForm.setHeight(height); this.jndiFormRef.setHeight(height);
this.Collapse.setValue(!isCollapse); this.collapseRef.setValue(!isCollapse);
this.Collapse.setText(text); this.collapseRef.setText(text);
this.OtherAttributes.setVisible(isCollapse); this.otherAttributesRef.setVisible(isCollapse);
}, },
}, },
}, },
@ -118,7 +118,7 @@ const Widget = BI.inherit(BI.Widget, {
cls: 'right-form', cls: 'right-form',
invisible: false, invisible: false,
ref: _ref => { ref: _ref => {
this.OtherAttributes = _ref; this.otherAttributesRef = _ref;
}, },
items: BI.map(otherAttributes, (index: number, item: AttributeType) => { items: BI.map(otherAttributes, (index: number, item: AttributeType) => {
return { return {

16
src/plugins/jndi/jndi.preview.ts

@ -26,7 +26,7 @@ const jndiWidget = BI.inherit(BI.Widget, {
text: BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Context'), text: BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Context'),
height: 160, height: 160,
ref: _ref => { ref: _ref => {
this.JndiForm = _ref; this.jndiFormRef = _ref;
}, },
form: { form: {
type: Vertical, type: Vertical,
@ -78,16 +78,16 @@ const jndiWidget = BI.inherit(BI.Widget, {
textAlign: 'right', textAlign: 'right',
value: true, value: true,
ref: _ref => { ref: _ref => {
this.Collapse = _ref; this.collapseRef = _ref;
}, },
handler: () => { handler: () => {
const isCollapse = this.Collapse.getValue(); const isCollapse = this.collapseRef.getValue();
const height = isCollapse ? 550 : 160; const height = isCollapse ? 550 : 160;
const text = isCollapse ? BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Collapse-Attributes') : BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Other_Attributes'); const text = isCollapse ? BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Collapse-Attributes') : BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Other_Attributes');
this.JndiForm.setHeight(height); this.jndiFormRef.setHeight(height);
this.Collapse.setValue(!isCollapse); this.collapseRef.setValue(!isCollapse);
this.Collapse.setText(text); this.collapseRef.setText(text);
this.OtherAttributes.setVisible(isCollapse); this.otherAttributesRef.setVisible(isCollapse);
}, },
}, },
}, },
@ -96,7 +96,7 @@ const jndiWidget = BI.inherit(BI.Widget, {
cls: 'right-form', cls: 'right-form',
invisible: false, invisible: false,
ref: _ref => { ref: _ref => {
this.OtherAttributes = _ref; this.otherAttributesRef = _ref;
}, },
items: BI.map(otherAttributes, (index: number, item: AttributeType) => { items: BI.map(otherAttributes, (index: number, item: AttributeType) => {
return { return {

Loading…
Cancel
Save