Browse Source

Merge branch 'master' of ssh://cloud.finedevelop.com:7999/~kira/fineui

master
Kira 3 years ago
parent
commit
4be0dd52c6
  1. 3
      changelog.md
  2. 2
      dist/2.0/fineui.css
  3. 4
      dist/2.0/fineui.ie.min.js
  4. 6
      dist/2.0/fineui.ie.min.js.LICENSE.txt
  5. 2
      dist/2.0/fineui.ie.min.js.map
  6. 6802
      dist/2.0/fineui.js
  7. 2
      dist/2.0/fineui.js.map
  8. 2
      dist/2.0/fineui.min.css
  9. 4
      dist/2.0/fineui.min.js
  10. 6
      dist/2.0/fineui.min.js.LICENSE.txt
  11. 2
      dist/2.0/fineui.min.js.map
  12. 2
      dist/2.0/fineui_without_normalize.css
  13. 2
      dist/2.0/fineui_without_normalize.min.css
  14. 2
      dist/core.css
  15. 6772
      dist/core.js
  16. 2
      dist/core.js.map
  17. 2
      dist/demo.css
  18. 7848
      dist/demo.js
  19. 2
      dist/demo.js.map
  20. 2
      dist/fineui.css
  21. 4
      dist/fineui.ie.min.js
  22. 6
      dist/fineui.ie.min.js.LICENSE.txt
  23. 2
      dist/fineui.ie.min.js.map
  24. 6796
      dist/fineui.js
  25. 2
      dist/fineui.js.map
  26. 2
      dist/fineui.min.css
  27. 4
      dist/fineui.min.js
  28. 6
      dist/fineui.min.js.LICENSE.txt
  29. 2
      dist/fineui.min.js.map
  30. 2
      dist/fineui.proxy.css
  31. 6082
      dist/fineui.proxy.js
  32. 2
      dist/fineui.proxy.js.map
  33. 2
      dist/fineui.proxy.min.css
  34. 4
      dist/fineui.proxy.min.js
  35. 6
      dist/fineui.proxy.min.js.LICENSE.txt
  36. 2
      dist/fineui.proxy.min.js.map
  37. 2831
      dist/fineui_without_jquery_polyfill.js
  38. 2
      dist/fineui_without_jquery_polyfill.js.map
  39. 71
      dist/fix/fix.compact.ie.js
  40. 71
      dist/fix/fix.compact.js
  41. 2
      dist/font.css
  42. BIN
      dist/font/iconfont.eot
  43. 21
      dist/font/iconfont.svg
  44. BIN
      dist/font/iconfont.ttf
  45. BIN
      dist/font/iconfont.woff
  46. BIN
      dist/font/iconfont.woff2
  47. 3
      dist/lib/base/a/a.d.ts
  48. 12
      dist/lib/core/func/function.d.ts
  49. 10
      dist/lib/shims-tsx.d.ts
  50. 2
      dist/resource.css
  51. 0
      dist/router.js
  52. 14
      dist/utils.js
  53. 2
      dist/utils.js.map
  54. 4
      dist/utils.min.js
  55. 2
      dist/utils.min.js.map
  56. 20
      examples/dev.html
  57. 2
      package.json
  58. 78
      src/core/4.widget.js
  59. 1052
      src/core/8.snabdom.js
  60. 49
      src/core/element2Snabbdom.js
  61. 18
      src/widget/dynamicdate/dynamicdate.trigger.js
  62. 18
      src/widget/dynamicdatetime/dynamicdatetime.trigger.js
  63. 13
      src/widget/year/trigger.year.js
  64. 16
      src/widget/yearmonth/trigger.yearmonth.js
  65. 17
      src/widget/yearquarter/trigger.yearquarter.js
  66. 3
      typescript/base/a/a.ts
  67. 10
      typescript/shims-tsx.ts

3
changelog.md

@ -1,5 +1,7 @@
# 更新日志
2.0(2021-07)
- 优化了日期类型控件标红时的报错提示
- 支持虚拟dom
- 修复了树控件节点未初始化时调用树的getValue始终为空的问题
2.0(2021-05)
@ -13,7 +15,6 @@
- 时间类型控件优化动态时间面板的交互
2.0(2021-02)
- 增加updateModel属性,可以配置自动模式,自动watch属性并响应变化
- 增加beforeRender生命周期函数
2.0(2021-01)

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

6
dist/2.0/fineui.ie.min.js.LICENSE.txt vendored

@ -1,9 +1,3 @@
/*!
* vue-router v3.5.2
* (c) 2021 Evan You
* @license MIT
*/
/*!
* Sizzle CSS Selector Engine v2.2.1
* http://sizzlejs.com/

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

File diff suppressed because one or more lines are too long

6802
dist/2.0/fineui.js vendored

File diff suppressed because it is too large Load Diff

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

6
dist/2.0/fineui.min.js.LICENSE.txt vendored

@ -1,9 +1,3 @@
/*!
* vue-router v3.5.2
* (c) 2021 Evan You
* @license MIT
*/
/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)

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

6772
dist/core.js vendored

