Browse Source

Merging in latest from upstream (VISUAL/fineui:refs/heads/master)

* commit 'eeb18e53edde5741e872cf587609ec203418c432':
  auto upgrade version to 2.0.20210309095217
  auto upgrade version to 2.0.20210309093250
  增加组件默认populate方法
  auto upgrade version to 2.0.20210308214251
  增加组件默认populate方法
  增加组件默认populate方法
  BI-82620 fix: 自定义trigger的不额外处理宽高
  auto upgrade version to 2.0.20210308094247
  无JIRA任务 更新font
  auto upgrade version to 2.0.20210307150239
  bugfix
  auto upgrade version to 2.0.20210305201215
  auto upgrade version to 2.0.20210305195217
  fix: 完善类型
  auto upgrade version to 2.0.20210305194218
  auto upgrade version to 2.0.20210305193244
  update
  update
  BI-82230 fix: 插入参数image字体
es6
parent
commit
fc8170cb1d
  1. 2
      dist/2.0/fineui.css
  2. 4
      dist/2.0/fineui.ie.min.js
  3. 2
      dist/2.0/fineui.ie.min.js.map
  4. 112
      dist/2.0/fineui.js
  5. 2
      dist/2.0/fineui.js.map
  6. 2
      dist/2.0/fineui.min.css
  7. 4
      dist/2.0/fineui.min.js
  8. 2
      dist/2.0/fineui.min.js.map
  9. 2
      dist/2.0/fineui_without_normalize.css
  10. 2
      dist/2.0/fineui_without_normalize.min.css
  11. 2
      dist/core.css
  12. 112
      dist/core.js
  13. 2
      dist/core.js.map
  14. 2
      dist/demo.css
  15. 112
      dist/demo.js
  16. 2
      dist/demo.js.map
  17. 2
      dist/fineui.css
  18. 4
      dist/fineui.ie.min.js
  19. 2
      dist/fineui.ie.min.js.map
  20. 112
      dist/fineui.js
  21. 2
      dist/fineui.js.map
  22. 2
      dist/fineui.min.css
  23. 4
      dist/fineui.min.js
  24. 2
      dist/fineui.min.js.map
  25. 94
      dist/fineui_without_jquery_polyfill.js
  26. 2
      dist/fineui_without_jquery_polyfill.js.map
  27. 2
      dist/font.css
  28. BIN
      dist/font/iconfont.eot
  29. BIN
      dist/font/iconfont.ttf
  30. BIN
      dist/font/iconfont.woff
  31. BIN
      dist/font/iconfont.woff2
  32. 2
      dist/lib/index.d.ts
  33. 2
      dist/lib/router/router.d.ts
  34. 2
      dist/resource.css
  35. 2
      dist/utils.js
  36. 2
      dist/utils.min.js
  37. 2
      examples/demo.worker.js
  38. 15
      examples/dev.html
  39. 4
      examples/hooks.html
  40. 8
      examples/worker.html
  41. 2
      package.json
  42. 1
      src/base/collection/collection.js
  43. 4
      src/base/combination/navigation.js
  44. 4
      src/base/combination/tab.js
  45. 1
      src/base/grid/grid.js
  46. 1
      src/base/layer/layer.popover.js
  47. 1
      src/base/list/listview.js
  48. 1
      src/base/list/virtuallist.js
  49. 4
      src/base/single/button/buttons/button.js
  50. 4
      src/base/single/editor/editor.textarea.js
  51. 4
      src/base/single/label/abstract.label.js
  52. 4
      src/base/single/single.js
  53. 4
      src/case/colorchooser/colorchooser.js
  54. 3
      src/case/colorchooser/colorchooser.popup.hex.js
  55. 3
      src/case/colorchooser/colorchooser.popup.js
  56. 7
      src/case/colorchooser/farbtastic/farbtastic.js
  57. 2
      src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js
  58. 3
      src/case/combo/searchtextvaluecombo/popup.searchtextvalue.js
  59. 4
      src/core/platform/web/dom.js
  60. 46
      src/core/widget.js
  61. 2
      src/core/wrapper/layout/layout.border.js
  62. 3
      src/widget/datepane/datepane.js
  63. 2
      src/widget/datetimepane/datetimepane.js
  64. 4
      src/widget/dynamicdate/dynamicdate.combo.js
  65. 4
      src/widget/dynamicdatetime/dynamicdatetime.combo.js
  66. 2
      src/widget/yearmonth/card.static.yearmonth.js
  67. 2
      typescript/router/router.ts

2
dist/2.0/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.ie.min.js.map vendored

File diff suppressed because one or more lines are too long

