Browse Source

Merge branch 'master' of ssh://code.fineres.com:7999/~teller/fineui

es6
iapyang 3 years ago
parent
commit
9ef483c2fa
  1. 27
      demo/app.js
  2. 4
      dist/2.0/fineui.css
  3. 4
      dist/2.0/fineui.ie.min.js
  4. 2
      dist/2.0/fineui.ie.min.js.map
  5. 3618
      dist/2.0/fineui.js
  6. 2
      dist/2.0/fineui.js.map
  7. 4
      dist/2.0/fineui.min.css
  8. 4
      dist/2.0/fineui.min.js
  9. 2
      dist/2.0/fineui.min.js.map
  10. 2
      dist/2.0/fineui.modern.min.css
  11. 2
      dist/2.0/fineui.modern.min.js
  12. 24
      dist/2.0/fineui.modern.min.js.LICENSE.txt
  13. 1
      dist/2.0/fineui.modern.min.js.map
  14. 4
      dist/2.0/fineui_without_normalize.css
  15. 4
      dist/2.0/fineui_without_normalize.min.css
  16. 4
      dist/core.css
  17. 3554
      dist/core.js
  18. 2
      dist/core.js.map
  19. 4
      dist/demo.css
  20. 4001
      dist/demo.js
  21. 2
      dist/demo.js.map
  22. 4
      dist/fineui.css
  23. 4
      dist/fineui.ie.min.js
  24. 2
      dist/fineui.ie.min.js.map
  25. 3601
      dist/fineui.js
  26. 2
      dist/fineui.js.map
  27. 4
      dist/fineui.min.css
  28. 4
      dist/fineui.min.js
  29. 2
      dist/fineui.min.js.map
  30. 2
      dist/fineui.modern.min.css
  31. 2
      dist/fineui.modern.min.js
  32. 24
      dist/fineui.modern.min.js.LICENSE.txt
  33. 1
      dist/fineui.modern.min.js.map
  34. 4
      dist/fineui.proxy.css
  35. 2695
      dist/fineui.proxy.js
  36. 2
      dist/fineui.proxy.js.map
  37. 4
      dist/fineui.proxy.min.css
  38. 4
      dist/fineui.proxy.min.js
  39. 2
      dist/fineui.proxy.min.js.map
  40. 2364
      dist/fineui_without_jquery_polyfill.js
  41. 2
      dist/fineui_without_jquery_polyfill.js.map
  42. 4
      dist/fineui_without_normalize.min.css
  43. 2
      dist/font.css
  44. BIN
      dist/font/iconfont.eot
  45. 2
      dist/font/iconfont.svg
  46. BIN
      dist/font/iconfont.ttf
  47. BIN
      dist/font/iconfont.woff
  48. BIN
      dist/font/iconfont.woff2
  49. BIN
      dist/images/1x/icon/auto_square_normal.png
  50. BIN
      dist/images/1x/icon/dark/auto_square_normal.png
  51. BIN
      dist/images/1x/icon/dark/trans_disable.png
  52. BIN
      dist/images/1x/icon/trans_disable.png
  53. BIN
      dist/images/2x/icon/auto_disable.png
  54. BIN
      dist/images/2x/icon/auto_square_normal.png
  55. BIN
      dist/images/2x/icon/dark/auto_square_normal.png
  56. BIN
      dist/images/2x/icon/dark/trans_disable.png
  57. BIN
      dist/images/2x/icon/trans_disable.png
  58. 1
      dist/lib/base/single/button/button.basic.d.ts
  59. 2
      dist/lib/base/single/button/buttons/button.text.d.ts
  60. 16
      dist/lib/base/single/button/listitem/icontextitem.d.ts
  61. 9
      dist/lib/base/single/editor/editor.d.ts
  62. 11
      dist/lib/base/single/editor/editor.textarea.d.ts
  63. 14
      dist/lib/base/single/label/abstract.label.d.ts
  64. 4
      dist/lib/base/single/label/icon.label.d.ts
  65. 4
      dist/resource.css
  66. 21
      dist/router.js
  67. 154
      dist/utils.js
  68. 2
      dist/utils.js.map
  69. 4
      dist/utils.min.js
  70. 2
      dist/utils.min.js.map
  71. 240
      examples/dev.html
  72. 30
      examples/hooks.html
  73. 2
      examples/virtual-group.html
  74. 4
      examples/插件设计.html
  75. 2
      package.json
  76. 2
      private/modern/app.less
  77. 2
      private/modern/background.less
  78. 2
      private/modern/font.less
  79. 5
      private/modern/icon.less
  80. 5
      private/modern/var.less
  81. 2
      public/modern/app.less
  82. 2
      public/modern/background.less
  83. 2
      public/modern/font.less
  84. 5
      public/modern/icon.less
  85. 6
      public/modern/var.less
  86. 33
      src/base/collection/collection.js
  87. 18
      src/base/combination/combo.js
  88. 16
      src/base/el.js
  89. 112
      src/base/grid/grid.js
  90. 14
      src/case/button/icon/iconhalf/icon.half.js
  91. 6
      src/case/colorchooser/colorchooser.js
  92. 6
      src/case/colorchooser/colorchooser.popup.hex.js
  93. 4
      src/case/colorchooser/colorchooser.simple.js
  94. 2
      src/case/colorchooser/colorpicker/button/button.colorpicker.js
  95. 18
      src/case/colorchooser/colorpicker/editor.colorpicker.hex.js
  96. 14
      src/case/colorchooser/colorpicker/editor.colorpicker.hex.simple.js
  97. 18
      src/case/ztree/jquery.ztree.excheck-3.5.js
  98. 140
      src/core/4.widget.js
  99. 2
      src/core/5.shortcut.js
  100. 2
      src/core/6.inject.js
  101. Some files were not shown because too many files have changed in this diff Show More

27
demo/app.js

@ -36,17 +36,30 @@ BI.$(function () {
height: 50
}, {
type: "bi.router_view",
deps: 1,
height: 100
}, {
type: "bi.router_view",
name: 'home',
deps: 1
}]
});
},
children: [{
path: '',
component: function () {
return Promise.resolve({
type: "bi.label",
text: 'home'
})
components: {
default: function () {
return Promise.resolve({
type: "bi.label",
text: 'default'
});
},
home: function () {
return Promise.resolve({
type: "bi.label",
text: 'home'
});
},
}
}, {
name: 'dashboard',
@ -55,7 +68,7 @@ BI.$(function () {
return Promise.resolve({
type: "bi.label",
text: 'dashboard'
})
});
}
}, {
name: 'tables',
@ -64,7 +77,7 @@ BI.$(function () {
return Promise.resolve({
type: "bi.label",
text: 'tables'
})
});
}
}]
}];

4
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

3618
dist/2.0/fineui.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.js.map vendored

File diff suppressed because one or more lines are too long

4
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.modern.min.css vendored

File diff suppressed because one or more lines are too long

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