File diff suppressed because it is too large Load Diff

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

7848
dist/demo.js vendored

File diff suppressed because one or more lines are too long

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

6
dist/fineui.ie.min.js.LICENSE.txt vendored

@ -1,9 +1,3 @@
/*!
* vue-router v3.5.2
* (c) 2021 Evan You
* @license MIT
*/
/*!
* Sizzle CSS Selector Engine v2.2.1
* http://sizzlejs.com/

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

File diff suppressed because one or more lines are too long

6796
dist/fineui.js vendored

File diff suppressed because it is too large Load Diff

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

6
dist/fineui.min.js.LICENSE.txt vendored

@ -1,9 +1,3 @@
/*!
* vue-router v3.5.2
* (c) 2021 Evan You
* @license MIT
*/
/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)

2
dist/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.proxy.css vendored

File diff suppressed because one or more lines are too long

6082
dist/fineui.proxy.js vendored

File diff suppressed because it is too large Load Diff

2
dist/fineui.proxy.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.proxy.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.proxy.min.js vendored

File diff suppressed because one or more lines are too long

6
dist/fineui.proxy.min.js.LICENSE.txt vendored

@ -1,9 +1,3 @@
/*!
* vue-router v3.5.2
* (c) 2021 Evan You
* @license MIT
*/
/*!
* Sizzle CSS Selector Engine v2.2.1
* http://sizzlejs.com/

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

File diff suppressed because one or more lines are too long

2831
dist/fineui_without_jquery_polyfill.js vendored

File diff suppressed because it is too large Load Diff

2
dist/fineui_without_jquery_polyfill.js.map vendored

File diff suppressed because one or more lines are too long

71
dist/fix/fix.compact.ie.js vendored

@ -163,77 +163,6 @@
needPop && popTarget();
};
// BI.Widget.prototype._initElement = function () {
// var self = this;
// var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
// var els;
// if (this.options.updateMode === "auto" && this._store) {
// // 自动更新模式
// var childComponents = {};
// var rendered = false;
// this._watchers.push(Fix.watch(this.model, function () {
// if (rendered) {
// var newEls = render && render.call(this);
// BI.each(childComponents, function (i, childComponent) {
// if (childComponent.component instanceof BI.Layout) {
// return; // 布局的过滤掉
// }
// var nextProps = BI.get([newEls], childComponent.path);
// if (nextProps) {
// var shouldUpdate = childComponent.component.shouldUpdate && childComponent.component.shouldUpdate(nextProps);
// childComponent.component._update(nextProps, shouldUpdate);
// childComponent.props = BI.extend(childComponent.props, nextProps);
// }
// });
// } else {
// els = render && render.call(this);
//
// function traverse (parent, path) {
// BI.each(parent, function (i, child) {
// var childPath = path.concat(i);
// if (BI.isArray(child)) {
// traverse(child, childPath);
// } else if (BI.isPlainObject(child)) {
// if (child.type) {
// child.__ref = function (_ref) {
// if (_ref) {
// var comp = childComponents[this.getName()] = {};
// comp.component = _ref;
// comp.props = child;
// comp.path = childPath;
// } else {
// delete childComponents[this.getName()];
// }
// };
// }
// traverse(child, childPath);
// }
// });
// }
//
// traverse([els], []);
// rendered = true;
// }
// }));
// } else {
// els = render && render.call(this);
// }
// if (BI.isPlainObject(els)) {
// els = [els];
// }
// if (BI.isArray(els)) {
// BI.each(els, function (i, el) {
// if (el) {
// BI._lazyCreateWidget(el, {
// element: self
// });
// }
// });
// }
// // if (this._isRoot === true || !(this instanceof BI.Layout)) {
// this._mount();
// };
var unMount = BI.Widget.prototype.__d;
BI.Widget.prototype.__d = function () {
unMount.apply(this, arguments);

71
dist/fix/fix.compact.js vendored

@ -163,77 +163,6 @@
needPop && popTarget();
};
// BI.Widget.prototype._initElement = function () {
// var self = this;
// var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
// var els;
// if (this.options.updateMode === "auto" && this._store) {
// // 自动更新模式
// var childComponents = {};
// var rendered = false;
// this._watchers.push(Fix.watch(this.model, function () {
// if (rendered) {
// var newEls = render && render.call(this);
// BI.each(childComponents, function (i, childComponent) {
// if (childComponent.component instanceof BI.Layout) {
// return; // 布局的过滤掉
// }
// var nextProps = BI.get([newEls], childComponent.path);
// if (nextProps) {
// var shouldUpdate = childComponent.component.shouldUpdate && childComponent.component.shouldUpdate(nextProps);
// childComponent.component._update(nextProps, shouldUpdate);
// childComponent.props = BI.extend(childComponent.props, nextProps);
// }
// });
// } else {
// els = render && render.call(this);
//
// function traverse (parent, path) {
// BI.each(parent, function (i, child) {
// var childPath = path.concat(i);
// if (BI.isArray(child)) {
// traverse(child, childPath);
// } else if (BI.isPlainObject(child)) {
// if (child.type) {
// child.__ref = function (_ref) {
// if (_ref) {
// var comp = childComponents[this.getName()] = {};
// comp.component = _ref;
// comp.props = child;
// comp.path = childPath;
// } else {
// delete childComponents[this.getName()];
// }
// };
// }
// traverse(child, childPath);
// }
// });
// }
//
// traverse([els], []);
// rendered = true;
// }
// }));
// } else {
// els = render && render.call(this);
// }
// if (BI.isPlainObject(els)) {
// els = [els];
// }
// if (BI.isArray(els)) {
// BI.each(els, function (i, el) {
// if (el) {
// BI._lazyCreateWidget(el, {
// element: self
// });
// }
// });
// }
// // if (this._isRoot === true || !(this instanceof BI.Layout)) {
// this._mount();
// };
var unMount = BI.Widget.prototype.__d;
BI.Widget.prototype.__d = function () {
try {

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.

21
dist/font/iconfont.svg vendored

@ -20,6 +20,27 @@ Created by iconfont
/>
<missing-glyph />
<glyph glyph-name="etlzuoye" unicode="&#59483;" d="M768 192H633.6V448h44.8v-204.8H768v-51.2z m-224 0h-44.8V396.8H422.4V448h185.6v-44.8h-64V192zM256 192V448h134.4v-44.8H300.8v-44.8h89.6v-44.8H300.8v-64h89.6v-44.8L256 192zM902.4-64h-768c-38.4 0-64 19.2-64 57.6V774.4c0 25.6 25.6 57.6 64 57.6h550.4c19.2 0 38.4-6.4 44.8-19.2l211.2-198.4c12.8-6.4 19.2-19.2 19.2-32v-595.2c6.4-32-25.6-51.2-57.6-51.2zM134.4 774.4v-780.8H896V582.4l-211.2 192H134.4zM896 569.6h-192c-38.4 0-64 25.6-64 57.6V787.2c0 19.2 12.8 25.6 32 25.6s32-6.4 32-25.6v-166.4h192c19.2 0 32-12.8 32-25.6 0-19.2-19.2-25.6-32-25.6z" horiz-adv-x="1024" />
<glyph glyph-name="lixiantongbu-01" unicode="&#59484;" d="M512 774.4c140.8 0 268.8-76.8 332.8-198.4l-57.6-51.2L960 448c-38.4 249.6-268.8 416-518.4 377.6C249.6 800 96 646.4 64 448h64c25.6 192 192 326.4 384 326.4z m0-780.8c-140.8 0-268.8 76.8-332.8 198.4l57.6 51.2L64 320c38.4-249.6 268.8-416 518.4-377.6 198.4 32 352 185.6 377.6 377.6h-64c-25.6-192-192-326.4-384-326.4zM608 192c-12.8 0-19.2 6.4-25.6 12.8l-192 320c-12.8 19.2-6.4 38.4 6.4 44.8 19.2 12.8 38.4 6.4 44.8-6.4l192-320c6.4-12.8 6.4-32-12.8-44.8 0-6.4-6.4-6.4-12.8-6.4z" horiz-adv-x="1024" />
<glyph glyph-name="tiaodupeizhi" unicode="&#59482;" d="M883.2 652.8h-128c-19.2 0-32 12.8-32 32s12.8 32 32 32h128c19.2 0 32-12.8 32-32s-12.8-32-32-32zM588.8 563.2c-19.2 0-32 12.8-32 32V768c0 19.2 12.8 32 32 32s32-12.8 32-32v-172.8c0-19.2-12.8-32-32-32zM588.8 652.8H115.2c-19.2 0-32 12.8-32 32s12.8 32 32 32h473.6c19.2 0 32-12.8 32-32s-12.8-32-32-32zM288 352H115.2c-19.2 0-32 12.8-32 32s12.8 32 32 32h172.8c19.2 0 32-12.8 32-32s-12.8-32-32-32zM460.8 262.4c-19.2 0-32 12.8-32 32V467.2c0 19.2 12.8 32 32 32s32-12.8 32-32v-172.8c0-19.2-12.8-32-32-32zM928 352H460.8c-19.2 0-32 12.8-32 32s12.8 32 32 32h467.2c19.2 0 32-12.8 32-32s-12.8-32-32-32zM883.2 51.2h-128c-19.2 0-32 12.8-32 32s12.8 32 32 32h128c19.2 0 32-12.8 32-32s-12.8-32-32-32zM588.8-32c-19.2 0-32 12.8-32 32v172.8c0 19.2 12.8 32 32 32s32-12.8 32-32V0c0-19.2-12.8-32-32-32zM588.8 51.2H115.2c-19.2 0-32 12.8-32 32s12.8 32 32 32h473.6c19.2 0 32-12.8 32-32s-12.8-32-32-32z" horiz-adv-x="1024" />
<glyph glyph-name="renwu" unicode="&#59485;" d="M857.6-32H160c-32 0-64 19.2-64 70.4V736c0 38.4 25.6 64 64 64h249.6l6.4-19.2c19.2-57.6 51.2-83.2 96-83.2s76.8 25.6 96 83.2l6.4 19.2h249.6c19.2 0 38.4-6.4 51.2-25.6 6.4-12.8 12.8-25.6 6.4-44.8v-697.6c0-38.4-25.6-64-64-64z m-697.6 64h697.6v704h-198.4C620.8 652.8 556.8 633.6 512 633.6c-44.8 0-108.8 19.2-147.2 102.4H160v-704c0 6.4 0 0 0 0zM441.6 243.2c-19.2 0-32 6.4-44.8 19.2L294.4 358.4c-12.8 12.8-12.8 32 0 44.8s32 12.8 44.8 0L448 307.2l236.8 230.4c12.8 12.8 32 12.8 44.8 0s12.8-32 0-44.8L486.4 256c-6.4-6.4-25.6-12.8-44.8-12.8z" horiz-adv-x="1024" />
<glyph glyph-name="sqljiaoben" unicode="&#59486;" d="M345.6-6.4H275.2l-64 704c0 19.2 6.4 38.4 12.8 51.2 12.8 19.2 38.4 25.6 57.6 25.6h19.2c25.6-32 38.4-70.4 38.4-108.8 0-12.8 0-32-6.4-44.8-6.4-12.8 6.4-32 25.6-32h396.8l6.4-38.4c0-12.8 12.8-25.6 25.6-25.6s25.6 12.8 25.6 32l-6.4 32h121.6c12.8 0 25.6 12.8 25.6 25.6v38.4C960 748.8 883.2 832 787.2 832H281.6c-70.4 0-128-64-121.6-134.4l44.8-524.8H89.6c-12.8 0-25.6-12.8-25.6-25.6v-32c0-96 70.4-172.8 160-172.8h121.6c12.8 0 25.6 12.8 25.6 25.6s-6.4 25.6-25.6 25.6zM550.4 774.4h230.4c32 0 64-12.8 83.2-38.4 25.6-25.6 32-57.6 32-89.6V640H384v19.2c6.4 44.8 0 83.2-19.2 115.2h185.6zM153.6 25.6c-19.2 25.6-32 51.2-32 83.2v6.4h89.6l12.8-121.6c-32 0-57.6 12.8-70.4 32zM499.2 352h-57.6v12.8c0 12.8 0 19.2-6.4 32-6.4 6.4-19.2 12.8-32 12.8-6.4 0-12.8 0-19.2-6.4l-12.8-12.8c0-6.4-6.4-12.8-6.4-12.8v-38.4c0-6.4 0-6.4 6.4-12.8 0-6.4 6.4-6.4 12.8-6.4s12.8-6.4 19.2-6.4l38.4-19.2c12.8-6.4 19.2-12.8 32-19.2 0-6.4 6.4-12.8 12.8-19.2 6.4-6.4 6.4-19.2 6.4-25.6v-38.4c0-12.8 0-32-6.4-44.8 0-12.8-6.4-25.6-12.8-32-6.4-12.8-19.2-19.2-32-25.6-12.8-6.4-25.6-6.4-44.8-6.4-12.8 0-25.6 0-38.4 6.4-12.8 6.4-19.2 12.8-32 19.2 0 6.4-6.4 12.8-6.4 25.6-6.4 12.8-6.4 25.6-6.4 32v19.2h51.2v-19.2c0-12.8 0-19.2 6.4-25.6 6.4-6.4 12.8-12.8 32-12.8 6.4 0 19.2 0 19.2 6.4 6.4 0 6.4 6.4 12.8 12.8 0 6.4 6.4 12.8 6.4 19.2v44.8c0 6.4 0 12.8-6.4 12.8 0 6.4-6.4 6.4-12.8 6.4s-12.8 6.4-19.2 6.4l-32 25.6c-25.6 6.4-38.4 19.2-44.8 38.4-12.8 12.8-12.8 32-12.8 57.6 0 12.8 0 25.6 6.4 38.4 0 12.8 6.4 25.6 19.2 32 6.4 12.8 12.8 19.2 25.6 25.6 12.8 6.4 25.6 6.4 38.4 6.4 12.8 0 25.6 0 38.4-6.4 12.8-6.4 19.2-12.8 32-19.2 19.2-19.2 25.6-38.4 25.6-57.6v-25.6z m89.6-179.2c0-12.8 6.4-25.6 12.8-25.6 6.4-6.4 12.8-6.4 25.6-6.4h12.8l-25.6 19.2 25.6 32 19.2-19.2V371.2c0 12.8-6.4 25.6-12.8 25.6-6.4 6.4-12.8 12.8-19.2 12.8-12.8 0-19.2 0-25.6-6.4-12.8-12.8-12.8-19.2-12.8-32v-198.4z m-57.6 198.4c0 12.8 0 25.6 6.4 38.4 6.4 12.8 12.8 19.2 19.2 32 12.8 6.4 25.6 12.8 32 12.8 12.8 6.4 19.2 6.4 32 6.4s19.2 0 32-6.4 19.2-6.4 32-19.2c6.4-6.4 12.8-19.2 19.2-32 6.4-12.8 6.4-25.6 6.4-38.4v-198.4c0-12.8 0-25.6-6.4-38.4l32-25.6-25.6-32-32 25.6c-19.2-12.8-38.4-19.2-57.6-19.2-12.8 0-19.2 0-32 6.4s-19.2 12.8-32 19.2c-6.4 6.4-12.8 19.2-19.2 25.6-6.4 12.8-6.4 25.6-6.4 38.4V371.2z m230.4-288V460.8h51.2v-320h108.8v-51.2h-160v-6.4z" horiz-adv-x="1024" />
<glyph glyph-name="shujukaifa" unicode="&#59487;" d="M416-6.4c-172.8 0-352 44.8-352 140.8V640c0 19.2 12.8 32 32 32s32-12.8 32-32v-505.6c0-25.6 96-76.8 288-76.8 89.6 0 160 6.4 204.8 25.6 19.2 6.4 32-6.4 38.4-19.2 6.4-19.2-6.4-32-19.2-38.4-51.2-25.6-128-32-224-32zM742.4 416c-19.2 0-32 12.8-32 32V640c0 19.2 12.8 32 32 32s32-12.8 32-32v-192c0-19.2-12.8-32-32-32zM422.4 499.2c-172.8 0-352 44.8-352 140.8 0 185.6 704 185.6 704 0 0-89.6-179.2-140.8-352-140.8z m0 217.6c-185.6 0-288-57.6-288-76.8 0-25.6 96-76.8 288-76.8 185.6 0 288 57.6 288 76.8S608 716.8 422.4 716.8zM422.4 160c-172.8 0-358.4 51.2-358.4 140.8 0 19.2 12.8 32 32 32s32-12.8 32-32 102.4-76.8 294.4-76.8c38.4 0 76.8 0 102.4 6.4 19.2 6.4 32-6.4 38.4-25.6 6.4-19.2-6.4-32-25.6-38.4-38.4-6.4-76.8-6.4-115.2-6.4zM422.4 326.4C249.6 326.4 64 377.6 64 467.2c0 19.2 12.8 32 32 32s32-12.8 32-32 102.4-76.8 294.4-76.8c44.8 0 96 6.4 153.6 12.8 19.2 0 32-12.8 38.4-25.6s-12.8-38.4-25.6-38.4c-64-6.4-115.2-12.8-166.4-12.8zM704 108.8c-6.4 0-19.2 6.4-25.6 12.8-12.8 12.8-12.8 32 0 44.8l76.8 64-76.8 76.8c-12.8 12.8-12.8 32 0 44.8 12.8 12.8 32 12.8 44.8 0L832 256c6.4-6.4 12.8-12.8 6.4-25.6 0-6.4-6.4-19.2-12.8-25.6l-102.4-89.6c-6.4-6.4-12.8-6.4-19.2-6.4zM736 12.8c-121.6 0-224 102.4-224 224s102.4 224 224 224S960 358.4 960 236.8s-102.4-224-224-224z m0 384C646.4 396.8 576 326.4 576 236.8s70.4-160 160-160 160 70.4 160 160-70.4 160-160 160z" horiz-adv-x="1024" />
<glyph glyph-name="yichangshujuzhongduantongbu" unicode="&#59481;" d="M736 803.968a32 32 0 0 0 11.712-43.712l-416-720.512a32 32 0 1 0-55.424 32l416 720.512a32 32 0 0 0 43.712 11.712zM493.44 640l-36.928-64H128v-320h143.744l-36.928-64H128a64 64 0 0 0-63.552 56.512L64 256V576a64 64 0 0 0 56.512 63.552L128 640h365.44zM896 640a64 64 0 0 0 63.552-56.512L960 576v-320a64 64 0 0 0-56.512-63.552L896 192H530.496l36.928 64H896V576h-143.808l36.928 64H896zM382.592 448l-36.928-64H192V448h190.592zM832 448v-64h-190.656l36.928 64H832z" horiz-adv-x="1024" />
<glyph glyph-name="shujuyuchuli" unicode="&#59480;" d="M333.248 128H191.872v-128h208.64c20.032-24.32 43.264-45.888 69.12-64h-277.76a64 64 0 0 0-64 64v128a64 64 0 0 0 64 64h129.536c1.984-22.016 6.016-43.392 11.84-64z m-45.376-32a32 32 0 1 0 0-64 32 32 0 0 0 0 64zM400.448 448H191.872v-128h141.376a350.72 350.72 0 0 1-11.84-64H191.872a64 64 0 0 0-64 64V448a64 64 0 0 0 64 64h277.632c-25.792-18.176-49.024-39.744-69.12-64z m-112.576-32a32 32 0 1 0 0-64 32 32 0 0 0 0 64z m544 416a64 64 0 0 0 64-64v-128a64 64 0 0 0-64-64h-640a64 64 0 0 0-64 64V768a64 64 0 0 0 64 64z m0-64h-640v-128h640V768z m-544-32a32 32 0 1 0 0-64 32 32 0 0 0 0 64zM891.584 384l3.328-3.2 67.072-79.232a18.88 18.88 0 0 0-6.592-29.44l-4.48-1.28-26.88-4.992a256.832 256.832 0 0 0-206.72-297.92 253.824 253.824 0 0 0-143.552 15.616l-14.4 6.528-0.64 0.192a23.36 23.36 0 0 0 16.96 43.52l3.136-1.6c39.04-19.2 84.224-26.752 130.432-18.368a210.112 210.112 0 0 1 170.88 231.936l-1.728 11.712-29.568-5.376a18.816 18.816 0 0 0-22.08 20.864l1.024 4.032 35.2 97.92A18.816 18.816 0 0 0 891.52 384z m-119.36 71.872l16.768-7.68a23.168 23.168 0 0 0 10.112-28.608 23.36 23.36 0 0 0-30.144-13.248l-1.92 1.024a209.664 209.664 0 0 1-132.16 19.2 210.112 210.112 0 0 1-170.88-232l1.728-11.776 28.16 5.12a18.88 18.88 0 0 0 22.208-20.416l-1.024-4.48-35.2-97.92a18.88 18.88 0 0 0-28.8-9.024l-3.392 3.2-67.008 79.232a18.88 18.88 0 0 0 6.592 29.376l4.48 1.408 28.16 5.184a256.64 256.64 0 0 0 206.848 297.92 253.184 253.184 0 0 0 145.472-16.512zM672 355.20000000000005c15.168 0 28.544-10.048 32.768-24.64l62.4-216.768c3.392-11.648-4.032-23.552-16.512-26.624-12.416-3.136-25.28 3.776-28.608 15.36l-11.52 39.808H633.408l-11.392-39.808c-3.328-11.584-16.192-18.496-28.608-15.36-12.48 3.072-19.84 14.976-16.512 26.624l62.4 216.768a34.112 34.112 0 0 0 32.768 24.64z m0-78.912l-26.112-90.496h52.096L672 276.288z" horiz-adv-x="1024" />

Before

Width:  |  Height:  |  Size: 393 KiB

After

Width:  |  Height:  |  Size: 400 KiB

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.

3
dist/lib/base/a/a.d.ts vendored

@ -1,4 +1,7 @@
import { Text } from "../single/text";
export declare class A extends Text {
static xtype: string;
props: {
href: string;
} & Text['props'];
}

12
dist/lib/core/func/function.d.ts vendored

@ -16,6 +16,18 @@ export declare type _function = {
find: any[];
match: any[];
};
/**
* url
* @param urlTemplate url模板
* @param param
*/
getEncodeURL: (urlTemplate: string, param: any) => string;
/**
* GB2312排序的结果
* @param items
* @param key
*/
getSortedResult: <T>(items: T[], key?: string | Function) => T[];
/**
* A执行之前执行方法B
* @param sFunc A

10
dist/lib/shims-tsx.d.ts vendored

@ -44,6 +44,16 @@ interface ElementClassProps<T> extends UIProps {
beforeRender(callback: () => void): void;
beforeInit(callback: () => void): void;
render(): any;
beforeCreate(): void;
created(): void;
beforeMount(): void;
mounted(): void;
shouldUpdate(): void;
update(): void;
beforeUpdate(): void;
updated(): void;
beforeDestroy(): void;
destroyed(): void;
}
declare namespace JSX {
interface IntrinsicElements {

2
dist/resource.css vendored

File diff suppressed because one or more lines are too long

0
src/router/router2.js → dist/router.js vendored

14
dist/utils.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-7-5 19:20:44 */
/*! time: 2021-7-13 16:40:25 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -82,7 +82,7 @@
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 1268);
/******/ return __webpack_require__(__webpack_require__.s = 1269);
/******/ })
/************************************************************************/
/******/ ({
@ -2927,7 +2927,7 @@ BI.Req = {
/***/ }),
/***/ 1126:
/***/ 1127:
/***/ (function(module, exports) {
BI.i18n = {
@ -3132,7 +3132,7 @@ BI.i18n = {
/***/ }),
/***/ 1268:
/***/ 1269:
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(91);
@ -3151,8 +3151,8 @@ __webpack_require__(97);
__webpack_require__(98);
__webpack_require__(108);
__webpack_require__(109);
__webpack_require__(1126);
__webpack_require__(1269);
__webpack_require__(1127);
__webpack_require__(1270);
__webpack_require__(110);
__webpack_require__(111);
module.exports = __webpack_require__(112);
@ -3160,7 +3160,7 @@ module.exports = __webpack_require__(112);
/***/ }),
/***/ 1269:
/***/ 1270:
/***/ (function(module, exports) {
/**

2
dist/utils.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/utils.min.js.map vendored

File diff suppressed because one or more lines are too long

20
examples/dev.html

@ -48,7 +48,10 @@
type: "bi.vertical",
items: [{
type: "bi.button",
text: store.model.text
text: store.model.text,
handler: function () {
console.log("click");
}
}, {
type: "bi.label",
text: store.model.text
@ -62,7 +65,12 @@
var Widget = BI.inherit(BI.Widget, {
props: {
updateMode: "auto"
vdom: true
},
watch: {
text: function () {
this.reset();
}
},
setup: function () {
var child;
@ -72,13 +80,13 @@
setInterval(function () {
store.toggle();
}, 1000);
BI.watch("text", function () {
child.reset();
});
// BI.watch("text", function () {
// child.reset();
// });
return function () {
return {
type: "bi.vertical",
vgap: 20,
vgap: store.model.expand ? 20 : 30,
items: [{
type: "demo.child",
ref: function (_ref) {

2
package.json

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

78
src/core/4.widget.js

@ -29,6 +29,7 @@
tagName: "div",
attributes: null,
data: null,
key: null,
tag: null,
disabled: false,
@ -38,7 +39,8 @@
extraCls: "",
cls: "",
css: null,
updateMode: "manual" // manual / auto
vdom: false
});
},
@ -134,6 +136,9 @@
if (o._baseCls || o.baseCls || o.extraCls || o.cls) {
this.element.addClass((o._baseCls || "") + " " + (o.baseCls || "") + " " + (o.extraCls || "") + " " + (o.cls || ""));
}
if (o.key != null) {
this.element.attr("key", o.key);
}
if (o.attributes) {
this.element.attr(o.attributes);
}
@ -165,6 +170,9 @@
this.element = BI.Widget._renderEngine.createElement(this);
}
this.element._isWidget = true;
var widgets = this.element.data("__widgets") || [];
widgets.push(this);
this.element.data("__widgets", widgets);
this._initCurrent();
},
@ -216,22 +224,59 @@
els = [els];
}
if (BI.isArray(els)) {
BI.each(els, function (i, el) {
if (el) {
BI._lazyCreateWidget(el, {
element: self
});
}
});
if (this.options.vdom) {
var div = document.createElement("div");
var element = this.element;
element.append(div);
this.vnode = this._renderVNode();
BI.patchVNode(div, this.vnode);
// 去除这个临时的div
BI.DOM.hang([div]);
element.attr("style", self.vnode.elm.getAttribute("style"));
element.addClass(self.vnode.elm.getAttribute("class"));
element.empty();
BI.each(BI.jQuery(self.vnode.elm).children(), function (i, node) {
element.append(node);
});
} else {
BI.each(els, function (i, el) {
if (el) {
BI._lazyCreateWidget(el, {
element: self
});
}
});
}
}
this._mount();
if (this.__async === true && isMounted) {
callLifeHook(this, "mounted");
this.fireEvent(BI.Events.MOUNT);
}
},
_renderVNode: function () {
var self = this;
var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
var els = render && render.call(this);
if (BI.isPlainObject(els)) {
els = [els];
}
if (BI.isArray(els)) {
var container = document.createElement("div");
this._children = {};
BI.each(els, function (i, el) {
if (el) {
var w = BI._lazyCreateWidget(el, {
element: container
});
self.addWidget(w);
}
});
}
return BI.Element2Vnode(container);
},
_setParent: function (parent) {
this._parent = parent;
},
@ -290,15 +335,6 @@
callLifeHook(this, "beforeUpdate");
if (shouldUpdate) {
var res = this.update && this.update(nextProps, shouldUpdate);
} else if (BI.isNull(shouldUpdate)) {
// 默认使用shallowCompare的方式进行更新
var nextChange = {};
BI.each(nextProps, function (key, value) {
if (o[key] !== value) {
nextChange[key] = value;
}
});
var res = this.update && BI.isNotEmptyObject(nextChange) && this.update(nextChange);
}
callLifeHook(this, "updated");
return res;
@ -578,6 +614,12 @@
if (this.__async === true || this.__asking === true) {
return;
}
if (this.options.vdom) {
var vnode = this._renderVNode();
BI.patchVNode(this.vnode, vnode);
this.vnode = vnode;
return;
}
// this._isMounted = false;
// this.purgeListeners();
this._empty();

1052
src/core/8.snabdom.js

File diff suppressed because it is too large Load Diff

49
src/core/element2Snabbdom.js

@ -0,0 +1,49 @@
!function () {
var patch = BI.Snabbdom.init([BI.Snabbdom.attributesModule, BI.Snabbdom.classModule, BI.Snabbdom.datasetModule, BI.Snabbdom.propsModule, BI.Snabbdom.styleModule, BI.Snabbdom.eventListenersModule]);
BI.Element2Vnode = function (parentNode) {
if (parentNode.nodeType === 3) {
return BI.Snabbdom.vnode(undefined, undefined, undefined, parentNode.textContent, parentNode);
}
var data = BI.jQuery._data(parentNode);
var on = {};
BI.each(data && data.events, function (eventName, events) {
on[eventName] = function () {
var ob = this, args = arguments;
BI.each(events, function (i, ev) {
ev.handler.apply(ob, args);
});
};
});
var attrs = {};
var elmAttrs = parentNode.attributes;
var elmChildren = parentNode.childNodes;
var key = parentNode.getAttribute("key");
for (i = 0, n = elmAttrs.length; i < n; i++) {
var name = elmAttrs[i].nodeName;
if (name !== "id" && name !== "class") {
attrs[name] = elmAttrs[i].nodeValue;
}
}
var vnode = BI.Snabbdom.vnode(parentNode.nodeName, {
class: BI.makeObject(parentNode.classList),
attrs: attrs,
key: key,
on: on,
hook: {
create: function () {
BI.each(BI.Widget._renderEngine.createElement(parentNode).data("__widgets"), function (i, w) {
w.element = BI.Widget._renderEngine.createElement(vnode.elm);
});
}
}
}, BI.map(elmChildren, function (i, childNode) {
return BI.Element2Vnode(childNode);
}), undefined, parentNode);
return vnode;
};
BI.patchVNode = function (element, node) {
patch(element, node);
};
}();

18
src/widget/dynamicdate/dynamicdate.trigger.js

@ -42,11 +42,25 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
vgap: c.vgap,
allowBlank: true,
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
errorText: function () {
errorText: function (v) {
var str = "";
if (!BI.isKey(o.format)) {
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
if (!self._dateCheck(v)) {
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
} else {
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
str = BI.i18nText("BI-Basic_Date_Range_Error",
start.getFullYear(),
start.getMonth() + 1,
start.getDate(),
end.getFullYear(),
end.getMonth() + 1,
end.getDate()
);
}
}
return str;
},
title: BI.bind(this._getTitle, this)

18
src/widget/dynamicdatetime/dynamicdatetime.trigger.js

@ -42,11 +42,25 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
vgap: c.vgap,
allowBlank: true,
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
errorText: function () {
errorText: function (v) {
var str = "";
if (!BI.isKey(o.format)) {
str = self.editor.isEditing() ? BI.i18nText("BI-Basic_Date_Time_Error_Text") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
if (!self._dateCheck(v)) {
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
} else {
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
str = BI.i18nText("BI-Basic_Date_Range_Error",
start.getFullYear(),
start.getMonth() + 1,
start.getDate(),
end.getFullYear(),
end.getMonth() + 1,
end.getDate()
);
}
}
return str;
},
title: BI.bind(this._getTitle, this)

13
src/widget/year/trigger.year.js

@ -35,9 +35,18 @@ BI.DynamicYearTrigger = BI.inherit(BI.Trigger, {
vgap: c.vgap,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
errorText: function () {
errorText: function (v) {
if (BI.isPositiveInteger(v)) {
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
return BI.i18nText("BI-Basic_Year_Range_Error",
start.getFullYear(),
end.getFullYear());
}
return BI.i18nText("BI-Year_Trigger_Invalid_Text");
}
},
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicYearTrigger.EVENT_KEY_DOWN, arguments);

16
src/widget/yearmonth/trigger.yearmonth.js

@ -78,7 +78,21 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
},
watermark: BI.i18nText("BI-Basic_Unrestricted"),
errorText: function (v) {
return BI.i18nText("BI-Year_Trigger_Invalid_Text");
var year = isYear ? v : self.yearEditor.getValue();
var month = isYear ? self.monthEditor.getValue() : v;
if (!BI.isPositiveInteger(year) || !BI.isPositiveInteger(month) || month > 12) {
return BI.i18nText("BI-Year_Trigger_Invalid_Text");
}
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
return BI.i18nText("BI-Basic_Year_Month_Range_Error",
start.getFullYear(),
start.getMonth() + 1,
end.getFullYear(),
end.getMonth() + 1
);
},
hgap: c.hgap,
vgap: c.vgap,

17
src/widget/yearquarter/trigger.yearquarter.js

@ -75,12 +75,25 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
return false;
},
errorText: function (v) {
return BI.i18nText("BI-Year_Trigger_Invalid_Text");
var year = isYear ? v : self.yearEditor.getValue();
var quarter = isYear ? self.quarterEditor.getValue() : v;
if (!BI.isPositiveInteger(year) || !BI.isPositiveInteger(quarter) || quarter > 4) {
return BI.i18nText("BI-Year_Trigger_Invalid_Text");
}
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
return BI.i18nText("BI-Basic_Year_Quarter_Range_Error",
start.getFullYear(),
BI.getQuarter(start),
end.getFullYear(),
BI.getQuarter(end)
);
},
watermark: BI.i18nText("BI-Basic_Unrestricted"),
hgap: c.hgap,
vgap: c.vgap,
title: "",
allowBlank: true
});
editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {

3
typescript/base/a/a.ts

@ -2,4 +2,7 @@ import { Text } from "../single/text";
export declare class A extends Text {
static xtype: string;
props: {
href: string;
} & Text['props'];
}

10
typescript/shims-tsx.ts

@ -49,6 +49,16 @@ interface ElementClassProps<T> extends UIProps {
beforeRender(callback: () => void): void;
beforeInit(callback: () => void): void;
render(): any;
beforeCreate(): void;
created(): void;
beforeMount(): void;
mounted(): void;
shouldUpdate(): void;
update(): void;
beforeUpdate(): void;
updated(): void;
beforeDestroy(): void;
destroyed(): void;
}
declare namespace JSX {

Loading…
Cancel
Save