112
dist/2.0/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-3-5 17:10:44 */
/*! time: 2021-3-9 09:50:45 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -13912,6 +13912,22 @@ module.exports = function (exec) {
callLifeHook(this, "created");
},
_initCurrent: function () {
var o = this.options;
if (o._baseCls || o.baseCls || o.extraCls || o.cls) {
this.element.addClass((o._baseCls || "") + " " + (o.baseCls || "") + " " + (o.extraCls || "") + " " + (o.cls || ""));
}
if (o.attributes) {
this.element.attr(o.attributes);
}
if (o.data) {
this.element.data(o.data);
}
if (o.css) {
this.element.css(o.css);
}
},
/**
* 初始化根节点
* @private
@ -13939,18 +13955,7 @@ module.exports = function (exec) {
this.element = BI.Widget._renderEngine.createElement(this);
}
this.element._isWidget = true;
if (o._baseCls || o.baseCls || o.extraCls || o.cls) {
this.element.addClass((o._baseCls || "") + " " + (o.baseCls || "") + " " + (o.extraCls || "") + " " + (o.cls || ""));
}
if (o.attributes) {
this.element.attr(o.attributes);
}
if (o.data) {
this.element.data(o.data);
}
if (o.css) {
this.element.css(o.css);
}
this._initCurrent();
},
_initElementWidth: function () {
@ -14041,10 +14046,10 @@ module.exports = function (exec) {
}
this._mountChildren && this._mountChildren();
if (layer === 0) {
// mounted放到下一个宏任务里执行
setTimeout(function () {
self.__afterMount(lifeHook, predicate);
}, 0);
// mounted里面会执行scrollTo之类的方法,如果放宏任务里会闪
// setTimeout(function () {
self.__afterMount(lifeHook, predicate);
// }, 0);
}
return true;
},
@ -14346,6 +14351,15 @@ module.exports = function (exec) {
this.element.empty();
},
// 默认的populate方法就是干掉重来
populate: function () {
this.purgeListeners();
this.empty();
this._initCurrent();
this._init();
this._initRef();
},
_destroy: function () {
this.__d();
this.element.destroy();
@ -19871,7 +19885,7 @@ BI.shortcut("bi.adaptive", BI.AdaptiveLayout);
BI.BorderLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.BorderLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-border",
baseCls: "bi-border-layout",
items: {}
});
},
@ -22488,10 +22502,6 @@ BI.Single = BI.inherit(BI.Widget, {
this._hoverBinded = false;
},
populate: function (items) {
this.items = items || [];
},
// opt: {container: '', belowMouse: false}
setTitle: function (title, opt) {
this.options.title = title;
@ -23849,6 +23859,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
}
},
// mounted之后绑定事件
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) {
@ -25610,7 +25621,7 @@ BI.Navigation = BI.inherit(BI.Widget, {
});
},
mounted: function () {
created: function () {
var o = this.options;
if (o.showIndex !== false) {
this.setSelect(o.showIndex);
@ -25719,6 +25730,7 @@ BI.Navigation.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.navigation", BI.Navigation);
/***/ }),
/* 413 */
/***/ (function(module, exports) {
@ -26418,7 +26430,7 @@ BI.Tab = BI.inherit(BI.Widget, {
}
},
mounted: function () {
created: function () {
var o = this.options;
if (o.showIndex !== false) {
this.setSelect(o.showIndex);
@ -26494,6 +26506,7 @@ BI.Tab.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.tab", BI.Tab);
/***/ }),
/* 416 */
/***/ (function(module, exports) {
@ -26819,6 +26832,7 @@ BI.GridView = BI.inherit(BI.Widget, {
}
},
// mounted之后绑定事件
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) {
@ -27295,6 +27309,7 @@ BI.Popover = BI.inherit(BI.Widget, {
});
},
// mounted之后绑定事件
mounted: function () {
var self = this; var o = this.options;
this.dragger.element.mousedown(function (e) {
@ -27788,6 +27803,7 @@ BI.ListView = BI.inherit(BI.Widget, {
};
},
// mounted之后绑定事件
mounted: function () {
var self = this, o = this.options;
this._populate();
@ -27921,6 +27937,7 @@ BI.VirtualList = BI.inherit(BI.Widget, {
};
},
// mounted之后绑定事件
mounted: function () {
var self = this, o = this.options;
this._populate();
@ -28776,10 +28793,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
unHighLight: function () {
this.text.unHighLight.apply(this.text, arguments);
},
destroy: function () {
BI.Button.superclass.destroy.apply(this, arguments);
}
});
BI.shortcut("bi.button", BI.Button);
@ -30592,8 +30605,8 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
},
left: 4,
right: 4,
top: 4,
bottom: 4
top: 2,
bottom: 2
}]
});
@ -31918,10 +31931,6 @@ BI.shortcut("bi.radio", BI.Radio);
if (!this.isReadOnly()) {
this.text.setValue(v);
}
},
populate: function () {
BI.AbstractLabel.superclass.populate.apply(this, arguments);
}
});
}());
@ -36207,7 +36216,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
};
},
mounted: function () {
created: function () {
var o = this.options;
if(BI.isKey(o.value)) {
this._checkError(o.value);
@ -36304,6 +36313,7 @@ BI.SearchTextValueComboPopup = BI.inherit(BI.Pane, {
};
},
// mounted之后做check
mounted: function() {
this.check();
},
@ -36330,6 +36340,7 @@ BI.SearchTextValueComboPopup = BI.inherit(BI.Pane, {
BI.SearchTextValueComboPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.search_text_value_combo_popup", BI.SearchTextValueComboPopup);
/***/ }),
/* 507 */
/***/ (function(module, exports) {
@ -42725,7 +42736,7 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
};
},
mounted: function () {
created: function () {
this.setValue(this.options.value);
},
@ -42757,7 +42768,6 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
}
},
setValue: function (v) {
v = v || {};
var type = v.type || BI.DynamicDateCombo.Static;
@ -43454,7 +43464,7 @@ BI.DynamicDateTimePane = BI.inherit(BI.Widget, {
};
},
mounted: function () {
created: function () {
this.setValue(this.options.value);
},
@ -44917,7 +44927,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
};
},
mounted: function () {
created: function () {
this._checkDynamicValue(this.storeValue);
},
@ -45002,6 +45012,7 @@ BI.extend(BI.DynamicDateCombo, {
Dynamic: 2
});
/***/ }),
/* 569 */
/***/ (function(module, exports) {
@ -46009,7 +46020,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
};
},
mounted: function () {
created: function () {
this._checkDynamicValue(this.storeValue);
},
@ -46094,6 +46105,7 @@ BI.extend(BI.DynamicDateTimeCombo, {
Dynamic: 2
});
/***/ }),
/* 573 */
/***/ (function(module, exports) {
@ -67688,7 +67700,7 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
};
},
mounted: function() {
created: function() {
this._checkMonthStatus(this.selectedYear);
},
@ -75615,11 +75627,11 @@ BI.prepares.push(function () {
BI.Widget._renderEngine.createElement("body").append(canvas);
var ctx = canvas.getContext("2d");
ctx.font = "12px Georgia";
ctx.font = "12px Helvetica Neue,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,微软雅黑,Heiti,黑体,sans-serif";
var w = ctx.measureText(param).width + 4;
canvas.width = w * ratio;
canvas.height = 16 * ratio;
ctx.font = 12 * ratio + "px Georgia";
ctx.font = 12 * ratio + "px Helvetica Neue,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,微软雅黑,Heiti,黑体,sans-serif";
ctx.fillStyle = fillStyle || "#3685f2";
ctx.textBaseline = "middle";
// ctx.fillStyle = "#EAF2FD";
@ -93431,8 +93443,8 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
ref: function (_ref) {
self.trigger = _ref;
},
width: o.width - 2,
height: o.height - 2
width: o.el.type ? o.width : o.width - 2,
height: o.el.type ? o.height : o.height - 2
}, o.el),
popup: {
el: BI.extend({
@ -93683,6 +93695,7 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
};
},
// 这里就实现的不好了,setValue里面有个editor,editor的setValue会检测错误然后出bubble提示
mounted: function () {
var self = this;
var o = this.options;
@ -93757,6 +93770,7 @@ BI.HexColorChooserPopup.EVENT_VALUE_CHANGE = "EVENT_VALUE_CHANGE";
BI.HexColorChooserPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.hex_color_chooser_popup", BI.HexColorChooserPopup);
/***/ }),
/* 876 */
/***/ (function(module, exports) {
@ -93978,6 +93992,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
};
},
// 这里就实现的不好了,setValue里面有个editor,editor的setValue会检测错误然后出bubble提示
mounted: function () {
var self = this;
var o = this.options;
@ -94052,6 +94067,7 @@ BI.ColorChooserPopup.EVENT_VALUE_CHANGE = "EVENT_VALUE_CHANGE";
BI.ColorChooserPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.color_chooser_popup", BI.ColorChooserPopup);
/***/ }),
/* 878 */
/***/ (function(module, exports) {
@ -95598,7 +95614,7 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
};
},
mounted: function () {
created: function () {
var o = this.options;
if (BI.isKey(o.value)) {
this.setValue(o.value);
@ -95697,8 +95713,6 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
// Saturation/Luminance gradient
this.colorWrapper.element.css("backgroundColor", this._pack(this._HSLToRGB([this.hsl[0], 1, 0.5])));
this.fireEvent(BI.Farbtastic.EVENT_CHANGE, this.getValue(), this);
},
_absolutePosition: function (el) {
@ -95775,6 +95789,7 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
var lum = Math.max(0, Math.min(1, -(pos.y / this.constants.SQUARE) + .5));
this._setHSL([this.hsl[0], sat, lum]);
}
this.fireEvent(BI.Farbtastic.EVENT_CHANGE, this.getValue(), this);
},
doClick: function (event) {
@ -95797,6 +95812,7 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
BI.Farbtastic.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.farbtastic", BI.Farbtastic);
/***/ }),
/* 889 */
/***/ (function(module, exports) {

2
dist/2.0/fineui.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui_without_normalize.css vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui_without_normalize.min.css vendored

File diff suppressed because one or more lines are too long

2
dist/core.css vendored

File diff suppressed because one or more lines are too long

112
dist/core.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-3-5 17:10:44 */
/*! time: 2021-3-9 09:50:45 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -13912,6 +13912,22 @@ module.exports = function (exec) {
callLifeHook(this, "created");
},
_initCurrent: function () {
var o = this.options;
if (o._baseCls || o.baseCls || o.extraCls || o.cls) {
this.element.addClass((o._baseCls || "") + " " + (o.baseCls || "") + " " + (o.extraCls || "") + " " + (o.cls || ""));
}
if (o.attributes) {
this.element.attr(o.attributes);
}
if (o.data) {
this.element.data(o.data);
}
if (o.css) {
this.element.css(o.css);
}
},
/**
* 初始化根节点
* @private
@ -13939,18 +13955,7 @@ module.exports = function (exec) {
this.element = BI.Widget._renderEngine.createElement(this);
}
this.element._isWidget = true;
if (o._baseCls || o.baseCls || o.extraCls || o.cls) {
this.element.addClass((o._baseCls || "") + " " + (o.baseCls || "") + " " + (o.extraCls || "") + " " + (o.cls || ""));
}
if (o.attributes) {
this.element.attr(o.attributes);
}
if (o.data) {
this.element.data(o.data);
}
if (o.css) {
this.element.css(o.css);
}
this._initCurrent();
},
_initElementWidth: function () {
@ -14041,10 +14046,10 @@ module.exports = function (exec) {
}
this._mountChildren && this._mountChildren();
if (layer === 0) {
// mounted放到下一个宏任务里执行
setTimeout(function () {
self.__afterMount(lifeHook, predicate);
}, 0);
// mounted里面会执行scrollTo之类的方法,如果放宏任务里会闪
// setTimeout(function () {
self.__afterMount(lifeHook, predicate);
// }, 0);
}
return true;
},
@ -14346,6 +14351,15 @@ module.exports = function (exec) {
this.element.empty();
},
// 默认的populate方法就是干掉重来
populate: function () {
this.purgeListeners();
this.empty();
this._initCurrent();
this._init();
this._initRef();
},
_destroy: function () {
this.__d();
this.element.destroy();
@ -19871,7 +19885,7 @@ BI.shortcut("bi.adaptive", BI.AdaptiveLayout);
BI.BorderLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.BorderLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-border",
baseCls: "bi-border-layout",
items: {}
});
},
@ -22488,10 +22502,6 @@ BI.Single = BI.inherit(BI.Widget, {
this._hoverBinded = false;
},
populate: function (items) {
this.items = items || [];
},
// opt: {container: '', belowMouse: false}
setTitle: function (title, opt) {
this.options.title = title;
@ -23849,6 +23859,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
}
},
// mounted之后绑定事件
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) {
@ -25610,7 +25621,7 @@ BI.Navigation = BI.inherit(BI.Widget, {
});
},
mounted: function () {
created: function () {
var o = this.options;
if (o.showIndex !== false) {
this.setSelect(o.showIndex);
@ -25719,6 +25730,7 @@ BI.Navigation.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.navigation", BI.Navigation);
/***/ }),
/* 413 */
/***/ (function(module, exports) {
@ -26418,7 +26430,7 @@ BI.Tab = BI.inherit(BI.Widget, {
}
},
mounted: function () {
created: function () {
var o = this.options;
if (o.showIndex !== false) {
this.setSelect(o.showIndex);
@ -26494,6 +26506,7 @@ BI.Tab.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.tab", BI.Tab);
/***/ }),
/* 416 */
/***/ (function(module, exports) {
@ -26819,6 +26832,7 @@ BI.GridView = BI.inherit(BI.Widget, {
}
},
// mounted之后绑定事件
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) {
@ -27295,6 +27309,7 @@ BI.Popover = BI.inherit(BI.Widget, {
});
},
// mounted之后绑定事件
mounted: function () {
var self = this; var o = this.options;
this.dragger.element.mousedown(function (e) {
@ -27788,6 +27803,7 @@ BI.ListView = BI.inherit(BI.Widget, {
};
},
// mounted之后绑定事件
mounted: function () {
var self = this, o = this.options;
this._populate();
@ -27921,6 +27937,7 @@ BI.VirtualList = BI.inherit(BI.Widget, {
};
},
// mounted之后绑定事件
mounted: function () {
var self = this, o = this.options;
this._populate();
@ -28776,10 +28793,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
unHighLight: function () {
this.text.unHighLight.apply(this.text, arguments);
},
destroy: function () {
BI.Button.superclass.destroy.apply(this, arguments);
}
});
BI.shortcut("bi.button", BI.Button);
@ -30592,8 +30605,8 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
},
left: 4,
right: 4,
top: 4,
bottom: 4
top: 2,
bottom: 2
}]
});
@ -31918,10 +31931,6 @@ BI.shortcut("bi.radio", BI.Radio);
if (!this.isReadOnly()) {
this.text.setValue(v);
}
},
populate: function () {
BI.AbstractLabel.superclass.populate.apply(this, arguments);
}
});
}());
@ -36207,7 +36216,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
};
},
mounted: function () {
created: function () {
var o = this.options;
if(BI.isKey(o.value)) {
this._checkError(o.value);
@ -36304,6 +36313,7 @@ BI.SearchTextValueComboPopup = BI.inherit(BI.Pane, {
};
},
// mounted之后做check
mounted: function() {
this.check();
},
@ -36330,6 +36340,7 @@ BI.SearchTextValueComboPopup = BI.inherit(BI.Pane, {
BI.SearchTextValueComboPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.search_text_value_combo_popup", BI.SearchTextValueComboPopup);
/***/ }),
/* 507 */
/***/ (function(module, exports) {
@ -42725,7 +42736,7 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
};
},
mounted: function () {
created: function () {
this.setValue(this.options.value);
},
@ -42757,7 +42768,6 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
}
},
setValue: function (v) {
v = v || {};
var type = v.type || BI.DynamicDateCombo.Static;
@ -43454,7 +43464,7 @@ BI.DynamicDateTimePane = BI.inherit(BI.Widget, {
};
},
mounted: function () {
created: function () {
this.setValue(this.options.value);
},
@ -44917,7 +44927,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
};
},
mounted: function () {
created: function () {
this._checkDynamicValue(this.storeValue);
},
@ -45002,6 +45012,7 @@ BI.extend(BI.DynamicDateCombo, {
Dynamic: 2
});
/***/ }),
/* 569 */
/***/ (function(module, exports) {
@ -46009,7 +46020,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
};
},
mounted: function () {
created: function () {
this._checkDynamicValue(this.storeValue);
},
@ -46094,6 +46105,7 @@ BI.extend(BI.DynamicDateTimeCombo, {
Dynamic: 2
});
/***/ }),
/* 573 */
/***/ (function(module, exports) {
@ -67688,7 +67700,7 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
};
},
mounted: function() {
created: function() {
this._checkMonthStatus(this.selectedYear);
},
@ -75615,11 +75627,11 @@ BI.prepares.push(function () {
BI.Widget._renderEngine.createElement("body").append(canvas);
var ctx = canvas.getContext("2d");
ctx.font = "12px Georgia";
ctx.font = "12px Helvetica Neue,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,微软雅黑,Heiti,黑体,sans-serif";
var w = ctx.measureText(param).width + 4;
canvas.width = w * ratio;
canvas.height = 16 * ratio;
ctx.font = 12 * ratio + "px Georgia";
ctx.font = 12 * ratio + "px Helvetica Neue,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,微软雅黑,Heiti,黑体,sans-serif";
ctx.fillStyle = fillStyle || "#3685f2";
ctx.textBaseline = "middle";
// ctx.fillStyle = "#EAF2FD";
@ -93431,8 +93443,8 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
ref: function (_ref) {
self.trigger = _ref;
},
width: o.width - 2,
height: o.height - 2
width: o.el.type ? o.width : o.width - 2,
height: o.el.type ? o.height : o.height - 2
}, o.el),
popup: {
el: BI.extend({
@ -93683,6 +93695,7 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
};
},
// 这里就实现的不好了,setValue里面有个editor,editor的setValue会检测错误然后出bubble提示
mounted: function () {
var self = this;
var o = this.options;
@ -93757,6 +93770,7 @@ BI.HexColorChooserPopup.EVENT_VALUE_CHANGE = "EVENT_VALUE_CHANGE";
BI.HexColorChooserPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.hex_color_chooser_popup", BI.HexColorChooserPopup);
/***/ }),
/* 876 */
/***/ (function(module, exports) {
@ -93978,6 +93992,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
};
},
// 这里就实现的不好了,setValue里面有个editor,editor的setValue会检测错误然后出bubble提示
mounted: function () {
var self = this;
var o = this.options;
@ -94052,6 +94067,7 @@ BI.ColorChooserPopup.EVENT_VALUE_CHANGE = "EVENT_VALUE_CHANGE";
BI.ColorChooserPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.color_chooser_popup", BI.ColorChooserPopup);
/***/ }),
/* 878 */
/***/ (function(module, exports) {
@ -95598,7 +95614,7 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
};
},
mounted: function () {
created: function () {
var o = this.options;
if (BI.isKey(o.value)) {
this.setValue(o.value);
@ -95697,8 +95713,6 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
// Saturation/Luminance gradient
this.colorWrapper.element.css("backgroundColor", this._pack(this._HSLToRGB([this.hsl[0], 1, 0.5])));
this.fireEvent(BI.Farbtastic.EVENT_CHANGE, this.getValue(), this);
},
_absolutePosition: function (el) {
@ -95775,6 +95789,7 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
var lum = Math.max(0, Math.min(1, -(pos.y / this.constants.SQUARE) + .5));
this._setHSL([this.hsl[0], sat, lum]);
}
this.fireEvent(BI.Farbtastic.EVENT_CHANGE, this.getValue(), this);
},
doClick: function (event) {
@ -95797,6 +95812,7 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
BI.Farbtastic.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.farbtastic", BI.Farbtastic);
/***/ }),
/* 889 */
/***/ (function(module, exports) {

2
dist/core.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/demo.css vendored

File diff suppressed because one or more lines are too long

112
dist/demo.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-3-5 17:10:44 */
/*! time: 2021-3-9 09:50:45 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -13912,6 +13912,22 @@ module.exports = function (exec) {
callLifeHook(this, "created");
},
_initCurrent: function () {
var o = this.options;
if (o._baseCls || o.baseCls || o.extraCls || o.cls) {
this.element.addClass((o._baseCls || "") + " " + (o.baseCls || "") + " " + (o.extraCls || "") + " " + (o.cls || ""));
}
if (o.attributes) {
this.element.attr(o.attributes);
}
if (o.data) {
this.element.data(o.data);
}
if (o.css) {
this.element.css(o.css);
}
},
/**
* 初始化根节点
* @private
@ -13939,18 +13955,7 @@ module.exports = function (exec) {
this.element = BI.Widget._renderEngine.createElement(this);
}
this.element._isWidget = true;
if (o._baseCls || o.baseCls || o.extraCls || o.cls) {
this.element.addClass((o._baseCls || "") + " " + (o.baseCls || "") + " " + (o.extraCls || "") + " " + (o.cls || ""));
}
if (o.attributes) {
this.element.attr(o.attributes);
}
if (o.data) {
this.element.data(o.data);
}
if (o.css) {
this.element.css(o.css);
}
this._initCurrent();
},
_initElementWidth: function () {
@ -14041,10 +14046,10 @@ module.exports = function (exec) {
}
this._mountChildren && this._mountChildren();
if (layer === 0) {
// mounted放到下一个宏任务里执行
setTimeout(function () {
self.__afterMount(lifeHook, predicate);
}, 0);
// mounted里面会执行scrollTo之类的方法,如果放宏任务里会闪
// setTimeout(function () {
self.__afterMount(lifeHook, predicate);
// }, 0);
}
return true;
},
@ -14346,6 +14351,15 @@ module.exports = function (exec) {
this.element.empty();
},
// 默认的populate方法就是干掉重来
populate: function () {
this.purgeListeners();
this.empty();
this._initCurrent();
this._init();
this._initRef();
},
_destroy: function () {
this.__d();
this.element.destroy();
@ -19871,7 +19885,7 @@ BI.shortcut("bi.adaptive", BI.AdaptiveLayout);
BI.BorderLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.BorderLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-border",
baseCls: "bi-border-layout",
items: {}
});
},
@ -22488,10 +22502,6 @@ BI.Single = BI.inherit(BI.Widget, {
this._hoverBinded = false;
},
populate: function (items) {
this.items = items || [];
},
// opt: {container: '', belowMouse: false}
setTitle: function (title, opt) {
this.options.title = title;
@ -23849,6 +23859,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
}
},
// mounted之后绑定事件
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) {
@ -25610,7 +25621,7 @@ BI.Navigation = BI.inherit(BI.Widget, {
});
},
mounted: function () {
created: function () {
var o = this.options;
if (o.showIndex !== false) {
this.setSelect(o.showIndex);
@ -25719,6 +25730,7 @@ BI.Navigation.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.navigation", BI.Navigation);
/***/ }),
/* 413 */
/***/ (function(module, exports) {
@ -26418,7 +26430,7 @@ BI.Tab = BI.inherit(BI.Widget, {
}
},
mounted: function () {
created: function () {
var o = this.options;
if (o.showIndex !== false) {
this.setSelect(o.showIndex);
@ -26494,6 +26506,7 @@ BI.Tab.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.tab", BI.Tab);
/***/ }),
/* 416 */
/***/ (function(module, exports) {
@ -26819,6 +26832,7 @@ BI.GridView = BI.inherit(BI.Widget, {
}
},
// mounted之后绑定事件
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) {
@ -27295,6 +27309,7 @@ BI.Popover = BI.inherit(BI.Widget, {
});
},
// mounted之后绑定事件
mounted: function () {
var self = this; var o = this.options;
this.dragger.element.mousedown(function (e) {
@ -27788,6 +27803,7 @@ BI.ListView = BI.inherit(BI.Widget, {
};
},
// mounted之后绑定事件
mounted: function () {
var self = this, o = this.options;
this._populate();
@ -27921,6 +27937,7 @@ BI.VirtualList = BI.inherit(BI.Widget, {
};
},
// mounted之后绑定事件
mounted: function () {
var self = this, o = this.options;
this._populate();
@ -28776,10 +28793,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
unHighLight: function () {
this.text.unHighLight.apply(this.text, arguments);
},
destroy: function () {
BI.Button.superclass.destroy.apply(this, arguments);
}
});
BI.shortcut("bi.button", BI.Button);
@ -30592,8 +30605,8 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
},
left: 4,
right: 4,
top: 4,
bottom: 4
top: 2,
bottom: 2
}]
});
@ -31918,10 +31931,6 @@ BI.shortcut("bi.radio", BI.Radio);
if (!this.isReadOnly()) {
this.text.setValue(v);
}
},
populate: function () {
BI.AbstractLabel.superclass.populate.apply(this, arguments);
}
});
}());
@ -36207,7 +36216,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
};
},
mounted: function () {
created: function () {
var o = this.options;
if(BI.isKey(o.value)) {
this._checkError(o.value);
@ -36304,6 +36313,7 @@ BI.SearchTextValueComboPopup = BI.inherit(BI.Pane, {
};
},
// mounted之后做check
mounted: function() {
this.check();
},
@ -36330,6 +36340,7 @@ BI.SearchTextValueComboPopup = BI.inherit(BI.Pane, {
BI.SearchTextValueComboPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.search_text_value_combo_popup", BI.SearchTextValueComboPopup);
/***/ }),
/* 507 */
/***/ (function(module, exports) {
@ -42725,7 +42736,7 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
};
},
mounted: function () {
created: function () {
this.setValue(this.options.value);
},
@ -42757,7 +42768,6 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
}
},
setValue: function (v) {
v = v || {};
var type = v.type || BI.DynamicDateCombo.Static;
@ -43454,7 +43464,7 @@ BI.DynamicDateTimePane = BI.inherit(BI.Widget, {
};
},
mounted: function () {
created: function () {
this.setValue(this.options.value);
},
@ -44917,7 +44927,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
};
},
mounted: function () {
created: function () {
this._checkDynamicValue(this.storeValue);
},
@ -45002,6 +45012,7 @@ BI.extend(BI.DynamicDateCombo, {
Dynamic: 2
});
/***/ }),
/* 569 */
/***/ (function(module, exports) {
@ -46009,7 +46020,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
};
},
mounted: function () {
created: function () {
this._checkDynamicValue(this.storeValue);
},
@ -46094,6 +46105,7 @@ BI.extend(BI.DynamicDateTimeCombo, {
Dynamic: 2
});
/***/ }),
/* 573 */
/***/ (function(module, exports) {
@ -67688,7 +67700,7 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
};
},
mounted: function() {
created: function() {
this._checkMonthStatus(this.selectedYear);
},
@ -75615,11 +75627,11 @@ BI.prepares.push(function () {
BI.Widget._renderEngine.createElement("body").append(canvas);
var ctx = canvas.getContext("2d");
ctx.font = "12px Georgia";
ctx.font = "12px Helvetica Neue,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,微软雅黑,Heiti,黑体,sans-serif";
var w = ctx.measureText(param).width + 4;
canvas.width = w * ratio;
canvas.height = 16 * ratio;
ctx.font = 12 * ratio + "px Georgia";
ctx.font = 12 * ratio + "px Helvetica Neue,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,微软雅黑,Heiti,黑体,sans-serif";
ctx.fillStyle = fillStyle || "#3685f2";
ctx.textBaseline = "middle";
// ctx.fillStyle = "#EAF2FD";
@ -93431,8 +93443,8 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
ref: function (_ref) {
self.trigger = _ref;
},
width: o.width - 2,
height: o.height - 2
width: o.el.type ? o.width : o.width - 2,
height: o.el.type ? o.height : o.height - 2
}, o.el),
popup: {
el: BI.extend({
@ -93683,6 +93695,7 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
};
},
// 这里就实现的不好了,setValue里面有个editor,editor的setValue会检测错误然后出bubble提示
mounted: function () {
var self = this;
var o = this.options;
@ -93757,6 +93770,7 @@ BI.HexColorChooserPopup.EVENT_VALUE_CHANGE = "EVENT_VALUE_CHANGE";
BI.HexColorChooserPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.hex_color_chooser_popup", BI.HexColorChooserPopup);
/***/ }),
/* 876 */
/***/ (function(module, exports) {
@ -93978,6 +93992,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
};
},
// 这里就实现的不好了,setValue里面有个editor,editor的setValue会检测错误然后出bubble提示
mounted: function () {
var self = this;
var o = this.options;
@ -94052,6 +94067,7 @@ BI.ColorChooserPopup.EVENT_VALUE_CHANGE = "EVENT_VALUE_CHANGE";
BI.ColorChooserPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.color_chooser_popup", BI.ColorChooserPopup);
/***/ }),
/* 878 */
/***/ (function(module, exports) {
@ -95598,7 +95614,7 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
};
},
mounted: function () {
created: function () {
var o = this.options;
if (BI.isKey(o.value)) {
this.setValue(o.value);
@ -95697,8 +95713,6 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
// Saturation/Luminance gradient
this.colorWrapper.element.css("backgroundColor", this._pack(this._HSLToRGB([this.hsl[0], 1, 0.5])));
this.fireEvent(BI.Farbtastic.EVENT_CHANGE, this.getValue(), this);
},
_absolutePosition: function (el) {
@ -95775,6 +95789,7 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
var lum = Math.max(0, Math.min(1, -(pos.y / this.constants.SQUARE) + .5));
this._setHSL([this.hsl[0], sat, lum]);
}
this.fireEvent(BI.Farbtastic.EVENT_CHANGE, this.getValue(), this);
},
doClick: function (event) {
@ -95797,6 +95812,7 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
BI.Farbtastic.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.farbtastic", BI.Farbtastic);
/***/ }),
/* 889 */
/***/ (function(module, exports) {

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.ie.min.js.map vendored

File diff suppressed because one or more lines are too long

112
dist/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-3-5 17:10:44 */
/*! time: 2021-3-9 09:50:45 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -13912,6 +13912,22 @@ module.exports = function (exec) {
callLifeHook(this, "created");
},
_initCurrent: function () {
var o = this.options;
if (o._baseCls || o.baseCls || o.extraCls || o.cls) {
this.element.addClass((o._baseCls || "") + " " + (o.baseCls || "") + " " + (o.extraCls || "") + " " + (o.cls || ""));
}
if (o.attributes) {
this.element.attr(o.attributes);
}
if (o.data) {
this.element.data(o.data);
}
if (o.css) {
this.element.css(o.css);
}
},
/**
* 初始化根节点
* @private
@ -13939,18 +13955,7 @@ module.exports = function (exec) {
this.element = BI.Widget._renderEngine.createElement(this);
}
this.element._isWidget = true;
if (o._baseCls || o.baseCls || o.extraCls || o.cls) {
this.element.addClass((o._baseCls || "") + " " + (o.baseCls || "") + " " + (o.extraCls || "") + " " + (o.cls || ""));
}
if (o.attributes) {
this.element.attr(o.attributes);
}
if (o.data) {
this.element.data(o.data);
}
if (o.css) {
this.element.css(o.css);
}
this._initCurrent();
},
_initElementWidth: function () {
@ -14041,10 +14046,10 @@ module.exports = function (exec) {
}
this._mountChildren && this._mountChildren();
if (layer === 0) {
// mounted放到下一个宏任务里执行
setTimeout(function () {
self.__afterMount(lifeHook, predicate);
}, 0);
// mounted里面会执行scrollTo之类的方法,如果放宏任务里会闪
// setTimeout(function () {
self.__afterMount(lifeHook, predicate);
// }, 0);
}
return true;
},
@ -14346,6 +14351,15 @@ module.exports = function (exec) {
this.element.empty();
},
// 默认的populate方法就是干掉重来
populate: function () {
this.purgeListeners();
this.empty();
this._initCurrent();
this._init();
this._initRef();
},
_destroy: function () {
this.__d();
this.element.destroy();
@ -19871,7 +19885,7 @@ BI.shortcut("bi.adaptive", BI.AdaptiveLayout);
BI.BorderLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.BorderLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-border",
baseCls: "bi-border-layout",
items: {}
});
},
@ -22488,10 +22502,6 @@ BI.Single = BI.inherit(BI.Widget, {
this._hoverBinded = false;
},
populate: function (items) {
this.items = items || [];
},
// opt: {container: '', belowMouse: false}
setTitle: function (title, opt) {
this.options.title = title;
@ -23849,6 +23859,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
}
},
// mounted之后绑定事件
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) {
@ -25610,7 +25621,7 @@ BI.Navigation = BI.inherit(BI.Widget, {
});
},
mounted: function () {
created: function () {
var o = this.options;
if (o.showIndex !== false) {
this.setSelect(o.showIndex);
@ -25719,6 +25730,7 @@ BI.Navigation.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.navigation", BI.Navigation);
/***/ }),
/* 413 */
/***/ (function(module, exports) {
@ -26418,7 +26430,7 @@ BI.Tab = BI.inherit(BI.Widget, {
}
},
mounted: function () {
created: function () {
var o = this.options;
if (o.showIndex !== false) {
this.setSelect(o.showIndex);
@ -26494,6 +26506,7 @@ BI.Tab.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.tab", BI.Tab);
/***/ }),
/* 416 */
/***/ (function(module, exports) {
@ -26819,6 +26832,7 @@ BI.GridView = BI.inherit(BI.Widget, {
}
},
// mounted之后绑定事件
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) {
@ -27295,6 +27309,7 @@ BI.Popover = BI.inherit(BI.Widget, {
});
},
// mounted之后绑定事件
mounted: function () {
var self = this; var o = this.options;
this.dragger.element.mousedown(function (e) {
@ -27788,6 +27803,7 @@ BI.ListView = BI.inherit(BI.Widget, {
};
},
// mounted之后绑定事件
mounted: function () {
var self = this, o = this.options;
this._populate();
@ -27921,6 +27937,7 @@ BI.VirtualList = BI.inherit(BI.Widget, {
};
},
// mounted之后绑定事件
mounted: function () {
var self = this, o = this.options;
this._populate();
@ -28776,10 +28793,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
unHighLight: function () {
this.text.unHighLight.apply(this.text, arguments);
},
destroy: function () {
BI.Button.superclass.destroy.apply(this, arguments);
}
});
BI.shortcut("bi.button", BI.Button);
@ -30592,8 +30605,8 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
},
left: 4,
right: 4,
top: 4,
bottom: 4
top: 2,
bottom: 2
}]
});
@ -31918,10 +31931,6 @@ BI.shortcut("bi.radio", BI.Radio);
if (!this.isReadOnly()) {
this.text.setValue(v);
}
},
populate: function () {
BI.AbstractLabel.superclass.populate.apply(this, arguments);
}
});
}());
@ -36207,7 +36216,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
};
},
mounted: function () {
created: function () {
var o = this.options;
if(BI.isKey(o.value)) {
this._checkError(o.value);
@ -36304,6 +36313,7 @@ BI.SearchTextValueComboPopup = BI.inherit(BI.Pane, {
};
},
// mounted之后做check
mounted: function() {
this.check();
},
@ -36330,6 +36340,7 @@ BI.SearchTextValueComboPopup = BI.inherit(BI.Pane, {
BI.SearchTextValueComboPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.search_text_value_combo_popup", BI.SearchTextValueComboPopup);
/***/ }),
/* 507 */
/***/ (function(module, exports) {
@ -42725,7 +42736,7 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
};
},
mounted: function () {
created: function () {
this.setValue(this.options.value);
},
@ -42757,7 +42768,6 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
}
},
setValue: function (v) {
v = v || {};
var type = v.type || BI.DynamicDateCombo.Static;
@ -43454,7 +43464,7 @@ BI.DynamicDateTimePane = BI.inherit(BI.Widget, {
};
},
mounted: function () {
created: function () {
this.setValue(this.options.value);
},
@ -44917,7 +44927,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
};
},
mounted: function () {
created: function () {
this._checkDynamicValue(this.storeValue);
},
@ -45002,6 +45012,7 @@ BI.extend(BI.DynamicDateCombo, {
Dynamic: 2
});
/***/ }),
/* 569 */
/***/ (function(module, exports) {
@ -46009,7 +46020,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
};
},
mounted: function () {
created: function () {
this._checkDynamicValue(this.storeValue);
},
@ -46094,6 +46105,7 @@ BI.extend(BI.DynamicDateTimeCombo, {
Dynamic: 2
});
/***/ }),
/* 573 */
/***/ (function(module, exports) {
@ -67688,7 +67700,7 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
};
},
mounted: function() {
created: function() {
this._checkMonthStatus(this.selectedYear);
},
@ -75615,11 +75627,11 @@ BI.prepares.push(function () {
BI.Widget._renderEngine.createElement("body").append(canvas);
var ctx = canvas.getContext("2d");
ctx.font = "12px Georgia";
ctx.font = "12px Helvetica Neue,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,微软雅黑,Heiti,黑体,sans-serif";
var w = ctx.measureText(param).width + 4;
canvas.width = w * ratio;
canvas.height = 16 * ratio;
ctx.font = 12 * ratio + "px Georgia";
ctx.font = 12 * ratio + "px Helvetica Neue,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,微软雅黑,Heiti,黑体,sans-serif";
ctx.fillStyle = fillStyle || "#3685f2";
ctx.textBaseline = "middle";
// ctx.fillStyle = "#EAF2FD";
@ -93431,8 +93443,8 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
ref: function (_ref) {
self.trigger = _ref;
},
width: o.width - 2,
height: o.height - 2
width: o.el.type ? o.width : o.width - 2,
height: o.el.type ? o.height : o.height - 2
}, o.el),
popup: {
el: BI.extend({
@ -93683,6 +93695,7 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
};
},
// 这里就实现的不好了,setValue里面有个editor,editor的setValue会检测错误然后出bubble提示
mounted: function () {
var self = this;
var o = this.options;
@ -93757,6 +93770,7 @@ BI.HexColorChooserPopup.EVENT_VALUE_CHANGE = "EVENT_VALUE_CHANGE";
BI.HexColorChooserPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.hex_color_chooser_popup", BI.HexColorChooserPopup);
/***/ }),
/* 876 */
/***/ (function(module, exports) {
@ -93978,6 +93992,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
};
},
// 这里就实现的不好了,setValue里面有个editor,editor的setValue会检测错误然后出bubble提示
mounted: function () {
var self = this;
var o = this.options;
@ -94052,6 +94067,7 @@ BI.ColorChooserPopup.EVENT_VALUE_CHANGE = "EVENT_VALUE_CHANGE";
BI.ColorChooserPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.color_chooser_popup", BI.ColorChooserPopup);
/***/ }),
/* 878 */
/***/ (function(module, exports) {
@ -95598,7 +95614,7 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
};
},
mounted: function () {
created: function () {
var o = this.options;
if (BI.isKey(o.value)) {
this.setValue(o.value);
@ -95697,8 +95713,6 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
// Saturation/Luminance gradient
this.colorWrapper.element.css("backgroundColor", this._pack(this._HSLToRGB([this.hsl[0], 1, 0.5])));
this.fireEvent(BI.Farbtastic.EVENT_CHANGE, this.getValue(), this);
},
_absolutePosition: function (el) {
@ -95775,6 +95789,7 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
var lum = Math.max(0, Math.min(1, -(pos.y / this.constants.SQUARE) + .5));
this._setHSL([this.hsl[0], sat, lum]);
}
this.fireEvent(BI.Farbtastic.EVENT_CHANGE, this.getValue(), this);
},
doClick: function (event) {
@ -95797,6 +95812,7 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
BI.Farbtastic.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.farbtastic", BI.Farbtastic);
/***/ }),
/* 889 */
/***/ (function(module, exports) {

2
dist/fineui.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

94
dist/fineui_without_jquery_polyfill.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-3-5 17:10:44 */
/*! time: 2021-3-9 09:50:45 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -9934,6 +9934,22 @@ BI.Req = {
callLifeHook(this, "created");
},
_initCurrent: function () {
var o = this.options;
if (o._baseCls || o.baseCls || o.extraCls || o.cls) {
this.element.addClass((o._baseCls || "") + " " + (o.baseCls || "") + " " + (o.extraCls || "") + " " + (o.cls || ""));
}
if (o.attributes) {
this.element.attr(o.attributes);
}
if (o.data) {
this.element.data(o.data);
}
if (o.css) {
this.element.css(o.css);
}
},
/**
* 初始化根节点
* @private
@ -9961,18 +9977,7 @@ BI.Req = {
this.element = BI.Widget._renderEngine.createElement(this);
}
this.element._isWidget = true;
if (o._baseCls || o.baseCls || o.extraCls || o.cls) {
this.element.addClass((o._baseCls || "") + " " + (o.baseCls || "") + " " + (o.extraCls || "") + " " + (o.cls || ""));
}
if (o.attributes) {
this.element.attr(o.attributes);
}
if (o.data) {
this.element.data(o.data);
}
if (o.css) {
this.element.css(o.css);
}
this._initCurrent();
},
_initElementWidth: function () {
@ -10063,10 +10068,10 @@ BI.Req = {
}
this._mountChildren && this._mountChildren();
if (layer === 0) {
// mounted放到下一个宏任务里执行
setTimeout(function () {
self.__afterMount(lifeHook, predicate);
}, 0);
// mounted里面会执行scrollTo之类的方法,如果放宏任务里会闪
// setTimeout(function () {
self.__afterMount(lifeHook, predicate);
// }, 0);
}
return true;
},
@ -10368,6 +10373,15 @@ BI.Req = {
this.element.empty();
},
// 默认的populate方法就是干掉重来
populate: function () {
this.purgeListeners();
this.empty();
this._initCurrent();
this._init();
this._initRef();
},
_destroy: function () {
this.__d();
this.element.destroy();
@ -15893,7 +15907,7 @@ BI.shortcut("bi.adaptive", BI.AdaptiveLayout);
BI.BorderLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.BorderLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-border",
baseCls: "bi-border-layout",
items: {}
});
},
@ -18510,10 +18524,6 @@ BI.Single = BI.inherit(BI.Widget, {
this._hoverBinded = false;
},
populate: function (items) {
this.items = items || [];
},
// opt: {container: '', belowMouse: false}
setTitle: function (title, opt) {
this.options.title = title;
@ -19871,6 +19881,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
}
},
// mounted之后绑定事件
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) {
@ -21632,7 +21643,7 @@ BI.Navigation = BI.inherit(BI.Widget, {
});
},
mounted: function () {
created: function () {
var o = this.options;
if (o.showIndex !== false) {
this.setSelect(o.showIndex);
@ -21741,6 +21752,7 @@ BI.Navigation.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.navigation", BI.Navigation);
/***/ }),
/* 413 */
/***/ (function(module, exports) {
@ -22440,7 +22452,7 @@ BI.Tab = BI.inherit(BI.Widget, {
}
},
mounted: function () {
created: function () {
var o = this.options;
if (o.showIndex !== false) {
this.setSelect(o.showIndex);
@ -22516,6 +22528,7 @@ BI.Tab.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.tab", BI.Tab);
/***/ }),
/* 416 */
/***/ (function(module, exports) {
@ -22841,6 +22854,7 @@ BI.GridView = BI.inherit(BI.Widget, {
}
},
// mounted之后绑定事件
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) {
@ -23317,6 +23331,7 @@ BI.Popover = BI.inherit(BI.Widget, {
});
},
// mounted之后绑定事件
mounted: function () {
var self = this; var o = this.options;
this.dragger.element.mousedown(function (e) {
@ -23810,6 +23825,7 @@ BI.ListView = BI.inherit(BI.Widget, {
};
},
// mounted之后绑定事件
mounted: function () {
var self = this, o = this.options;
this._populate();
@ -23943,6 +23959,7 @@ BI.VirtualList = BI.inherit(BI.Widget, {
};
},
// mounted之后绑定事件
mounted: function () {
var self = this, o = this.options;
this._populate();
@ -24798,10 +24815,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
unHighLight: function () {
this.text.unHighLight.apply(this.text, arguments);
},
destroy: function () {
BI.Button.superclass.destroy.apply(this, arguments);
}
});
BI.shortcut("bi.button", BI.Button);
@ -26614,8 +26627,8 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
},
left: 4,
right: 4,
top: 4,
bottom: 4
top: 2,
bottom: 2
}]
});
@ -27940,10 +27953,6 @@ BI.shortcut("bi.radio", BI.Radio);
if (!this.isReadOnly()) {
this.text.setValue(v);
}
},
populate: function () {
BI.AbstractLabel.superclass.populate.apply(this, arguments);
}
});
}());
@ -32229,7 +32238,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
};
},
mounted: function () {
created: function () {
var o = this.options;
if(BI.isKey(o.value)) {
this._checkError(o.value);
@ -32326,6 +32335,7 @@ BI.SearchTextValueComboPopup = BI.inherit(BI.Pane, {
};
},
// mounted之后做check
mounted: function() {
this.check();
},
@ -32352,6 +32362,7 @@ BI.SearchTextValueComboPopup = BI.inherit(BI.Pane, {
BI.SearchTextValueComboPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.search_text_value_combo_popup", BI.SearchTextValueComboPopup);
/***/ }),
/* 507 */
/***/ (function(module, exports) {
@ -38747,7 +38758,7 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
};
},
mounted: function () {
created: function () {
this.setValue(this.options.value);
},
@ -38779,7 +38790,6 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
}
},
setValue: function (v) {
v = v || {};
var type = v.type || BI.DynamicDateCombo.Static;
@ -39476,7 +39486,7 @@ BI.DynamicDateTimePane = BI.inherit(BI.Widget, {
};
},
mounted: function () {
created: function () {
this.setValue(this.options.value);
},
@ -40939,7 +40949,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
};
},
mounted: function () {
created: function () {
this._checkDynamicValue(this.storeValue);
},
@ -41024,6 +41034,7 @@ BI.extend(BI.DynamicDateCombo, {
Dynamic: 2
});
/***/ }),
/* 569 */
/***/ (function(module, exports) {
@ -42031,7 +42042,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
};
},
mounted: function () {
created: function () {
this._checkDynamicValue(this.storeValue);
},
@ -42116,6 +42127,7 @@ BI.extend(BI.DynamicDateTimeCombo, {
Dynamic: 2
});
/***/ }),
/* 573 */
/***/ (function(module, exports) {
@ -63710,7 +63722,7 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
};
},
mounted: function() {
created: function() {
this._checkMonthStatus(this.selectedYear);
},

2
dist/fineui_without_jquery_polyfill.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/font.css vendored

File diff suppressed because one or more lines are too long

BIN
dist/font/iconfont.eot vendored

Binary file not shown.

BIN
dist/font/iconfont.ttf vendored

Binary file not shown.

BIN
dist/font/iconfont.woff vendored

Binary file not shown.

BIN
dist/font/iconfont.woff2 vendored

Binary file not shown.

2
dist/lib/index.d.ts vendored

@ -309,7 +309,7 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
TextValueCheckComboPopup: typeof TextValueCheckComboPopup;
ImageButton: typeof ImageButton;
Router: typeof Router;
History: History;
history: History;
}
declare const _default: {
Decorators: typeof decorator;

2
dist/lib/router/router.d.ts vendored

@ -15,7 +15,7 @@ export declare class History {
getHash(window?: Window): string;
getPath(): string;
getFragment(fragment?: string): string;
start(op: {
start(op?: {
[key: string]: any;
}): void;
stop(): void;

2
dist/resource.css vendored

File diff suppressed because one or more lines are too long

2
dist/utils.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-3-5 17:10:44 */
/*! time: 2021-3-9 09:50:45 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

2
demo.worker.js → examples/demo.worker.js

@ -1,5 +1,5 @@
if (this.importScripts) {
importScripts("./dist/fineui_without_jquery_polyfill.js");
importScripts("../dist/fineui_without_jquery_polyfill.js");
BI.initWorker();
}
var Model = BI.inherit(Fix.Model, {

15
dev.html → examples/dev.html

@ -2,7 +2,8 @@
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="http://fanruan.design/fineui/2.0/fineui.min.css"/>
<link rel="stylesheet" type="text/css" href="../dist/2.0/fineui.css"/>
<!-- <script src="../dist/2.0/fineui.js"></script>-->
<script src="http://localhost:9001/fineui.js"></script>
</head>
<body>
@ -37,9 +38,6 @@
BI.model("demo.child_model", ChildModel);
var Child = BI.inherit(BI.Widget, {
props: {
updateMode: "auto"
},
setup: function () {
var store = BI.useStore(function () {
return BI.Models.getModel("demo.child_model");
@ -67,18 +65,25 @@
updateMode: "auto"
},
setup: function () {
var child;
var store = BI.useStore(function () {
return BI.Models.getModel("demo.model");
});
setInterval(function () {
store.toggle();
}, 1000);
BI.watch("text", function () {
child.populate();
});
return function () {
return {
type: "bi.vertical",
vgap: 20,
items: [{
type: "demo.child"
type: "demo.child",
ref: function (_ref) {
child = _ref;
}
}, {
type: "demo.child"
}]

4
hooks.html → examples/hooks.html

@ -2,8 +2,8 @@
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="http://fanruan.design/fineui/2.0/fineui.min.css"/>
<script src="./dist/fineui.js"></script>
<link rel="stylesheet" type="text/css" href="../dist/2.0/fineui.css"/>
<script src="../dist/2.0/fineui.js"></script>
</head>
<body>
<div id="wrapper"></div>

8
worker.html → examples/worker.html

@ -2,11 +2,9 @@
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="http://fanruan.design/fineui/2.0/fineui.min.css"/>
<!-- 下面是不包含normalize.css的css -->
<!-- <link rel="stylesheet" type="text/css" href="http://fanruan.design/fineui/2.0/fineui_without_normalize.min.css" /> -->
<script src="./dist/fineui.js"></script>
<script src="./dist/fix/worker.compact.js"></script>
<link rel="stylesheet" type="text/css" href="../dist/2.0/fineui.css"/>
<script src="../dist/2.0/fineui.js"></script>
<script src="../dist/fix/worker.compact.js"></script>
<script src="demo.worker.js"></script>
</head>
<body>

2
package.json

@ -1,6 +1,6 @@
{
"name": "fineui",
"version": "2.0.20210305171213",
"version": "2.0.20210309095217",
"description": "fineui",
"main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts",

1
src/base/collection/collection.js

@ -61,6 +61,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
}
},
// mounted之后绑定事件
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) {

4
src/base/combination/navigation.js

@ -52,7 +52,7 @@ BI.Navigation = BI.inherit(BI.Widget, {
});
},
mounted: function () {
created: function () {
var o = this.options;
if (o.showIndex !== false) {
this.setSelect(o.showIndex);
@ -159,4 +159,4 @@ BI.Navigation = BI.inherit(BI.Widget, {
});
BI.Navigation.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.navigation", BI.Navigation);
BI.shortcut("bi.navigation", BI.Navigation);

4
src/base/combination/tab.js

@ -76,7 +76,7 @@ BI.Tab = BI.inherit(BI.Widget, {
}
},
mounted: function () {
created: function () {
var o = this.options;
if (o.showIndex !== false) {
this.setSelect(o.showIndex);
@ -150,4 +150,4 @@ BI.Tab = BI.inherit(BI.Widget, {
});
BI.Tab.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.tab", BI.Tab);
BI.shortcut("bi.tab", BI.Tab);

1
src/base/grid/grid.js

@ -63,6 +63,7 @@ BI.GridView = BI.inherit(BI.Widget, {
}
},
// mounted之后绑定事件
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) {

1
src/base/layer/layer.popover.js

@ -152,6 +152,7 @@ BI.Popover = BI.inherit(BI.Widget, {
});
},
// mounted之后绑定事件
mounted: function () {
var self = this; var o = this.options;
this.dragger.element.mousedown(function (e) {

1
src/base/list/listview.js

@ -38,6 +38,7 @@ BI.ListView = BI.inherit(BI.Widget, {
};
},
// mounted之后绑定事件
mounted: function () {
var self = this, o = this.options;
this._populate();

1
src/base/list/virtuallist.js

@ -47,6 +47,7 @@ BI.VirtualList = BI.inherit(BI.Widget, {
};
},
// mounted之后绑定事件
mounted: function () {
var self = this, o = this.options;
this._populate();

4
src/base/single/button/buttons/button.js

@ -145,10 +145,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
unHighLight: function () {
this.text.unHighLight.apply(this.text, arguments);
},
destroy: function () {
BI.Button.superclass.destroy.apply(this, arguments);
}
});
BI.shortcut("bi.button", BI.Button);

4
src/base/single/editor/editor.textarea.js

@ -39,8 +39,8 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
},
left: 4,
right: 4,
top: 4,
bottom: 4
top: 2,
bottom: 2
}]
});

4
src/base/single/label/abstract.label.js

@ -381,10 +381,6 @@
if (!this.isReadOnly()) {
this.text.setValue(v);
}
},
populate: function () {
BI.AbstractLabel.superclass.populate.apply(this, arguments);
}
});
}());

4
src/base/single/single.js

@ -138,10 +138,6 @@ BI.Single = BI.inherit(BI.Widget, {
this._hoverBinded = false;
},
populate: function (items) {
this.items = items || [];
},
// opt: {container: '', belowMouse: false}
setTitle: function (title, opt) {
this.options.title = title;

4
src/case/colorchooser/colorchooser.js

@ -32,8 +32,8 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
ref: function (_ref) {
self.trigger = _ref;
},
width: o.width - 2,
height: o.height - 2
width: o.el.type ? o.width : o.width - 2,
height: o.el.type ? o.height : o.height - 2
}, o.el),
popup: {
el: BI.extend({

3
src/case/colorchooser/colorchooser.popup.hex.js

@ -177,6 +177,7 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
};
},
// 这里就实现的不好了,setValue里面有个editor,editor的setValue会检测错误然后出bubble提示
mounted: function () {
var self = this;
var o = this.options;
@ -249,4 +250,4 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
});
BI.HexColorChooserPopup.EVENT_VALUE_CHANGE = "EVENT_VALUE_CHANGE";
BI.HexColorChooserPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.hex_color_chooser_popup", BI.HexColorChooserPopup);
BI.shortcut("bi.hex_color_chooser_popup", BI.HexColorChooserPopup);

3
src/case/colorchooser/colorchooser.popup.js

@ -161,6 +161,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
};
},
// 这里就实现的不好了,setValue里面有个editor,editor的setValue会检测错误然后出bubble提示
mounted: function () {
var self = this;
var o = this.options;
@ -233,4 +234,4 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
});
BI.ColorChooserPopup.EVENT_VALUE_CHANGE = "EVENT_VALUE_CHANGE";
BI.ColorChooserPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.color_chooser_popup", BI.ColorChooserPopup);
BI.shortcut("bi.color_chooser_popup", BI.ColorChooserPopup);

7
src/case/colorchooser/farbtastic/farbtastic.js

@ -80,7 +80,7 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
};
},
mounted: function () {
created: function () {
var o = this.options;
if (BI.isKey(o.value)) {
this.setValue(o.value);
@ -179,8 +179,6 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
// Saturation/Luminance gradient
this.colorWrapper.element.css("backgroundColor", this._pack(this._HSLToRGB([this.hsl[0], 1, 0.5])));
this.fireEvent(BI.Farbtastic.EVENT_CHANGE, this.getValue(), this);
},
_absolutePosition: function (el) {
@ -257,6 +255,7 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
var lum = Math.max(0, Math.min(1, -(pos.y / this.constants.SQUARE) + .5));
this._setHSL([this.hsl[0], sat, lum]);
}
this.fireEvent(BI.Farbtastic.EVENT_CHANGE, this.getValue(), this);
},
doClick: function (event) {
@ -277,4 +276,4 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
}
});
BI.Farbtastic.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.farbtastic", BI.Farbtastic);
BI.shortcut("bi.farbtastic", BI.Farbtastic);

2
src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js

@ -115,7 +115,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
};
},
mounted: function () {
created: function () {
var o = this.options;
if(BI.isKey(o.value)) {
this._checkError(o.value);

3
src/case/combo/searchtextvaluecombo/popup.searchtextvalue.js

@ -45,6 +45,7 @@ BI.SearchTextValueComboPopup = BI.inherit(BI.Pane, {
};
},
// mounted之后做check
mounted: function() {
this.check();
},
@ -69,4 +70,4 @@ BI.SearchTextValueComboPopup = BI.inherit(BI.Pane, {
});
BI.SearchTextValueComboPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.search_text_value_combo_popup", BI.SearchTextValueComboPopup);
BI.shortcut("bi.search_text_value_combo_popup", BI.SearchTextValueComboPopup);

4
src/core/platform/web/dom.js

@ -127,11 +127,11 @@
BI.Widget._renderEngine.createElement("body").append(canvas);
var ctx = canvas.getContext("2d");
ctx.font = "12px Georgia";
ctx.font = "12px Helvetica Neue,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,微软雅黑,Heiti,黑体,sans-serif";
var w = ctx.measureText(param).width + 4;
canvas.width = w * ratio;
canvas.height = 16 * ratio;
ctx.font = 12 * ratio + "px Georgia";
ctx.font = 12 * ratio + "px Helvetica Neue,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,微软雅黑,Heiti,黑体,sans-serif";
ctx.fillStyle = fillStyle || "#3685f2";
ctx.textBaseline = "middle";
// ctx.fillStyle = "#EAF2FD";

46
src/core/widget.js

@ -125,6 +125,22 @@
callLifeHook(this, "created");
},
_initCurrent: function () {
var o = this.options;
if (o._baseCls || o.baseCls || o.extraCls || o.cls) {
this.element.addClass((o._baseCls || "") + " " + (o.baseCls || "") + " " + (o.extraCls || "") + " " + (o.cls || ""));
}
if (o.attributes) {
this.element.attr(o.attributes);
}
if (o.data) {
this.element.data(o.data);
}
if (o.css) {
this.element.css(o.css);
}
},
/**
* 初始化根节点
* @private
@ -152,18 +168,7 @@
this.element = BI.Widget._renderEngine.createElement(this);
}
this.element._isWidget = true;
if (o._baseCls || o.baseCls || o.extraCls || o.cls) {
this.element.addClass((o._baseCls || "") + " " + (o.baseCls || "") + " " + (o.extraCls || "") + " " + (o.cls || ""));
}
if (o.attributes) {
this.element.attr(o.attributes);
}
if (o.data) {
this.element.data(o.data);
}
if (o.css) {
this.element.css(o.css);
}
this._initCurrent();
},
_initElementWidth: function () {
@ -254,10 +259,10 @@
}
this._mountChildren && this._mountChildren();
if (layer === 0) {
// mounted放到下一个宏任务里执行
setTimeout(function () {
self.__afterMount(lifeHook, predicate);
}, 0);
// mounted里面会执行scrollTo之类的方法,如果放宏任务里会闪
// setTimeout(function () {
self.__afterMount(lifeHook, predicate);
// }, 0);
}
return true;
},
@ -559,6 +564,15 @@
this.element.empty();
},
// 默认的populate方法就是干掉重来
populate: function () {
this.purgeListeners();
this.empty();
this._initCurrent();
this._init();
this._initRef();
},
_destroy: function () {
this.__d();
this.element.destroy();

2
src/core/wrapper/layout/layout.border.js

@ -7,7 +7,7 @@
BI.BorderLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.BorderLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-border",
baseCls: "bi-border-layout",
items: {}
});
},

3
src/widget/datepane/datepane.js

@ -109,7 +109,7 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
};
},
mounted: function () {
created: function () {
this.setValue(this.options.value);
},
@ -141,7 +141,6 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
}
},
setValue: function (v) {
v = v || {};
var type = v.type || BI.DynamicDateCombo.Static;

2
src/widget/datetimepane/datetimepane.js

@ -109,7 +109,7 @@ BI.DynamicDateTimePane = BI.inherit(BI.Widget, {
};
},
mounted: function () {
created: function () {
this.setValue(this.options.value);
},

4
src/widget/dynamicdate/dynamicdate.combo.js

@ -238,7 +238,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
};
},
mounted: function () {
created: function () {
this._checkDynamicValue(this.storeValue);
},
@ -321,4 +321,4 @@ BI.shortcut("bi.dynamic_date_combo", BI.DynamicDateCombo);
BI.extend(BI.DynamicDateCombo, {
Static: 1,
Dynamic: 2
});
});

4
src/widget/dynamicdatetime/dynamicdatetime.combo.js

@ -246,7 +246,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
};
},
mounted: function () {
created: function () {
this._checkDynamicValue(this.storeValue);
},
@ -329,4 +329,4 @@ BI.shortcut("bi.dynamic_date_time_combo", BI.DynamicDateTimeCombo);
BI.extend(BI.DynamicDateTimeCombo, {
Static: 1,
Dynamic: 2
});
});

2
src/widget/yearmonth/card.static.yearmonth.js

@ -98,7 +98,7 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
};
},
mounted: function() {
created: function() {
this._checkMonthStatus(this.selectedYear);
},

2
typescript/router/router.ts

@ -20,7 +20,7 @@ export declare class History {
getFragment(fragment?: string): string;
start(op: {[key: string]: any}): void;
start(op?: {[key: string]: any}): void;
stop(): void;

Loading…
Cancel
Save