@ -0,0 +1,2 @@
/*! time: 2021-9-16 17:31:56 */
!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e["default"]}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=1450)}({1192:function(e,n,t){},1450:function(e,n,t){t(1192),t(1451),t(1452),t(1453),t(1454),e.exports=t(1455)},1451:function(e,n,t){},1452:function(e,n,t){},1453:function(e,n,t){},1454:function(e,n,t){},1455:function(e,n,t){}});

24
dist/2.0/fineui.modern.min.js.LICENSE.txt vendored

@ -0,0 +1,24 @@
/*!
* Sizzle CSS Selector Engine v2.2.1
* http://sizzlejs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2015-10-17
*/
/*!
* jQuery JavaScript Library v1.12.4
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2016-05-20T17:17Z
*/

1
dist/2.0/fineui.modern.min.js.map vendored

@ -0,0 +1 @@
{"version":3,"sources":["webpack:///webpack/bootstrap"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s"],"mappings":";aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRzB,EAAoB6B,EAAI,SAAS1B,GAChC,IAAIS,EAAST,GAAUA,EAAOqB,WAC7B,WAAwB,OAAOrB,EAAgB,YAC/C,WAA8B,OAAOA,GAEtC,OADAH,EAAoBU,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRZ,EAAoBa,EAAI,SAASiB,EAAQC,GAAY,OAAOjB,OAAOkB,UAAUC,eAAe1B,KAAKuB,EAAQC,IAGzG/B,EAAoBkC,EAAI,GAIjBlC,EAAoBA,EAAoBmC,EAAI,M","file":"2.0/fineui.modern.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1450);\n"],"sourceRoot":""}

4
dist/2.0/fineui_without_normalize.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui_without_normalize.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/core.css vendored

File diff suppressed because one or more lines are too long

3554
dist/core.js vendored

File diff suppressed because one or more lines are too long

2
dist/core.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/demo.css vendored

File diff suppressed because one or more lines are too long

4001
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

4
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

3601
dist/fineui.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.js.map vendored

File diff suppressed because one or more lines are too long

4
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

2
dist/fineui.modern.min.css vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.modern.min.js vendored

@ -0,0 +1,2 @@
/*! time: 2021-9-16 17:31:56 */
!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e["default"]}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=1441)}({1192:function(e,n,t){},1441:function(e,n,t){t(1192),t(1442),t(1443),t(1444),t(1445),e.exports=t(1446)},1442:function(e,n,t){},1443:function(e,n,t){},1444:function(e,n,t){},1445:function(e,n,t){},1446:function(e,n,t){}});

24
dist/fineui.modern.min.js.LICENSE.txt vendored

@ -0,0 +1,24 @@
/*!
* Sizzle CSS Selector Engine v2.2.1
* http://sizzlejs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2015-10-17
*/
/*!
* jQuery JavaScript Library v1.12.4
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2016-05-20T17:17Z
*/

1
dist/fineui.modern.min.js.map vendored

