Browse Source

combo和single destroyed

es6
windy 6 years ago
parent
commit
fdbf7b910e
  1. 14
      demo/js/case/combo/demo.text_value_combo.js
  2. 82
      dist/_fineui.min.js
  3. 16
      dist/base.js
  4. 16
      dist/bundle.js
  5. 26
      dist/bundle.min.js
  6. 14
      dist/demo.js
  7. 16
      dist/fineui.js
  8. 82
      dist/fineui.min.js
  9. 8
      src/base/combination/combo.js
  10. 8
      src/base/single/single.js

14
demo/js/case/combo/demo.text_value_combo.js

@ -6,9 +6,9 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, {
baseCls: "" baseCls: ""
}, },
render: function () { render: function () {
var combo; var combo, wrapper;
return { return {
type: "bi.vertical", type: "bi.button_group",
items: [{ items: [{
type: "bi.text_value_combo", type: "bi.text_value_combo",
ref: function () { ref: function () {
@ -39,17 +39,23 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, {
value: ["1", "2", "3"] value: ["1", "2", "3"]
} }
}, { }, {
type: "bi.popup_view", type: "bi.button",
width: 90, width: 90,
height: 25, height: 25,
handler: function () { handler: function () {
combo.setValue(3); wrapper.populate();
} }
}, { }, {
type: 'bi.label', type: 'bi.label',
height: 1000 height: 1000
}], }],
ref: function () {
wrapper = this;
},
layouts: [{
type: "bi.vertical",
vgap: 20 vgap: 20
}]
}; };
} }
}); });

82
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

16
dist/base.js vendored