@ -0,0 +1 @@
{"version":3,"sources":["webpack:///webpack/bootstrap"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s"],"mappings":";aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRzB,EAAoB6B,EAAI,SAAS1B,GAChC,IAAIS,EAAST,GAAUA,EAAOqB,WAC7B,WAAwB,OAAOrB,EAAgB,YAC/C,WAA8B,OAAOA,GAEtC,OADAH,EAAoBU,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRZ,EAAoBa,EAAI,SAASiB,EAAQC,GAAY,OAAOjB,OAAOkB,UAAUC,eAAe1B,KAAKuB,EAAQC,IAGzG/B,EAAoBkC,EAAI,GAIjBlC,EAAoBA,EAAoBmC,EAAI,M","file":"fineui.modern.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1441);\n"],"sourceRoot":""}

4
dist/fineui.proxy.css vendored

File diff suppressed because one or more lines are too long

2695
dist/fineui.proxy.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.proxy.js.map vendored

File diff suppressed because one or more lines are too long

4
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

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

File diff suppressed because one or more lines are too long

2364
dist/fineui_without_jquery_polyfill.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui_without_jquery_polyfill.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/fineui_without_normalize.min.css 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.

2
dist/font/iconfont.svg vendored

@ -14,6 +14,8 @@
/>
<missing-glyph />
<glyph glyph-name="xunijiedian" unicode="&#59499;" d="M512 607.99972a223.99972 223.99972 0 1 1 0-447.99944 223.99972 223.99972 0 0 1 0 447.99944z m0-63.99992a159.9998 159.9998 0 1 0 0-319.9996 159.9998 159.9998 0 0 0 0 319.9996zM207.232381 55.68041A446.207442 446.207442 0 0 1 512-63.99944a445.759443 445.759443 0 0 1 255.99968 80.3199l15.74398 11.455985 38.847952-50.879936A509.823363 509.823363 0 0 0 512-127.99936a510.079362 510.079362 0 0 0-333.247583 123.263846l-15.103982 13.439983 43.519946 46.975941zM886.719532 732.799564A510.207362 510.207362 0 0 0 1023.99936 384a509.759363 509.759363 0 0 0-93.247883-294.655632l-12.415985-16.831979-50.751936 38.911952A445.823443 445.823443 0 0 1 959.99944 384c0 108.159865-38.399952 210.175737-106.879866 290.431637l-13.183984 14.847981 46.783942 43.583946zM106.688507 696.959609l50.623936-39.167951A445.823443 445.823443 0 0 1 64.00056 384c0-79.551901 20.735974-156.031805 59.519926-223.231721l10.047987-16.639979-54.015932-34.303957A509.695363 509.695363 0 0 0 0.00064 384c0 114.815856 37.951953 223.93572 106.687867 312.895609zM512 895.99936c90.687887 0 177.919778-23.67997 254.719682-67.839915l17.599978-10.495987-34.111958-54.207932A445.695443 445.695443 0 0 1 512 831.99944a445.759443 445.759443 0 0 1-255.99968-80.3199l-15.74398-11.519985-38.847952 50.943936A509.823363 509.823363 0 0 0 512 895.99936zM1023.99936 22.592452V-127.99936h-152.511809v63.99992H959.99944v86.591892h63.99992zM64.00056 24.32045V-63.99944h87.231891v-63.99992H0.00064v152.25581h63.99992zM156.416444 895.99936v-63.99992H64.00056v-95.551881H0.00064V895.99936h156.415804zM1023.99936 895.99936v-158.335802h-63.99992V831.99944h-93.759883V895.99936H1023.99936z" horiz-adv-x="1024" />
<glyph glyph-name="zhongxinxuanze" unicode="&#59498;" d="M896 832a64 64 0 0 0 64-64v-512c-4.992-15.616-15.04-23.424-30.336-23.424a32.896 32.896 0 0 0-29.888 17.216l-3.2 6.208H896V768H128v-768h512v-1.6c16.576-4.032 24.832-14.272 24.832-30.72 0-14.4-6.4-24.32-19.008-29.632L640-64H128a64 64 0 0 0-64 64V768a64 64 0 0 0 64 64h768zM452.288 526.72v-82.048H628.48c14.848 0 28.992-7.04 37.952-18.88l128.64-342.464 118.08-0.256c26.304-0.064 37.504-17.92 37.504-38.336 0-20.352-11.328-37.632-37.632-37.632l-141.76 0.384a42.24 42.24 0 0 0-41.6 28.864c-27.84 73.856-69.44 184.64-124.928 332.352H452.288v-74.048c0-25.6-27.264-40-46.08-24.32l-60.928 50.944-77.888 65.024a32.32 32.32 0 0 0 0 48.64l77.888 65.088 60.928 50.944c18.816 15.68 46.08 1.28 46.08-24.32z" horiz-adv-x="1024" />
<glyph glyph-name="yunhangzhong" unicode="&#59497;" d="M729.088 586.496a24 24 0 0 0 33.472-1.792c58.432-62.08 95.872-179.2 84.864-268.928a23.68 23.68 0 1 0-47.104 5.76c9.344 75.968-22.848 175.68-73.024 231.488a23.68 23.68 0 0 0 1.792 33.472zM810.368 318.08a142.336 142.336 0 1 0-54.272-279.488 142.336 142.336 0 0 0 54.272 279.424z m-12.16-62.912a78.336 78.336 0 1 1-29.952-153.728 78.336 78.336 0 0 1 29.888 153.728zM601.792 67.2a23.68 23.68 0 0 0-15.808-29.632c-84.736-25.856-169.6-18.24-246.272 29.632a23.68 23.68 0 1 0 25.088 40.192c64.896-40.512 135.616-46.336 207.36-24.448a23.68 23.68 0 0 0 29.632-15.744zM352.32 92.864a142.336 142.336 0 1 1-230.272 167.36 142.336 142.336 0 0 1 230.272-167.36z m-51.776 37.632a78.336 78.336 0 1 0-126.72 92.096 78.336 78.336 0 0 0 126.72-92.096zM194.88 415.232a23.68 23.68 0 0 0-16.704 29.056 307.648 307.648 0 0 0 162.624 197.248 23.68 23.68 0 0 0 20.8-42.624A260.224 260.224 0 0 1 224 432a23.68 23.68 0 0 0-29.12-16.768zM355.904 617.216A142.336 142.336 0 1 1 619.84 723.84 142.336 142.336 0 0 1 355.84 617.216z m59.328 23.936a78.336 78.336 0 1 0 145.28 58.688 78.336 78.336 0 0 0-145.28-58.688z" horiz-adv-x="1024" />

Before

Width:  |  Height:  |  Size: 416 KiB

After

Width:  |  Height:  |  Size: 418 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.

BIN
dist/images/1x/icon/auto_square_normal.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

BIN
dist/images/1x/icon/dark/auto_square_normal.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

BIN
dist/images/1x/icon/dark/trans_disable.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 535 B

BIN
dist/images/1x/icon/trans_disable.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 535 B

BIN
dist/images/2x/icon/auto_disable.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
dist/images/2x/icon/auto_square_normal.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 996 B

BIN
dist/images/2x/icon/dark/auto_square_normal.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 B

BIN
dist/images/2x/icon/dark/trans_disable.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1018 B

BIN
dist/images/2x/icon/trans_disable.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1018 B

1
dist/lib/base/single/button/button.basic.d.ts vendored

@ -30,6 +30,7 @@ export declare class BasicButton extends Single {
trigger?: string | null;
handler?: Function;
bubble?: Function | null | string;
text?: string;
} & Single['props'];
_createShadow(): void;
bindEvent(): void;

2
dist/lib/base/single/button/buttons/button.text.d.ts vendored

@ -1,4 +1,4 @@
import { Label } from "typescript";
import { Label } from "../../../..";
import { BasicButton } from "../button.basic";
export declare class TextButton extends BasicButton {
static xtype: string;

16
dist/lib/base/single/button/listitem/icontextitem.d.ts vendored

@ -3,19 +3,19 @@ export declare class IconTextItem extends BasicButton {
static xtype: string;
static EVENT_CHANGE: string;
props: {
direction: string;
logic: {
direction?: string;
logic?: {
dynamic: boolean;
};
iconWrapperWidth?: number;
iconHeight?: number;
iconWidth?: number;
textHgap: number;
textVgap: number;
textLgap: number;
textRgap: number;
text: string;
keyword: string;
textHgap?: number;
textVgap?: number;
textLgap?: number;
textRgap?: number;
text?: string;
keyword?: string;
} & BasicButton['props'];
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;

9
dist/lib/base/single/editor/editor.d.ts vendored

@ -1,6 +1,15 @@
import { Single } from "../single";
export declare class Editor extends Single {
static xtype: string;
props: {
inputType?: string;
validationChecker?: Function;
quitChecker?: Function;
allowBlank?: boolean;
watermark?: string;
errorText?: string | ((v: string) => string);
autocomplete?: string;
} & Single['props'];
static EVENT_CHANGE: string;
static EVENT_FOCUS: string;
static EVENT_BLUR: string;

11
dist/lib/base/single/editor/editor.textarea.d.ts vendored

@ -7,6 +7,17 @@ export declare class TextAreaEditor extends Single {
static EVENT_CONFIRM: string;
static EVENT_EMPTY: string;
static EVENT_KEY_DOWN: string;
props: {
value?: string;
errorText?: string | ((v: string) => string);
adjustYOffset?: number;
adjustXOffset?: number;
offsetStyle?: string;
validationChecker?: Function;
scrolly?: boolean;
style?: any;
watermark?: string;
} & Single['props'];
focus(): void;
blur(): void;
setStyle(style: any): void;

14
dist/lib/base/single/label/abstract.label.d.ts vendored

@ -2,13 +2,13 @@ import { Single } from "../single";
export declare class AbstractLabel extends Single {
static xtype: string;
props: {
textAlign: "left" | "center" | "right";
whiteSpace: "nowrap" | "normal";
textWidth: number | null;
textHeight: number | null;
highLight: boolean;
handler: Function | null;
text: string;
textAlign?: "left" | "center" | "right";
whiteSpace?: "nowrap" | "normal";
textWidth?: number | null;
textHeight?: number | null;
highLight?: boolean;
handler?: Function | null;
text?: string;
} & Single['props'];
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;

4
dist/lib/base/single/label/icon.label.d.ts vendored

@ -2,7 +2,7 @@ import { Single } from '../single';
export declare class IconLabel extends Single {
static xtype: string;
props: {
iconWidth: number;
iconHeight: number;
iconWidth?: number;
iconHeight?: number;
} & Single['props'];
}

4
dist/resource.css vendored

File diff suppressed because one or more lines are too long

21
dist/router.js vendored

@ -3147,7 +3147,8 @@
BI.RouterView = BI.inherit(BI.Widget, {
props: {
deps: 0
deps: 0,
name: 'default'
},
created: function () {
var self = this, o = this.options;
@ -3155,13 +3156,17 @@
var current = $router.history.current;
// 匹配的路径名(/component/:id)
var matchedPath = current.matched[o.deps] && current.matched[o.deps].path;
if (matchedPath) {
BI.each(current.params, function (key, value) {
// 把 :id 替换成具体的值(/component/demo.td)
matchedPath = matchedPath.replace(`:${key}`, value);
});
var component = current.matched[o.deps] && current.matched[o.deps].components[o.name];
if (BI.isNotNull(component)) {
if (matchedPath) {
BI.each(current.params, function (key, value) {
// 把 :id 替换成具体的值(/component/demo.td)
matchedPath = matchedPath.replace(`:${key}`, value);
});
}
self.tab.setSelect(matchedPath || "/");
}
self.tab.setSelect(matchedPath || "/");
});
},
render: function () {
@ -3177,7 +3182,7 @@
},
showIndex: false,
cardCreator: function (v) {
return $router.history.current.matched[o.deps].components.default;
return $router.history.current.matched[o.deps].components[o.name];
}
};
},

154
dist/utils.js vendored

File diff suppressed because one or more lines are too long

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

240
examples/dev.html

@ -9,112 +9,200 @@
<body>
<div id="wrapper"></div>
<script>
!(function () {
var Model = BI.inherit(Fix.Model, {
state: function () {
return {
expand: false,
showClearAll: false,
hasUndo: false,
hasRedo: false
};
},
var element2InstanceMap = new WeakMap();
computed: {
expandText: function () {
return this.model.expand ? "expand" : "not-expand";
},
clearAllText: function () {
return this.model.showClearAll ? "showClearAll" : "not-showClearAll";
},
undoText: function () {
return this.model.hasUndo ? "hasUndo" : "not-hasUndo";
},
redoText: function () {
return this.model.hasRedo ? "hasRedo" : "not-hasRedo";
}
},
BI.getInstanceByElement = function (element) {
return element2InstanceMap.get(element);
};
actions: {
setExpand: function () {
this.model.expand = !this.model.expand;
},
setClearAll: function () {
this.model.showClearAll = !this.model.showClearAll;
},
setUndo: function () {
this.model.hasUndo = !this.model.hasUndo;
},
setRedo: function () {
this.model.hasRedo = !this.model.hasRedo;
}
}
});
BI.Plugin.config(function (options) {
BI.model("demo.model", Model);
function useExpand () {
var button;
var store = BI.useStore();
BI.onBeforeMount(function () {
}, function (shortcut, instance) {
instance.element.attr("shortcut", shortcut);
if (instance.options.$testId) {
setIDAttribute(instance.element[0], instance.options.$testId);
}
element2InstanceMap.set(instance.element[0], instance);
});
BI.onMounted(function () {
function setIDAttribute (element, id) {
if (element.id !== "") {
throw new Error("不能修改有默认id的元素");
}
element.setAttribute("id", id);
}
});
BI.onBeforeUnmount(function () {
function registerWidgetIdGenerator () {
});
BI.onUnmounted(function () {
const idSet = new Set();
});
BI.watch("expandText", function (val) {
button.setText(val);
});
return function () {
return {
type: "bi.button",
ref: function (_ref) {
button = _ref;
},
text: store.model.expandText,
handler: function () {
store.setExpand();
}
};
};
}
function useClearAll () {
var button;
var store = BI.useStore();
BI.onBeforeMount(function () {
});
BI.onMounted(function () {
});
BI.onBeforeUnmount(function () {
});
BI.onUnmounted(function () {
return function (shortcut, id) {
if (idSet.has(id)) {
throw new Error("id重复了");
});
BI.watch("clearAllText", function (val) {
button.setText(val);
});
return function () {
return {
type: "bi.button",
ref: function (_ref) {
button = _ref;
},
text: store.model.clearAllText,
handler: function () {
store.setClearAll();
}
idSet.add(id);
BI.Plugin.registerObject(shortcut, function (widget) {
setIDAttribute(widget.element[0], id);
});
};
}
};
}
BI.registerWidgetId = registerWidgetIdGenerator();
}());
</script>
<script>
function useUndo () {
var button;
var store = BI.useStore();
BI.onBeforeMount(function () {
function setTestId (parentShortcut, childShortcut, testId) {
BI.Plugin.configRender(parentShortcut, function (rendered) {
var queue = BI.isArray(rendered) ? rendered : [rendered];// 广度遍历
while (queue.length > 0) {
var element = queue.shift();
BI.each(element, function (key, value) {
if (BI.isArray(value)) {
queue = queue.concat(value);
} else if (BI.isPlainObject(value)) {
queue.push(value);
} else if ("type" === key && value === childShortcut) {
element.$testId = testId;
}
});
}
return rendered;
});
BI.onMounted(function () {
});
BI.onBeforeUnmount(function () {
});
BI.onUnmounted(function () {
});
BI.watch("undoText", function (val) {
button.setText(val);
});
return function () {
return {
type: "bi.button",
ref: function (_ref) {
button = _ref;
},
text: store.model.undoText,
handler: function () {
store.setUndo();
}
};
};
}
setTestId("demo.parent", "bi.button_group", "测试testId");
function useRedo () {
var button;
var store = BI.useStore();
BI.onBeforeMount(function () {
});
BI.onMounted(function () {
});
BI.onBeforeUnmount(function () {
});
BI.onUnmounted(function () {
});
BI.watch("redoText", function (val) {
button.setText(val);
});
return function () {
return {
type: "bi.button",
ref: function (_ref) {
button = _ref;
},
text: store.model.redoText,
handler: function () {
store.setRedo();
}
};
};
}
var Widget = BI.inherit(BI.Widget, {
_store: function () {
return BI.Models.getModel("demo.model");
},
setup: function () {
var list;
var expandComponent = useExpand();
var clearAllComponent = useClearAll();
var undoComponent = useUndo();
var redoComponent = useRedo();
return function () {
return {
type: "bi.vertical",
items: [{
type: "bi.button_group",
height: 100,
ref: function (_ref) {
list = _ref;
},
items: BI.range(10).map(function (i) {
return {
type: "bi.label",
text: i,
cls: "bi-border"
};
}),
layouts: [{
type: "bi.inline",
tgap: 10,
lgap: 10
}]
}, {
type: "bi.button",
text: "点击",
handler: function () {
}
}]
items: [expandComponent(), clearAllComponent(), undoComponent(), redoComponent()]
};
};
}
});
BI.shortcut("demo.parent", Widget);
BI.shortcut("demo.hooks", Widget);
BI.createWidget({
type: "bi.absolute",
items: [{
el: {
type: "demo.parent"
type: "demo.hooks"
},
top: 100,
left: 100

30
examples/hooks.html

@ -51,9 +51,9 @@
BI.model("demo.model", Model);
function expandFunction (storeCreator) {
function useExpand () {
var button;
var store = BI.useStore(storeCreator);
var store = BI.useStore();
BI.onBeforeMount(function () {
});
@ -83,9 +83,9 @@
};
}
function clearAllFunction (storeCreator) {
function useClearAll () {
var button;
var store = BI.useStore(storeCreator);
var store = BI.useStore();
BI.onBeforeMount(function () {
});
@ -115,9 +115,9 @@
};
}
function undoFunction (storeCreator) {
function useUndo () {
var button;
var store = BI.useStore(storeCreator);
var store = BI.useStore();
BI.onBeforeMount(function () {
});
@ -147,9 +147,9 @@
};
}
function redoFunction (storeCreator) {
function useRedo () {
var button;
var store = BI.useStore(storeCreator);
var store = BI.useStore();
BI.onBeforeMount(function () {
});
@ -180,14 +180,14 @@
}
var Widget = BI.inherit(BI.Widget, {
_store: function () {
return BI.Models.getModel("demo.model");
},
setup: function () {
var storeCreator = function () {
return BI.Models.getModel("demo.model");
};
var expandComponent = expandFunction(storeCreator);
var clearAllComponent = clearAllFunction(storeCreator);
var undoComponent = undoFunction(storeCreator);
var redoComponent = redoFunction(storeCreator);
var expandComponent = useExpand();
var clearAllComponent = useClearAll();
var undoComponent = useUndo();
var redoComponent = useRedo();
return function () {
return {
type: "bi.vertical",

2
examples/virtual-group.html

@ -11,7 +11,7 @@
var Widget = BI.inherit(BI.Widget, {
props: {
vdom: true
// vdom: true
},
watch: {
text: function () {

4
examples/插件设计.html

@ -2,7 +2,7 @@
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="../dist/2.0/fineui.css"/>
<link rel="stylesheet" type="text/css" href="../dist/2.0/fineui.min.css"/>
<script src="../dist/2.0/fineui.js"></script>
<!-- <link rel="stylesheet" type="text/css" href="http://fanruan.design/fineui/2.0/fineui.min.css" />-->
<!-- <script src="http://fanruan.design/fineui/2.0/fineui.min.js"></script>-->
@ -95,7 +95,7 @@
var Widget = BI.inherit(BI.Widget, {
props: {
vdom: true
// vdom: true
},
watch: {
text: function () {

2
package.json

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

2
private/modern/app.less

@ -0,0 +1,2 @@
@import "../../src/less/resource/app";
@import "var";

2
private/modern/background.less

@ -0,0 +1,2 @@
@import "../../src/less/resource/background";
@import "var";

2
private/modern/font.less

@ -0,0 +1,2 @@
@import "../../src/less/resource/font";
@import "var";

5
private/modern/icon.less

@ -0,0 +1,5 @@
@import "../../src/less/resource/icon";
@import "var";

5
private/modern/var.less

@ -0,0 +1,5 @@
@import "../../src/less/index-modern";
@webUrl: './';
@fontUrl: '@{webUrl}font/'; //图片的基本地址
@imageUrl: '@{webUrl}images/1x/'; //图片的基本地址
@image2xUrl: '@{webUrl}images/2x/'; //2倍图片的基本地址

2
public/modern/app.less

@ -0,0 +1,2 @@
@import "../../src/less/resource/app";
@import "var";

2
public/modern/background.less

@ -0,0 +1,2 @@
@import "../../src/less/resource/background";
@import "var";

2
public/modern/font.less

@ -0,0 +1,2 @@
@import "../../src/less/resource/font";
@import "var";

5
public/modern/icon.less

@ -0,0 +1,5 @@
@import "../../src/less/resource/icon";
@import "var";

6
public/modern/var.less

@ -0,0 +1,6 @@
@import "../../src/less/index-modern";
@webUrl: 'https://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/';
@fontUrl: '@{webUrl}font/'; //图片的基本地址
@imageUrl: '@{webUrl}images/1x/'; //图片的基本地址
@image2xUrl: '@{webUrl}images/2x/'; //2倍图片的基本地址

33
src/base/collection/collection.js

@ -161,20 +161,20 @@ BI.CollectionView = BI.inherit(BI.Widget, {
var index = this.renderedKeys[datum.index] && this.renderedKeys[datum.index][1];
var child;
if (index >= 0) {
if (datum.width !== this.renderedCells[index]._width) {
this.renderedCells[index]._width = datum.width;
this.renderedCells[index].el.setWidth(datum.width);
}
if (datum.height !== this.renderedCells[index]._height) {
this.renderedCells[index]._height = datum.height;
this.renderedCells[index].el.setHeight(datum.height);
}
if (this.renderedCells[index]._left !== datum.x) {
this.renderedCells[index].el.element.css("left", datum.x / BI.pixRatio + BI.pixUnit);
}
if (this.renderedCells[index]._top !== datum.y) {
this.renderedCells[index].el.element.css("top", datum.y / BI.pixRatio + BI.pixUnit);
}
// if (datum.width !== this.renderedCells[index]._width) {
// this.renderedCells[index]._width = datum.width;
this.renderedCells[index].el.setWidth(datum.width);
// }
// if (datum.height !== this.renderedCells[index]._height) {
// this.renderedCells[index]._height = datum.height;
this.renderedCells[index].el.setHeight(datum.height);
// }
// if (this.renderedCells[index]._left !== datum.x) {
this.renderedCells[index].el.element.css("left", datum.x / BI.pixRatio + BI.pixUnit);
// }
// if (this.renderedCells[index]._top !== datum.y) {
this.renderedCells[index].el.element.css("top", datum.y / BI.pixRatio + BI.pixUnit);
// }
renderedCells.push(child = this.renderedCells[index]);
} else {
child = BI._lazyCreateWidget(BI.extend({
@ -192,8 +192,8 @@ BI.CollectionView = BI.inherit(BI.Widget, {
top: datum.y,
_left: datum.x,
_top: datum.y,
_width: datum.width,
_height: datum.height
// _width: datum.width,
// _height: datum.height
});
}
var startTopIndex = topMap[datum.y] | 0;
@ -281,6 +281,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
this.container.setWidth(this._width);
this.container.setHeight(this._height);
this._debounceRelease();
this._calculateChildrenToRender();
// 元素未挂载时不能设置scrollTop
try {

18
src/base/combination/combo.js

@ -340,11 +340,21 @@
this.resetListWidth("");
var width = this.popupView.element.outerWidth();
var maxW = this.element.outerWidth() || o.width;
if (width > maxW + 80) {
maxW = maxW + 80;
} else if (width > maxW) {
maxW = width;
// BI-93885 最大列宽算法调整
if (maxW < 500) {
if (width >= 500) {
maxW = 500;
} else if(width > maxW) {
// 防止小数导致差那么一点
maxW = width + 1;
}
}
// if (width > maxW + 80) {
// maxW = maxW + 80;
// } else if (width > maxW) {
// maxW = width;
// }
this.resetListWidth(maxW < 100 ? 100 : maxW);
}
},

16
src/base/el.js

@ -9,18 +9,14 @@ BI.EL = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.EL.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-el",
el: {},
layout: {}
el: {}
});
},
_init: function () {
BI.EL.superclass._init.apply(this, arguments);
render: function () {
var self = this, o = this.options;
this.ele = BI.createWidget(o.el);
BI.createWidget(o.layout, {
type: "bi.adaptive",
element: this,
items: [this.ele]
this.ele = BI.createWidget(o.el, {
element: this
});
this.ele.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
@ -39,4 +35,4 @@ BI.EL = BI.inherit(BI.Widget, {
this.ele.populate.apply(this, arguments);
}
});
BI.shortcut("bi.el", BI.EL);
BI.shortcut("bi.el", BI.EL);

112
src/base/grid/grid.js

@ -59,6 +59,7 @@ BI.GridView = BI.inherit(BI.Widget, {
items: [this.container]
});
if (o.items.length > 0) {
this._calculateSizeAndPositionData();
this._populate();
}
},
@ -72,6 +73,24 @@ BI.GridView = BI.inherit(BI.Widget, {
}
},
_calculateSizeAndPositionData: function () {
var o = this.options;
this.columnCount = 0;
this.rowCount = 0;
if (BI.isNumber(o.columnCount)) {
this.columnCount = o.columnCount;
} else if (o.items.length > 0) {
this.columnCount = o.items[0].length;
}
if (BI.isNumber(o.rowCount)) {
this.rowCount = o.rowCount;
} else {
this.rowCount = o.items.length;
}
this._columnSizeAndPositionManager = new BI.ScalingCellSizeAndPositionManager(this.columnCount, o.columnWidthGetter, o.estimatedColumnSize);
this._rowSizeAndPositionManager = new BI.ScalingCellSizeAndPositionManager(this.rowCount, o.rowHeightGetter, o.estimatedRowSize);
},
_getOverscanIndices: function (cellCount, overscanCellsCount, startIndex, stopIndex) {
return {
overscanStartIndex: Math.max(0, startIndex - overscanCellsCount),
@ -137,20 +156,20 @@ BI.GridView = BI.inherit(BI.Widget, {
var index = this.renderedKeys[key] && this.renderedKeys[key][2];
var child;
if (index >= 0) {
if (columnDatum.size !== this.renderedCells[index]._width) {
this.renderedCells[index]._width = columnDatum.size;
this.renderedCells[index].el.setWidth(columnDatum.size);
}
if (rowDatum.size !== this.renderedCells[index]._height) {
this.renderedCells[index]._height = rowDatum.size;
this.renderedCells[index].el.setHeight(rowDatum.size);
}
if (this.renderedCells[index]._left !== columnDatum.offset + horizontalOffsetAdjustment) {
this.renderedCells[index].el.element.css("left", (columnDatum.offset + horizontalOffsetAdjustment) / BI.pixRatio + BI.pixUnit);
}
if (this.renderedCells[index]._top !== rowDatum.offset + verticalOffsetAdjustment) {
this.renderedCells[index].el.element.css("top", (rowDatum.offset + verticalOffsetAdjustment) / BI.pixRatio + BI.pixUnit);
}
// if (columnDatum.size !== this.renderedCells[index]._width) {
// this.renderedCells[index]._width = columnDatum.size;
this.renderedCells[index].el.setWidth(columnDatum.size);
// }
// if (rowDatum.size !== this.renderedCells[index]._height) {
// this.renderedCells[index]._height = rowDatum.size;
this.renderedCells[index].el.setHeight(rowDatum.size);
// }
// if (this.renderedCells[index]._left !== columnDatum.offset + horizontalOffsetAdjustment) {
this.renderedCells[index].el.element.css("left", (columnDatum.offset + horizontalOffsetAdjustment) / BI.pixRatio + BI.pixUnit);
// }
// if (this.renderedCells[index]._top !== rowDatum.offset + verticalOffsetAdjustment) {
this.renderedCells[index].el.element.css("top", (rowDatum.offset + verticalOffsetAdjustment) / BI.pixRatio + BI.pixUnit);
// }
child = this.renderedCells[index].el;
renderedCells.push(this.renderedCells[index]);
} else {
@ -170,9 +189,9 @@ BI.GridView = BI.inherit(BI.Widget, {
left: columnDatum.offset + horizontalOffsetAdjustment,
top: rowDatum.offset + verticalOffsetAdjustment,
_left: columnDatum.offset + horizontalOffsetAdjustment,
_top: rowDatum.offset + verticalOffsetAdjustment,
_width: columnDatum.size,
_height: rowDatum.size
_top: rowDatum.offset + verticalOffsetAdjustment
// _width: columnDatum.size,
// _height: rowDatum.size
});
}
minX = Math.min(minX, columnDatum.offset + horizontalOffsetAdjustment);
@ -224,16 +243,16 @@ BI.GridView = BI.inherit(BI.Widget, {
/**
* 获取真实的可滚动的最大宽度
* 对于grid_view如果没有全部渲染过this._columnSizeAndPositionManager.getTotalSize获取的宽度是不准确的
* 因此在调用setScrollLeft等函数时会造成没法移动到最右端(预估可移动具体太短)
* 因此在调用setScrollLeft等函数时会造成没法移动到最右端(预估可移动距离太短)
*/
_getRealMaxScrollLeft: function () {
var o = this.options;
var totalWidth = 0;
BI.count(0, this.columnCount, function (index) {
totalWidth += o.columnWidthGetter(index);
});
return Math.max(0, totalWidth - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));
},
// _getRealMaxScrollLeft: function () {
// var o = this.options;
// var totalWidth = 0;
// BI.count(0, this.columnCount, function (index) {
// totalWidth += o.columnWidthGetter(index);
// });
// return Math.max(0, totalWidth - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));
// },
_getMaxScrollLeft: function () {
return Math.max(0, this._columnSizeAndPositionManager.getTotalSize() - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));
@ -246,33 +265,22 @@ BI.GridView = BI.inherit(BI.Widget, {
_populate: function (items) {
var self = this, o = this.options;
this._reRange();
this.columnCount = 0;
this.rowCount = 0;
if (items && items !== this.options.items) {
this.options.items = items;
this._calculateSizeAndPositionData();
}
if (BI.isNumber(o.columnCount)) {
this.columnCount = o.columnCount;
} else if (o.items.length > 0) {
this.columnCount = o.items[0].length;
}
if (BI.isNumber(o.rowCount)) {
this.rowCount = o.rowCount;
} else {
this.rowCount = o.items.length;
}
this.container.setWidth(this.columnCount * o.estimatedColumnSize);
this.container.setHeight(this.rowCount * o.estimatedRowSize);
this._columnSizeAndPositionManager = new BI.ScalingCellSizeAndPositionManager(this.columnCount, o.columnWidthGetter, o.estimatedColumnSize);
this._rowSizeAndPositionManager = new BI.ScalingCellSizeAndPositionManager(this.rowCount, o.rowHeightGetter, o.estimatedRowSize);
this._calculateChildrenToRender();
// 元素未挂载时不能设置scrollTop
try {
this.element.scrollTop(o.scrollTop);
this.element.scrollLeft(o.scrollLeft);
} catch (e) {
if (o.items.length > 0) {
this.container.setWidth(this.columnCount * o.estimatedColumnSize);
this.container.setHeight(this.rowCount * o.estimatedRowSize);
this._debounceRelease();
this._calculateChildrenToRender();
// 元素未挂载时不能设置scrollTop
try {
this.element.scrollTop(o.scrollTop);
this.element.scrollLeft(o.scrollLeft);
} catch (e) {
}
}
},
@ -281,7 +289,7 @@ BI.GridView = BI.inherit(BI.Widget, {
return;
}
this._scrollLock = true;
this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getRealMaxScrollLeft());
this.options.scrollLeft = scrollLeft || 0;
this._debounceRelease();
this._calculateChildrenToRender();
this.element.scrollLeft(this.options.scrollLeft);
@ -292,7 +300,7 @@ BI.GridView = BI.inherit(BI.Widget, {
return;
}
this._scrollLock = true;
this.options.scrollTop = BI.clamp(scrollTop || 0, 0, this._getMaxScrollTop());
this.options.scrollTop = scrollTop || 0;
this._debounceRelease();
this._calculateChildrenToRender();
this.element.scrollTop(this.options.scrollTop);

14
src/case/button/icon/iconhalf/icon.half.js

@ -14,20 +14,6 @@ BI.HalfButton = BI.inherit(BI.BasicButton, {
});
},
_init: function () {
BI.HalfButton.superclass._init.apply(this, arguments);
BI.createWidget({
type: "bi.center_adapt",
element: this.element,
items: [{
type: "bi.layout",
cls: "bi-high-light-background",
width: 8,
height: 8
}]
});
},
doClick: function () {
BI.HalfButton.superclass.doClick.apply(this, arguments);
if(this.isValid()) {

6
src/case/colorchooser/colorchooser.js

@ -60,7 +60,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
}]
}, o.popup),
value: o.value,
width: 292
width: 300
},
value: o.value
});
@ -73,6 +73,9 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {
self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments);
});
this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () {
self.fireEvent(BI.ColorChooser.EVENT_AFTER_POPUPVIEW, arguments);
});
},
_isRGBColor: function (color) {
@ -100,4 +103,5 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
}
});
BI.ColorChooser.EVENT_CHANGE = "EVENT_CHANGE";
BI.ColorChooser.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW";
BI.shortcut("bi.color_chooser", BI.ColorChooser);

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

@ -7,7 +7,7 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
props: {
baseCls: "bi-color-chooser-popup",
width: 292,
width: 300,
recommendColorsGetter: BI.emptyFn, // 推荐色获取接口
simple: false // 简单模式, popup中没有自动和透明
},
@ -21,11 +21,11 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
items: [{
el: {
type: "bi.vertical",
hgap: 10,
hgap: 15,
items: [BI.extend({
type: o.simple ? "bi.simple_hex_color_picker_editor" : "bi.hex_color_picker_editor",
value: o.value,
height: o.simple ? 30 : 64,
height: o.simple ? 36 : 70,
listeners: [{
eventName: BI.ColorPickerEditor.EVENT_CHANGE,
action: function () {

4
src/case/colorchooser/colorchooser.simple.js

@ -34,6 +34,9 @@ BI.SimpleColorChooser = BI.inherit(BI.Widget, {
this.combo.on(BI.ColorChooser.EVENT_CHANGE, function () {
self.fireEvent(BI.SimpleColorChooser.EVENT_CHANGE, arguments);
});
this.combo.on(BI.ColorChooser.EVENT_AFTER_POPUPVIEW, function () {
self.fireEvent(BI.SimpleColorChooser.EVENT_AFTER_POPUPVIEW, arguments);
});
},
isViewVisible: function () {
@ -57,4 +60,5 @@ BI.SimpleColorChooser = BI.inherit(BI.Widget, {
}
});
BI.SimpleColorChooser.EVENT_CHANGE = "EVENT_CHANGE";
BI.SimpleColorChooser.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW";
BI.shortcut("bi.simple_color_chooser", BI.SimpleColorChooser);

2
src/case/colorchooser/colorpicker/button/button.colorpicker.js

@ -19,7 +19,7 @@ BI.ColorPickerButton = BI.inherit(BI.BasicButton, {
var self = this, o = this.options;
if (BI.isNotNull(o.value)) {
if (o.value === '') {
this.element.addClass("auto-color-normal-background");
this.element.addClass("auto-color-square-normal-background");
} else if (o.value === "transparent") {
this.element.addClass("trans-color-background");
} else {

18
src/case/colorchooser/colorpicker/editor.colorpicker.hex.js

@ -39,7 +39,7 @@ BI.HexColorPickerEditor = BI.inherit(BI.Widget, {
allowBlank: true,
value: 255,
width: c.RGB_WIDTH,
height: 20,
height: 24,
listeners: [{
eventName: BI.TextEditor.EVENT_CHANGE,
action: function () {
@ -122,20 +122,20 @@ BI.HexColorPickerEditor = BI.inherit(BI.Widget, {
}, {
el: {
type: "bi.vertical_adapt",
columnSize: [16, 10, 'fill', 12, c.RGB_WIDTH, 12, c.RGB_WIDTH, 12, c.RGB_WIDTH],
columnSize: [22, 10, 'fill', 12, c.RGB_WIDTH, 12, c.RGB_WIDTH, 12, c.RGB_WIDTH],
rgap: 5,
items: [{
el: {
type: "bi.layout",
cls: "color-picker-editor-display bi-card bi-border",
height: 16,
width: 16,
height: 22,
width: 22,
ref: function (_ref) {
self.colorShow = _ref;
}
},
width: 16
width: 18
}, {
type: "bi.label",
text: "#",
@ -150,7 +150,7 @@ BI.HexColorPickerEditor = BI.inherit(BI.Widget, {
allowBlank: true,
errorText: BI.i18nText("BI-Color_Picker_Error_Text_Hex"),
width: c.HEX_WIDTH,
height: 20,
height: 24,
listeners: [{
eventName: "EVENT_CHANGE",
action: function () {
@ -239,11 +239,11 @@ BI.HexColorPickerEditor = BI.inherit(BI.Widget, {
_showPreColor: function (color) {
if (color === "") {
this.colorShow.element.css("background-color", "").removeClass("trans-color-background").addClass("auto-color-normal-background");
this.colorShow.element.css("background-color", "").removeClass("trans-color-background").addClass("auto-color-square-normal-background");
} else if (color === "transparent") {
this.colorShow.element.css("background-color", "").removeClass("auto-color-normal-background").addClass("trans-color-background");
this.colorShow.element.css("background-color", "").removeClass("auto-color-square-normal-background").addClass("trans-color-background");
} else {
this.colorShow.element.css({"background-color": color}).removeClass("auto-color-normal-background").removeClass("trans-color-background");
this.colorShow.element.css({"background-color": color}).removeClass("auto-color-square-normal-background").removeClass("trans-color-background");
}
},

14
src/case/colorchooser/colorpicker/editor.colorpicker.hex.simple.js

@ -13,7 +13,7 @@ BI.SimpleHexColorPickerEditor = BI.inherit(BI.Widget, {
props: {
baseCls: "bi-color-picker-editor",
height: 30
height: 36
},
render: function () {
@ -37,7 +37,7 @@ BI.SimpleHexColorPickerEditor = BI.inherit(BI.Widget, {
allowBlank: true,
value: 255,
width: c.RGB_WIDTH,
height: 20,
height: 24,
listeners: [{
eventName: BI.TextEditor.EVENT_CHANGE,
action: function () {
@ -58,18 +58,18 @@ BI.SimpleHexColorPickerEditor = BI.inherit(BI.Widget, {
el: {
type: "bi.vertical_adapt",
rgap: 5,
columnSize: [16, 10, 'fill', 12, c.RGB_WIDTH, 12, c.RGB_WIDTH, 12, c.RGB_WIDTH],
columnSize: [22, 10, 'fill', 12, c.RGB_WIDTH, 12, c.RGB_WIDTH, 12, c.RGB_WIDTH],
items: [{
el: {
type: "bi.layout",
cls: "color-picker-editor-display bi-card bi-border",
height: 16,
width: 16,
height: 22,
width: 22,
ref: function (_ref) {
self.colorShow = _ref;
}
},
width: 16,
width: 18,
}, {
type: "bi.label",
text: "#",
@ -84,7 +84,7 @@ BI.SimpleHexColorPickerEditor = BI.inherit(BI.Widget, {
allowBlank: true,
errorText: BI.i18nText("BI-Color_Picker_Error_Text_Hex"),
width: c.HEX_WIDTH,
height: 20,
height: 24,
listeners: [{
eventName: "EVENT_CHANGE",
action: function () {

18
src/case/ztree/jquery.ztree.excheck-3.5.js

@ -439,7 +439,23 @@
}
var chkName = setting.check.chkStyle + "_" + (node[checkedKey] ? c.TRUE : c.FALSE) + "_" + fullStyle;
chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName;
return consts.className.BUTTON + " " + c.DEFAULT + " " + chkName;
var chClass = consts.className.BUTTON + " " + c.DEFAULT + " " + chkName;
switch (chkName) {
case 'checkbox_true_part':
case 'checkbox_true_part_focus':
chClass += ' bi-half-button bi-high-light-border';
break;
case 'checkbox_true_full':
case 'checkbox_true_full_focus':
chClass += ' bi-checkbox checkbox-content bi-high-light-background active';
break;
case 'checkbox_false_full':
case 'checkbox_false_full_focus':
default:
chClass += ' bi-checkbox checkbox-content';
break;
}
return chClass;
},
repairAllChk: function(setting, checked) {
if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) {

140
src/core/4.widget.js

@ -40,7 +40,7 @@
cls: "",
css: null,
vdom: false
// vdom: false
});
},
@ -50,10 +50,16 @@
// 覆盖父类的_constructor方法,widget不走ob的生命周期
_constructed: function () {
var self = this;
if (this.setup) {
pushTarget(this);
this.service = this.setup(this.options);
this.render = BI.isPlainObject(this.service) ? this.service.render : this.service;
var delegate = this.setup(this.options);
if (BI.isPlainObject(delegate)) {
// 如果setup返回一个json,即对外暴露的方法
BI.extend(this, delegate);
} else {
this.render = delegate;
}
popTarget();
}
},
@ -189,9 +195,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);
// var widgets = this.element.data("__widgets") || [];
// widgets.push(this);
// this.element.data("__widgets", widgets);
this._initCurrent();
},
@ -237,52 +243,7 @@
var self = this;
var isMounted = this._isMounted;
this.__async === true && isMounted && callLifeHook(this, "beforeMount");
if (!this._initVNode()) {
var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
var els = render && render.call(this);
els = BI.Plugin.getRender(this.options.type, els);
if (BI.isPlainObject(els)) {
els = [els];
}
if (BI.isArray(els)) {
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);
}
},
_initVNode: function () {
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", this.vnode.elm.getAttribute("style"));
element.addClass(this.vnode.elm.getAttribute("class"));
element.empty();
BI.each(BI.jQuery(this.vnode.elm).children(), function (i, node) {
element.append(node);
});
return true;
}
return false;
},
_renderVNode: function () {
var self = this;
// if (!this._initVNode()) {
var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
var els = render && render.call(this);
els = BI.Plugin.getRender(this.options.type, els);
@ -290,20 +251,65 @@
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
BI._lazyCreateWidget(el, {
element: self
});
self.addWidget(w);
}
});
}
return BI.Element2Vnode(container);
// }
this._mount();
if (this.__async === true && isMounted) {
callLifeHook(this, "mounted");
this.fireEvent(BI.Events.MOUNT);
}
},
// _initVNode: function () {
// 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", this.vnode.elm.getAttribute("style"));
// element.addClass(this.vnode.elm.getAttribute("class"));
// element.empty();
// BI.each(BI.jQuery(this.vnode.elm).children(), function (i, node) {
// element.append(node);
// });
// return true;
// }
// return false;
// },
// _renderVNode: function () {
// var self = this;
// var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
// var els = render && render.call(this);
// els = BI.Plugin.getRender(this.options.type, els);
// 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;
},
@ -641,12 +647,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;
}
// if (this.options.vdom) {
// var vnode = this._renderVNode();
// BI.patchVNode(this.vnode, vnode);
// this.vnode = vnode;
// return;
// }
// this._isMounted = false;
// this.purgeListeners();
this._empty();
@ -701,6 +707,7 @@
return current.$storeDelegate;
}
if (current) {
var currentStore = current._store;
var delegate = {}, origin;
if (_global.Proxy) {
var proxy = new Proxy(delegate, {
@ -712,13 +719,14 @@
}
});
current._store = function () {
origin = _store.apply(this, arguments);
origin = (_store || currentStore).apply(this, arguments);
delegate.$delegate = origin;
return origin;
};
return current.$storeDelegate = proxy;
}
current._store = function () {
var st = _store.apply(this, arguments);
var st = (_store || currentStore).apply(this, arguments);
BI.extend(delegate, st);
return st;
};

2
src/core/5.shortcut.js

@ -25,8 +25,8 @@
BI.Widget.pushContext(context);
}
widget._initProps(config);
widget._constructed();
widget._initRoot();
widget._constructed();
// if (!lazy || config.element || config.root) {
widget._lazyConstructor();
// }

2
src/core/6.inject.js

@ -128,7 +128,7 @@
fn(providers[type]);
continue;
}
BI.Plugin.configWidget(type, fn);
BI.Plugin.configWidget(type, fn, conf.opt);
}
};
BI.config = BI.config || function (type, configFn, opt) {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save