@ -342,9 +342,9 @@ BI.Single = BI.inherit(BI.Widget, {
warningTitle: null, warningTitle: null,
tipType: null, // success或warning tipType: null, // success或warning
value: null, value: null,
belowMouse: false // title是否跟随鼠标, belowMouse: false, // title是否跟随鼠标,
// 之所以默认为body,是因为transform的效果影响 // 之所以默认为body,是因为transform的效果影响
// container: "body" container: "body"
}); });
}, },
@ -487,6 +487,10 @@ BI.Single = BI.inherit(BI.Widget, {
getValue: function () { getValue: function () {
return this.options.value; return this.options.value;
},
destroyed: function () {
BI.Tooltips.remove(this.getName());
} }
});/** });/**
* guy 表示一行数据通过position来定位位置的数据 * guy 表示一行数据通过position来定位位置的数据
@ -3023,7 +3027,7 @@ BI.Combo = BI.inherit(BI.Widget, {
trigger: "click", trigger: "click",
toggle: true, toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
container: null, // popupview放置的容器,默认为this.element container: "body", // popupview放置的容器,默认为this.element
isDefaultInit: false, isDefaultInit: false,
destroyWhenHide: false, destroyWhenHide: false,
isNeedAdjustHeight: true, // 是否需要高度调整 isNeedAdjustHeight: true, // 是否需要高度调整
@ -3481,6 +3485,12 @@ BI.Combo = BI.inherit(BI.Widget, {
.unbind("mouseleave." + this.getName()); .unbind("mouseleave." + this.getName());
BI.Resizers.remove(this.getName()); BI.Resizers.remove(this.getName());
BI.Combo.superclass.destroy.apply(this, arguments); BI.Combo.superclass.destroy.apply(this, arguments);
},
destroyed: function () {
this.popupView && this.popupView.destroy();
this.popupView = null;
this._rendered = false;
} }
}); });
BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE";

16
dist/bundle.js vendored

@ -36257,9 +36257,9 @@ BI.Single = BI.inherit(BI.Widget, {
warningTitle: null, warningTitle: null,
tipType: null, // success或warning tipType: null, // success或warning
value: null, value: null,
belowMouse: false // title是否跟随鼠标, belowMouse: false, // title是否跟随鼠标,
// 之所以默认为body,是因为transform的效果影响 // 之所以默认为body,是因为transform的效果影响
// container: "body" container: "body"
}); });
}, },
@ -36402,6 +36402,10 @@ BI.Single = BI.inherit(BI.Widget, {
getValue: function () { getValue: function () {
return this.options.value; return this.options.value;
},
destroyed: function () {
BI.Tooltips.remove(this.getName());
} }
});/** });/**
* guy 表示一行数据通过position来定位位置的数据 * guy 表示一行数据通过position来定位位置的数据
@ -38938,7 +38942,7 @@ BI.Combo = BI.inherit(BI.Widget, {
trigger: "click", trigger: "click",
toggle: true, toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
container: null, // popupview放置的容器,默认为this.element container: "body", // popupview放置的容器,默认为this.element
isDefaultInit: false, isDefaultInit: false,
destroyWhenHide: false, destroyWhenHide: false,
isNeedAdjustHeight: true, // 是否需要高度调整 isNeedAdjustHeight: true, // 是否需要高度调整
@ -39396,6 +39400,12 @@ BI.Combo = BI.inherit(BI.Widget, {
.unbind("mouseleave." + this.getName()); .unbind("mouseleave." + this.getName());
BI.Resizers.remove(this.getName()); BI.Resizers.remove(this.getName());
BI.Combo.superclass.destroy.apply(this, arguments); BI.Combo.superclass.destroy.apply(this, arguments);
},
destroyed: function () {
this.popupView && this.popupView.destroy();
this.popupView = null;
this._rendered = false;
} }
}); });
BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE";

26
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

14
dist/demo.js vendored

@ -2222,9 +2222,9 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, {
baseCls: "" baseCls: ""
}, },
render: function () { render: function () {
var combo; var combo, wrapper;
return { return {
type: "bi.vertical", type: "bi.button_group",
items: [{ items: [{
type: "bi.text_value_combo", type: "bi.text_value_combo",
ref: function () { ref: function () {
@ -2255,17 +2255,23 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, {
value: ["1", "2", "3"] value: ["1", "2", "3"]
} }
}, { }, {
type: "bi.popup_view", type: "bi.button",
width: 90, width: 90,
height: 25, height: 25,
handler: function () { handler: function () {
combo.setValue(3); wrapper.populate();
} }
}, { }, {
type: 'bi.label', type: 'bi.label',
height: 1000 height: 1000
}], }],
ref: function () {
wrapper = this;
},
layouts: [{
type: "bi.vertical",
vgap: 20 vgap: 20
}]
}; };
} }
}); });

16
dist/fineui.js vendored

@ -36506,9 +36506,9 @@ BI.Single = BI.inherit(BI.Widget, {
warningTitle: null, warningTitle: null,
tipType: null, // success或warning tipType: null, // success或warning
value: null, value: null,
belowMouse: false // title是否跟随鼠标, belowMouse: false, // title是否跟随鼠标,
// 之所以默认为body,是因为transform的效果影响 // 之所以默认为body,是因为transform的效果影响
// container: "body" container: "body"
}); });
}, },
@ -36651,6 +36651,10 @@ BI.Single = BI.inherit(BI.Widget, {
getValue: function () { getValue: function () {
return this.options.value; return this.options.value;
},
destroyed: function () {
BI.Tooltips.remove(this.getName());
} }
});/** });/**
* guy 表示一行数据通过position来定位位置的数据 * guy 表示一行数据通过position来定位位置的数据
@ -39187,7 +39191,7 @@ BI.Combo = BI.inherit(BI.Widget, {
trigger: "click", trigger: "click",
toggle: true, toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
container: null, // popupview放置的容器,默认为this.element container: "body", // popupview放置的容器,默认为this.element
isDefaultInit: false, isDefaultInit: false,
destroyWhenHide: false, destroyWhenHide: false,
isNeedAdjustHeight: true, // 是否需要高度调整 isNeedAdjustHeight: true, // 是否需要高度调整
@ -39645,6 +39649,12 @@ BI.Combo = BI.inherit(BI.Widget, {
.unbind("mouseleave." + this.getName()); .unbind("mouseleave." + this.getName());
BI.Resizers.remove(this.getName()); BI.Resizers.remove(this.getName());
BI.Combo.superclass.destroy.apply(this, arguments); BI.Combo.superclass.destroy.apply(this, arguments);
},
destroyed: function () {
this.popupView && this.popupView.destroy();
this.popupView = null;
this._rendered = false;
} }
}); });
BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE";

82
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

8
src/base/combination/combo.js

@ -10,7 +10,7 @@ BI.Combo = BI.inherit(BI.Widget, {
trigger: "click", trigger: "click",
toggle: true, toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
container: null, // popupview放置的容器,默认为this.element container: "body", // popupview放置的容器,默认为this.element
isDefaultInit: false, isDefaultInit: false,
destroyWhenHide: false, destroyWhenHide: false,
isNeedAdjustHeight: true, // 是否需要高度调整 isNeedAdjustHeight: true, // 是否需要高度调整
@ -468,6 +468,12 @@ BI.Combo = BI.inherit(BI.Widget, {
.unbind("mouseleave." + this.getName()); .unbind("mouseleave." + this.getName());
BI.Resizers.remove(this.getName()); BI.Resizers.remove(this.getName());
BI.Combo.superclass.destroy.apply(this, arguments); BI.Combo.superclass.destroy.apply(this, arguments);
},
destroyed: function () {
this.popupView && this.popupView.destroy();
this.popupView = null;
this._rendered = false;
} }
}); });
BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE";

8
src/base/single/single.js

@ -19,9 +19,9 @@ BI.Single = BI.inherit(BI.Widget, {
warningTitle: null, warningTitle: null,
tipType: null, // success或warning tipType: null, // success或warning
value: null, value: null,
belowMouse: false // title是否跟随鼠标, belowMouse: false, // title是否跟随鼠标,
// 之所以默认为body,是因为transform的效果影响 // 之所以默认为body,是因为transform的效果影响
// container: "body" container: "body"
}); });
}, },
@ -164,5 +164,9 @@ BI.Single = BI.inherit(BI.Widget, {
getValue: function () { getValue: function () {
return this.options.value; return this.options.value;
},
destroyed: function () {
BI.Tooltips.remove(this.getName());
} }
}); });
Loading…
Cancel
Save