Browse Source

Merge pull request #252423 in DEC/fineui from release/11.0 to final/11.0

* commit '600c1433604bea478f1c59447253bfca358bf57c':
  无jira fix:VirtualGroup
  KERNEL-15856 fix:把字体和CSS带上
  KERNEL-15856 fix:兼容定时调度
  BI-134832 feat: router view支持removeTab
  无JIRA任务 custom_tree支持hasNext
  无JIRA任务 custom_tree + bi.loader,populate的时候会导致“无更多数据”消失
  无JIRA任务 custom_tree + bi.loader,populate的时候会导致“无更多数据”消失
  BI-128199 更新图标
  BI-129568 fix: 分页间距优化-先回退6016考虑
  BI-129568 fix: 白色背景相反色值调整&分页间距优化
  无JIRA任务 custom_tree支持hasNext
  无JRIA 打包失败
  KERNEL-16294 fix: 导出适配1、导出widgetEngin构造的Element没有width方法,通过css设置 2、打包添加基本控件fineuiwithoutjquery = worker+基本控件
  无jira任务 回退
  无jira任务 多余空行
  无jira任务 导出缺失
  fix(BI-134501): 主线不找最外层body
research/test
superman 8 months ago
parent
commit
d14f57b727
  1. 8
      package.json
  2. BIN
      packages/fineui/dist/font/iconfont.eot
  3. 16
      packages/fineui/dist/font/iconfont.svg
  4. BIN
      packages/fineui/dist/font/iconfont.ttf
  5. BIN
      packages/fineui/dist/font/iconfont.woff
  6. BIN
      packages/fineui/dist/font/iconfont.woff2
  7. 4
      packages/fineui/package.json
  8. 6
      packages/fineui/src/base/combination/group.virtual.js
  9. 4
      packages/fineui/src/base/combination/loader.js
  10. 6
      packages/fineui/src/base/tree/customtree.js
  11. 53
      packages/fineui/src/case/pager/pager.direction.js
  12. 9
      packages/fineui/src/core/5.inject.js
  13. 96
      packages/fineui/src/core/platform/web/jquery/jquery.polyfill.js
  14. 2
      packages/fineui/src/core/utils/color.js
  15. 1
      packages/fineui/src/core/utils/dom.js
  16. 6
      packages/fineui/src/core/wrapper/layout/flex/flex.horizontal.js
  17. 10
      packages/fineui/src/router/router.js
  18. 14
      packages/fineui/src/without_Jquery_Polyfill.js
  19. 13
      packages/fineui/webpack/attachments.js
  20. 2
      packages/fineui/webpack/webpack.common.js
  21. 7
      packages/fineui/webpack/webpack.dev.js
  22. 48
      packages/fineui/webpack/webpack.prod.js

8
package.json

@ -41,17 +41,17 @@
"less-loader": "^11.1.0",
"mini-css-extract-plugin": "^2.7.5",
"npm-run-all": "^4.1.5",
"prettier": "^3.0.0",
"postcss": "^8.4.21",
"postcss-loader": "^7.1.0",
"prettier": "^3.0.0",
"style-loader": "^3.3.1",
"terser-webpack-plugin": "^5.3.7",
"ts-node": "^10.9.1",
"typescript": "^4.9.5",
"webpack": "^5.75.0",
"webpack-bundle-analyzer": "^4.8.0",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.11.1",
"webpack-merge": "^5.8.0"
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
}
}

BIN
packages/fineui/dist/font/iconfont.eot vendored

Binary file not shown.

16
packages/fineui/dist/font/iconfont.svg vendored

@ -14,6 +14,18 @@
/>
<missing-glyph />
<glyph glyph-name="a-yibiaobanon1" unicode="&#60054;" d="M64 760a16 16 0 0 0 16 16h752a16 16 0 0 0 16-16v-319.412a512.868 512.868 0 0 1-64 23.076V496H128v-440h122.88c1.384-1.384 2.784-2.772 4.196-4.156 20.868-20.48 44.452-40.848 70.872-59.844H80a16 16 0 0 0-16 16V760z m64-200h656V712H128v-152zM693.764 154.64a90.808 90.808 0 0 1 6.308 33.36c0 50.624-41.352 91.66-92.36 91.66-17.52 0-33.904-4.84-47.86-13.248l-108.104 90.228c43.24 23.468 95.068 39.36 156.252 39.36 114.392 0 196.076-55.544 250.072-112.32 27.06-28.46 46.884-56.98 59.892-78.324A416.532 416.532 0 0 0 928 188a416.532 416.532 0 0 0-10.036-17.356c-13.008-21.344-32.832-49.864-59.892-78.324a410.2 410.2 0 0 0-42.748-39.14l-121.56 101.46zM386.148 310.748a419.988 419.988 0 0 1-28.22-27.068c-27.06-28.46-46.88-56.98-59.892-78.324A420.464 420.464 0 0 1 288 188a420.464 420.464 0 0 1 10.036-17.356c13.008-21.344 32.832-49.864 59.892-78.324C411.924 35.54 493.608-20 608-20c52.884 0 98.78 11.872 138.18 30.248l-108.896 90.892a92.884 92.884 0 0 0-29.572-4.8c-51.008 0-92.36 41.036-92.36 91.66 0 4.764 0.364 9.444 1.072 14.016l-130.28 108.732z" horiz-adv-x="1024" />
<glyph glyph-name="yanshimoshi" unicode="&#60052;" d="M779.444 546.72a8 8 0 0 0 0.052-11.312l-195.292-196.988a8 8 0 0 0-11.316-0.048l-148.984 147.696-126.336-127.432a8 8 0 0 0-11.312-0.052l-39.768 39.428a8 8 0 0 0-0.052 11.312l171.396 172.888a8 8 0 0 0 11.316 0.048l148.984-147.7 150.232 151.54a8 8 0 0 0 11.312 0.048l39.768-39.428zM72 756a8 8 0 0 1-8-8v-52a8 8 0 0 1 8-8h56v-492a16 16 0 0 1 16-16h296l-122.344-122.344a8 8 0 0 1 0-11.312l33.944-33.94a7.992 7.992 0 0 1 11.312 0l150.528 150.524 148.516-148.516a8 8 0 0 1 11.312 0l33.94 33.94a7.996 7.996 0 0 1 0 11.316L586.876 180H880a16 16 0 0 1 16 16V688h56a8 8 0 0 1 8 8V748a8 8 0 0 1-8 8H72z m128-72h624v-432H200V684z" horiz-adv-x="1024" />
<glyph glyph-name="yanshimoshi-1" unicode="&#60053;" d="M447.564 634.628a8 8 0 0 0 11.312 0l33.94-33.94a7.992 7.992 0 0 0 0-11.316L403.444 500h328.74a8 8 0 0 0 8-8v-48a8 8 0 0 0-8-8h-329.24l87.044-87.044a8 8 0 0 0 0-11.312l-33.94-33.944a8 8 0 0 0-11.312 0l-158.392 158.392a8.004 8.004 0 0 0 0 11.316l161.22 161.22zM64 748a8 8 0 0 0 8 8h880a8 8 0 0 0 8-8v-52a8 8 0 0 0-8-8h-56v-492a16 16 0 0 0-16-16h-293.124l120.332-120.332a7.996 7.996 0 0 0 0-11.316l-33.94-33.94a8 8 0 0 0-11.312 0l-148.516 148.516-150.528-150.524a7.992 7.992 0 0 0-11.312 0l-33.944 33.94a8 8 0 0 0 0 11.312L440 180H144a16 16 0 0 0-16 16V688H72a8 8 0 0 0-8 8V748z m136-496h624V684H200v-432z" horiz-adv-x="1024" />
<glyph glyph-name="a-fangxiangzhijiaosanjiaochicunzhengchang" unicode="&#60051;" d="M230.628 64c-14.256 0-21.392 17.236-11.312 27.316L804.684 676.688c10.08 10.08 27.312 2.94 27.312-11.312V80a16 16 0 0 0-16-16H230.628z" horiz-adv-x="1024" />
<glyph glyph-name="yiguolv3" unicode="&#60008;" d="M828 784a8 8 0 0 1-8 8H48a8 8 0 0 1-8-8v-80a8 8 0 0 1 8-8h112l171.048-324.448c0.624-1.164 0.952-2.464 0.952-3.784v-440.02a8 8 0 0 1 8.416-7.992c1.056 0.056 2.012 0.572 2.856 1.208l110.16 83.156C419.688 54.39599999999996 400 114.89999999999998 400 180c0 124.976 72.552 233.008 177.836 284.276L700 696h120a8 8 0 0 1 8 8V784zM984 180c0-148.012-119.988-268-268-268s-268 119.988-268 268 119.988 268 268 268 268-119.988 268-268z m-114.204 141.392l-204.564-204.572-105.82 105.82-52.48-52.476 158.3-158.3 257.044 257.048-52.48 52.48z" horiz-adv-x="1024" />
<glyph glyph-name="zichanxiangqing" unicode="&#60050;" d="M914.672 30.24A231.996 231.996 0 0 1 728 400a232 232 0 1 1 135.448-420.36l80.592-80.592a8 8 0 0 1 11.316 0l39.596 39.596a8 8 0 0 1 0 11.316l-80.28 80.28z m-305.464 18.964a168 168 0 1 0 237.588 237.592 168 168 0 0 0-237.588-237.592zM509.268 819.156a8 8 0 0 0 7.156 0l444-213.904c5.896-2.948 5.896-11.36 0-14.312l-444-211.788a8.016 8.016 0 0 0-7.156 0L64.424 590.94c-5.9 2.948-5.9 11.36 0 14.312l444.844 213.904zM216 598.096L512.844 460 808 598.096 512.844 740 216 598.096zM94.04 177.684a8 8 0 0 1-11.508-7.188v-61.824a8 8 0 0 1 4.428-7.156L440-71.544v83.516l-345.96 165.712z m345.96-15.068l-353 170.484a8.008 8.008 0 0 0-4.464 7.18v64.656a8 8 0 0 0 11.5 7.192L440 246.776v-84.16z" horiz-adv-x="1024" />
<glyph glyph-name="a-hengxiangonwanzhengonchicunda" unicode="&#60049;" d="M8 512a8 8 0 0 1-8-8v-48a8 8 0 0 1 8-8h1008a8 8 0 0 1 8 8V504a8 8 0 0 1-8 8H8z m0-192a8 8 0 0 1-8-8v-48a8 8 0 0 1 8-8h1008a8 8 0 0 1 8 8v48a8 8 0 0 1-8 8H8z" horiz-adv-x="1024" />
<glyph glyph-name="a-leixingjiesanzuhe" unicode="&#60048;" d="M384 306.316L589.684 512 672 594.316l92.028 92.028a8 8 0 0 0 11.316 0l39.596-39.6a8 8 0 0 0 0-11.312L723.508 544 640 460.492 435.508 256 352 172.492l-91.432-91.432a8 8 0 0 0-11.312 0l-39.6 39.596a8 8 0 0 0 0 11.316L301.684 224 384 306.316zM384 512h115.176l72 72H328a16 16 0 0 1-16-16v-243.176l72 72V512z m288 256v-83.176l-72-72V712H184v-416h99.176l-72-72H128a16 16 0 0 0-16 16V768a16 16 0 0 0 16 16h528a16 16 0 0 0 16-16z m70.02-296l72 72H896a16 16 0 0 0 16-16v-528a16 16 0 0 0-16-16H368a16 16 0 0 0-16 16v81.98l72 72V56h416V472h-97.98zM696 184h-241.98l72 72H640v113.98l72 72V200a16 16 0 0 0-16-16z" horiz-adv-x="1024" />
@ -24,7 +36,7 @@
<glyph glyph-name="a-shituyichuzuhe" unicode="&#60045;" d="M184 296V712h416v-128H328a16 16 0 0 1-16-16v-272H184z m712 288h-224V768a16 16 0 0 1-16 16H128a16 16 0 0 1-16-16v-528a16 16 0 0 1 16-16h184v-224a16 16 0 0 1 16-16h568a16 16 0 0 1 16 16V568a16 16 0 0 1-16 16zM384 512h456v-456H384V512z m348.28-116a8 8 0 0 1-8 8h-56a8 8 0 0 1-8-8v-109.364l-123.712 123.708a8 8 0 0 1-11.312 0l-39.6-39.596a8 8 0 0 1 0-11.316L609.092 236H500a8 8 0 0 1-8-8v-56a8 8 0 0 1 8-8h224.28a8 8 0 0 1 8 8v224z" horiz-adv-x="1024" />
<glyph glyph-name="a-shituzuhe" unicode="&#60044;" d="M384 256v-200h456V512h-200V712H184v-456h200z m-256-72a16 16 0 0 0-16 16V768a16 16 0 0 0 16 16h568a16 16 0 0 0 16-16v-184h184a16 16 0 0 0 16-16v-568a16 16 0 0 0-16-16H328a16 16 0 0 0-16 16v184H128z m360 456a8 8 0 0 0 8-8v-224a8 8 0 0 0-8-8H264a8 8 0 0 0-8 8v56a8 8 0 0 0 8 8h109.088L249.656 595.432a8 8 0 0 0 0 11.312l39.6 39.6a8 8 0 0 0 11.312 0L424 522.912V632a8 8 0 0 0 8 8h56z m40-504a8 8 0 0 1 8-8h56a8 8 0 0 1 8 8v109.088l122.536-122.536a8 8 0 0 1 11.316 0l39.596 39.596a8 8 0 0 1 0 11.316L650.912 296H760a8 8 0 0 1 8 8v56a8 8 0 0 1-8 8h-224a8 8 0 0 1-8-8v-224z" horiz-adv-x="1024" />
<glyph glyph-name="a-shituzuhe" unicode="&#60044;" d="M384 184v64a8 8 0 0 1-8 8H184V712h456v-192a8 8 0 0 1 8-8h192v-456H384v128z m-256 0h184v-184a16 16 0 0 1 16-16h568a16 16 0 0 1 16 16V568a16 16 0 0 1-16 16h-184V768a16 16 0 0 1-16 16H128a16 16 0 0 1-16-16v-568a16 16 0 0 1 16-16z m408 384a8 8 0 0 0 8 8h48a8 8 0 0 0 8-8v-48a8 8 0 0 0-8-8h-48a8 8 0 0 0-8 8V568z m104-104a8 8 0 0 0 8 8h48a8 8 0 0 0 8-8v-48a8 8 0 0 0-8-8h-48a8 8 0 0 0-8 8v48z m-312-104a8 8 0 0 1-8-8v-48a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8v48a8 8 0 0 1-8 8H328z m312-4a8 8 0 0 0 8 8h48a8 8 0 0 0 8-8v-48a8 8 0 0 0-8-8h-48a8 8 0 0 0-8 8v48z m-208-100a8 8 0 0 1-8-8v-48a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8v48a8 8 0 0 1-8 8h-48z m100-8a8 8 0 0 0 8 8h48a8 8 0 0 0 8-8v-48a8 8 0 0 0-8-8h-48a8 8 0 0 0-8 8v48z m116 8a8 8 0 0 1-8-8v-48a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8v48a8 8 0 0 1-8 8h-48z m-328 204a8 8 0 0 0 8 8h48a8 8 0 0 0 8-8v-48a8 8 0 0 0-8-8H328a8 8 0 0 0-8 8v48z m8 116a8 8 0 0 1-8-8v-48a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8V568a8 8 0 0 1-8 8H328z m100-8a8 8 0 0 0 8 8h48a8 8 0 0 0 8-8v-48a8 8 0 0 0-8-8h-48a8 8 0 0 0-8 8V568z" horiz-adv-x="1024" />
<glyph glyph-name="yonghu-kuan" unicode="&#60043;" d="M648.376 379.356C699.316 419.648 732 482.008 732 552c0 121.504-98.496 220-220 220S292 673.504 292 552c0-69.992 32.684-132.352 83.624-172.644C228.616 324.156 124 182.296 124 16c0-4.148 0.064-8.284 0.196-12.404A7.88 7.88 0 0 1 132.112-4h55.996c4.616 0 8.264 3.892 8.096 8.504A321.8 321.8 0 0 0 196 16c0 174.52 141.48 316 316 316s316-141.48 316-316c0-3.848-0.068-7.68-0.204-11.496-0.168-4.612 3.484-8.504 8.096-8.504h55.996a7.88 7.88 0 0 1 7.916 7.596c0.132 4.12 0.196 8.256 0.196 12.404 0 166.296-104.616 308.156-251.624 363.356zM512 404c-81.74 0-148 66.26-148 148 0 81.736 66.26 148 148 148s148-66.264 148-148c0-81.74-66.26-148-148-148z" horiz-adv-x="1024" />
@ -96,8 +108,6 @@
<glyph glyph-name="meiyouquanxian" unicode="&#60009;" d="M252 416c0 4.42 2.956 8 6.6 8h514.8c3.644 0 6.6-3.58 6.6-8v-64c0-4.42-2.956-8-6.6-8H258.6c-3.644 0-6.6 3.58-6.6 8v64z" horiz-adv-x="1032" />
<glyph glyph-name="a-Frame7738" unicode="&#60008;" d="M8 512a8 8 0 0 1-8-8v-48a8 8 0 0 1 8-8h1008a8 8 0 0 1 8 8V504a8 8 0 0 1-8 8H8z m0-192a8 8 0 0 1-8-8v-48a8 8 0 0 1 8-8h1008a8 8 0 0 1 8 8v48a8 8 0 0 1-8 8H8z" horiz-adv-x="5120" />
<glyph glyph-name="liuliangjiankong" unicode="&#60007;" d="M665.6 384a25.6 25.6 0 0 1-51.2 0A102.4 102.4 0 0 0 512 281.6a25.6 25.6 0 1 1 0-51.2A153.6 153.6 0 0 1 665.6 384zM768 390.72C768 245.632 653.44 128 512 128S256 245.632 256 390.72c0 117.632 168.256 346.688 231.936 429.248a30.08 30.08 0 0 0 48.128 0C599.68 737.408 768 508.352 768 390.72z m-64 0c0 15.68-6.208 41.984-21.888 78.72a933.632 933.632 0 0 1-60.48 114.304A2143.36 2143.36 0 0 1 512 744.704a2143.36 2143.36 0 0 1-109.632-160.96c-24.128-39.68-45.44-78.976-60.48-114.24C326.208 432.64 320 406.4 320 390.784c0-108.864 85.952-197.12 192-197.12s192 88.256 192 197.12z m-544.512-366.4a82.752 82.752 0 0 1 107.712 0 146.752 146.752 0 0 0 190.976 0 82.752 82.752 0 0 1 107.648 0 146.752 146.752 0 0 0 190.976 0 82.752 82.752 0 0 1 107.712 0l74.688 64a32 32 0 1 0 41.6-48.64l-74.624-64a146.688 146.688 0 0 0-190.976 0 82.752 82.752 0 0 1-107.712 0 146.752 146.752 0 0 0-190.976 0 82.752 82.752 0 0 1-107.712 0 146.752 146.752 0 0 0-190.976 0l-74.624 64a32 32 0 1 0 41.6 48.64l74.688-64zM258.88 181.376a82.752 82.752 0 0 0-99.392 6.272l-50.368 43.136a32 32 0 0 1-41.6-48.64l50.304-43.136a146.752 146.752 0 0 1 187.136-3.2 312.576 312.576 0 0 0-46.08 45.568z m460.16-45.504c54.848-43.904 133.44-42.88 187.136 3.2l50.368 43.136a32 32 0 0 1-41.664 48.64l-50.368-43.2a82.752 82.752 0 0 0-99.392-6.272c-13.696-16.64-29.12-31.936-46.08-45.504z" horiz-adv-x="1024" />
<glyph glyph-name="quanxian" unicode="&#60006;" d="M438.46 784c4.52 0 8.832-1.916 11.868-5.272l106.296-117.58a15.996 15.996 0 0 1 11.868-5.272h326.46a16 16 0 0 0 16-16V400h-64.568V587.656h-308.828l-116.408 123.936H176.564v-607.184H480V32H128a16 16 0 0 0-16 16V768a16 16 0 0 0 16 16h310.46zM314.264 524.16a8 8 0 0 0 0 11.312L359.516 580.72a8 8 0 0 0 11.316 0l271.38-271.38C674.72 331.228 713.868 344 756 344c112.668 0 204-91.332 204-204 0-112.664-91.332-204-204-204-112.664 0-204 91.336-204 204 0 41.608 12.46 80.308 33.848 112.572l-69.556 69.552-61.552-61.552a8 8 0 0 0-11.312 0l-45.256 45.256a8 8 0 0 0 0 11.316l61.552 61.552-45.256 45.256-101.788-101.788a8 8 0 0 0-11.312 0l-45.256 45.252a8 8 0 0 0 0 11.316l101.788 101.788-43.64 43.64zM756 8c72.904 0 132 59.1 132 132 0 72.904-59.096 132-132 132-72.9 0-132-59.096-132-132 0-72.9 59.1-132 132-132z" horiz-adv-x="1024" />

Before

Width:  |  Height:  |  Size: 981 KiB

After

Width:  |  Height:  |  Size: 985 KiB

BIN
packages/fineui/dist/font/iconfont.ttf vendored

Binary file not shown.

BIN
packages/fineui/dist/font/iconfont.woff vendored

Binary file not shown.

BIN
packages/fineui/dist/font/iconfont.woff2 vendored

Binary file not shown.

4
packages/fineui/package.json

@ -28,7 +28,9 @@
"prepublishToPrivate": "npm run build && node ./lib/prepublish.js",
"publishToPrivate": "npm publish",
"tsc": "tsc",
"link": "pnpm link --global"
"link": "pnpm link --global",
"build:biCss": "cross-env LESS_CONFIG_PATH=bi.lessconfig.json LESS_FILE_NAME=bi npm run webpack:css",
"build:jsyCss": "cross-env LESS_CONFIG_PATH=jsy.lessconfig.json LESS_FILE_NAME=jsy npm run webpack:css"
},
"files": [
"dist",

6
packages/fineui/src/base/combination/group.virtual.js

@ -56,7 +56,7 @@ export class VirtualGroup extends Widget {
_packageBtns(items) {
const o = this.options;
const map = (this.buttonMap = {});
const btMap = (this.buttonMap = {});
const layouts = isArray(o.layouts) ? o.layouts : [o.layouts];
for (let i = layouts.length - 1; i > 0; i--) {
items = map(items, (k, it) => {
@ -68,8 +68,8 @@ export class VirtualGroup extends Widget {
el: extend(
{
ref: _ref => {
if (isKey(map[el.value])) {
map[el.value] = _ref;
if (isKey(btMap[el.value])) {
btMap[el.value] = _ref;
}
},
},

4
packages/fineui/src/base/combination/loader.js

@ -204,7 +204,7 @@ export class Loader extends Widget {
{
times: this.times,
count: this.count,
}
}, this.options
]);
}
@ -218,7 +218,7 @@ export class Loader extends Widget {
{
times: this.times,
count: this.count,
}
}, this.options
]);
}

6
packages/fineui/src/base/tree/customtree.js

@ -105,6 +105,7 @@ export class CustomTree extends Widget {
return itemsCreator.apply(this, args);
};
isNull(item.popup.el) && (item.popup.el = deepClone(this.options.el));
item.popup.el.node = item.el;
items.push(item);
} else {
items.push(node);
@ -122,9 +123,8 @@ export class CustomTree extends Widget {
itemsCreator: (op, callback) => {
itemsCreator.apply(this, [
op,
items => {
const args = Array.prototype.slice.call(arguments, 0);
args[0] = this._formatItems(items);
(...args) => {
args[0] = this._formatItems(args[0]);
callback(...args);
}
]);

53
packages/fineui/src/case/pager/pager.direction.js

@ -40,6 +40,11 @@ export class DirectionPager extends Widget {
}
_init() {
super._init(...arguments);
this.ITEM_GAP = 0;
this.ITEM_WIDTH = this.options.height - 2 * this.ITEM_GAP;
this.MIDDLE_GAP = 16;
this._createVPager();
this._createHPager();
this.layout = createWidget({
@ -49,23 +54,23 @@ export class DirectionPager extends Widget {
items: [
{
el: this.vpager,
top: 0,
right: 86,
top: this.ITEM_GAP,
right: this.ITEM_WIDTH * 3 + this.MIDDLE_GAP,
},
{
el: this.vlabel,
top: 0,
right: 110,
top: this.ITEM_GAP,
right: this.ITEM_WIDTH * 4 + this.MIDDLE_GAP,
},
{
el: this.hpager,
top: 0,
top: this.ITEM_GAP,
right: 0,
},
{
el: this.hlabel,
top: 0,
right: 24,
top: this.ITEM_GAP,
right: this.ITEM_WIDTH,
}
],
});
@ -75,20 +80,20 @@ export class DirectionPager extends Widget {
const v = this.options.vertical;
this.vlabel = createWidget({
type: Label.xtype,
width: 24,
height: 24,
width: this.ITEM_WIDTH,
height: this.ITEM_WIDTH,
value: v.curr,
title: v.curr,
invisible: true,
});
this.vpager = createWidget({
type: Pager.xtype,
width: 72,
width: this.ITEM_WIDTH * 3,
layouts: [
{
type: HorizontalLayout.xtype,
scrollx: false,
rgap: 24,
rgap: this.ITEM_WIDTH,
}
],
invisible: true,
@ -105,8 +110,8 @@ export class DirectionPager extends Widget {
value: "prev",
title: i18nText("BI-Up_Page"),
warningTitle: i18nText("BI-Current_Is_First_Page"),
height: 22,
width: 22,
height: this.ITEM_WIDTH - 2,
width: this.ITEM_WIDTH - 2,
cls: "bi-border bi-border-radius direction-pager-prev column-pre-page-h-font bi-list-item-select2",
},
next: {
@ -114,8 +119,8 @@ export class DirectionPager extends Widget {
value: "next",
title: i18nText("BI-Down_Page"),
warningTitle: i18nText("BI-Current_Is_Last_Page"),
height: 22,
width: 22,
height: this.ITEM_WIDTH - 2,
width: this.ITEM_WIDTH - 2,
cls: "bi-border bi-border-radius direction-pager-next column-next-page-h-font bi-list-item-select2",
},
@ -137,20 +142,20 @@ export class DirectionPager extends Widget {
const h = this.options.horizontal;
this.hlabel = createWidget({
type: Label.xtype,
width: 24,
height: 24,
width: this.ITEM_WIDTH,
height: this.ITEM_WIDTH,
value: h.curr,
title: h.curr,
invisible: true,
});
this.hpager = createWidget({
type: Pager.xtype,
width: 72,
width: this.ITEM_WIDTH * 3,
layouts: [
{
type: HorizontalLayout.xtype,
scrollx: false,
rgap: 24,
rgap: this.ITEM_WIDTH,
}
],
invisible: true,
@ -167,8 +172,8 @@ export class DirectionPager extends Widget {
value: "prev",
title: i18nText("BI-Left_Page"),
warningTitle: i18nText("BI-Current_Is_First_Page"),
height: 22,
width: 22,
height: this.ITEM_WIDTH - 2,
width: this.ITEM_WIDTH - 2,
cls: "bi-border bi-border-radius direction-pager-prev row-pre-page-h-font bi-list-item-select2",
},
next: {
@ -176,8 +181,8 @@ export class DirectionPager extends Widget {
value: "next",
title: i18nText("BI-Right_Page"),
warningTitle: i18nText("BI-Current_Is_Last_Page"),
height: 22,
width: 22,
height: this.ITEM_WIDTH - 2,
width: this.ITEM_WIDTH - 2,
cls: "bi-border bi-border-radius direction-pager-next row-next-page-h-font bi-list-item-select2",
},
@ -260,7 +265,7 @@ export class DirectionPager extends Widget {
vShow = true;
}
this.setVisible(hShow || vShow);
const num = [86, 110, 0, 24];
const num = [this.ITEM_WIDTH * 3 + this.MIDDLE_GAP, this.ITEM_WIDTH * 4 + this.MIDDLE_GAP, 0, this.ITEM_WIDTH];
const items = this.layout.attr("items");
if (vShow === true && hShow === true) {

9
packages/fineui/src/core/5.inject.js

@ -601,3 +601,12 @@ export function getResource(type, config) {
}
throw new Error("unknown type: [" + type + "] undefined");
}
/**
* 根据 xtype 获取已被注册的类
* @param {string} xtype
* @returns
*/
export function getClass(xtype) {
return kv[xtype] || serviceInjection[xtype];
}

96
packages/fineui/src/core/platform/web/jquery/jquery.polyfill.js

@ -1,96 +0,0 @@
/**
* 用于 jquery worker 环境或者 V8 引擎的 polyfill
*/
// import { _global } from "@/core/0.foundation";
const _global = globalThis;
const document = {};
const fakeElement = Object.create(document);
Object.assign(document, {
parentNode: null,
nodeType: 9,
head: fakeElement,
body: fakeElement,
ownerDocument: document,
documentElement: document,
toString() {
return "FakeDocument";
},
appendChild(child) {
return child;
},
implementation: {
createHTMLDocument() {
return {
body: {
childNodes: [],
},
};
},
createDocumentFragment() {
return this;
},
},
getElementById() {
return fakeElement;
},
createElement() {
return fakeElement;
},
createDocumentFragment() {
return this;
},
cloneNode() {
return this;
},
getElementsByTagName() {
return [fakeElement];
},
getElementsByClassName() {
return [fakeElement];
},
setAttribute() {
return null;
},
getAttribute() {
return null;
},
removeChild() {
return null;
},
addEventListener() {
return null;
},
removeEventListener() {
return null;
},
});
Object.assign(fakeElement, {
nodeType: 1,
style: {},
ownerDocument: document,
parentNod: fakeElement,
firstChild: fakeElement,
lastChild: fakeElement,
toString() {
return "FakeElement";
},
});
function polyfillProps(key, obj) {
_global[key] = _global[key] || obj;
if (typeof obj === "object") {
try {
Object.assign(_global[key], obj);
} catch(err) {
// _global[key] 可能只有 get 方法
}
}
}
_global.window = _global;
polyfillProps("XMLHttpRequest", function () {});
polyfillProps("document", document);

2
packages/fineui/src/core/utils/color.js

@ -42,7 +42,7 @@ export function getContrastColor(color) {
return "#FFFFFF";
}
return "#3D4D66";
return "#091e40";
}
export function rgb2hex(rgbColour) {

1
packages/fineui/src/core/utils/dom.js

@ -803,5 +803,6 @@ export function getOuterBody() {
// body = parentWindow.document.body;
// } catch (e) {}
// return body;
return document.body;
}

6
packages/fineui/src/core/wrapper/layout/flex/flex.horizontal.js

@ -51,7 +51,7 @@ export class FlexHorizontalLayout extends Layout {
if (o.columnSize.length > 0) {
return o.columnSize.indexOf("fill") >= 0 || o.columnSize.indexOf("auto") >= 0;
}
return some(o.items, (i, item) => {
if (item.width === "fill" || item.width === "auto") {
return true;
@ -87,7 +87,7 @@ export class FlexHorizontalLayout extends Layout {
}
}
if (columnSize > 0) {
w.element.width(this._optimiseGap(columnSize));
w.element.css({ width: this._optimiseGap(columnSize) });
}
if (columnSize === "fill") {
w.element.addClass("f-f");
@ -103,7 +103,7 @@ export class FlexHorizontalLayout extends Layout {
w.element.addClass("l-c");
}
this._handleGap(w, item, i);
return w;
}

10
packages/fineui/src/router/router.js

@ -1,4 +1,4 @@
import { nextTick, shortcut, Widget, isNotNull, each } from '@/core';
import {nextTick, shortcut, Widget, isNotNull, each, any, isEqual} from '@/core';
import { Tab } from '@/base';
import { Router } from './0.router';
import { Fix } from '../fix';
@ -3134,6 +3134,14 @@ export class RouterView extends Widget {
};
}
removeTab(path) {
this.tab.removeTab(path);
}
setSelect(path) {
this.tab.setSelect(path);
}
destroyed() {
// BI.remove方法会把第二个参数当迭代器执行导致方法多执行一遍
cbs.splice(cbs.indexOf(this._callbackListener), 1);

14
packages/fineui/src/without_Jquery_Polyfill.js

@ -0,0 +1,14 @@
export * from './worker.js';
// "!src/base/single/input/file.js",
// "!src/case/ztree/**/*.js",
import * as _case from './case';
import * as _widget from './widget';
import { _global } from "@/core/0.foundation";
const fuiExport = {
..._case,
..._widget
};
Object.assign(_global.BI, fuiExport);

13
packages/fineui/webpack/attachments.js

@ -1,6 +1,5 @@
const { sync, uniq } = require("./utils");
const jqueryPolyfill = "./src/core/platform/web/jquery/jquery.polyfill.js";
const configJS = "./src/core/platform/web/config.js";
const runtimePolyfill = ["core-js/stable"];
@ -8,7 +7,7 @@ const runtimePolyfill = ["core-js/stable"];
const basicAttachmentMap = {
polyfill: sync(["src/polyfill/**/*.js"]).concat(runtimePolyfill),
resource: sync(["src/less/resource/**/*.less"]),
font: sync(["public/less/font.less"]),
font: sync(["ui/less/font.less"]),
ts: ["./typescript/bundle.ts"],
ui: sync(["ui/less/app.less", "ui/less/**/*.less",]),
less: sync([
@ -21,6 +20,7 @@ const basicAttachmentMap = {
]),
js_bundle: sync(["src/bundle.js"]),
js_worker: sync(["src/worker.js"]),
js_without_Jquery_polyfill: sync(["src/without_Jquery_Polyfill.js"]),
};
const bundleCss = uniq([].concat(basicAttachmentMap.less, basicAttachmentMap.ui, sync(["public/less/app.less", "public/less/**/*.less"])));
@ -38,8 +38,17 @@ const fineuiForWorker = [].concat(
basicAttachmentMap.ts
);
const fineuiWithout_Jquery_Polyfill = [].concat(
bundleCss,
basicAttachmentMap.polyfill,
basicAttachmentMap.js_bundle,
basicAttachmentMap.ts
);
module.exports = {
fineui: uniq(fineui),
fineuiForWorker: uniq(fineuiForWorker),
fineuiWithout_Jquery_Polyfill: uniq(fineuiWithout_Jquery_Polyfill),
bundleCss,
font: uniq(basicAttachmentMap.font)
};

2
packages/fineui/webpack/webpack.common.js

@ -25,6 +25,8 @@ function git(command) {
module.exports = {
entry: {
fineui: attachments.fineui,
"fineui.worker": attachments.fineuiForWorker,
"fineui_without_jquery_polyfill": attachments.fineuiWithout_Jquery_Polyfill,
},
externals: {
lodash: "_",

7
packages/fineui/webpack/webpack.dev.js

@ -16,5 +16,12 @@ module.exports = merge(common, {
devServer: {
port: 9001,
// liveReload: true,
client: {
logging: 'error',
overlay: {
errors: true,
warnings: false,
},
},
}
});

48
packages/fineui/webpack/webpack.prod.js

@ -1,24 +1,24 @@
const common = require("./webpack.common.js");
const { merge } = require("webpack-merge");
const dirs = require("./dirs");
const attachments = require("./attachments");
module.exports = merge(common, {
mode: "production",
target: ["web", "es5"],
entry: {
"fineui.min": attachments.fineui,
"fineui.worker.min": attachments.fineuiForWorker,
"fineui.worker": attachments.fineuiForWorker,
"fineui_without_jquery_polyfill.min":attachments.fineuiForWorker,
},
output: {
path: dirs.DEST,
filename: "[name].js",
publicPath: ""
},
devtool: "hidden-source-map"
});
const common = require("./webpack.common.js");
const { merge } = require("webpack-merge");
const dirs = require("./dirs");
const attachments = require("./attachments");
module.exports = merge(common, {
mode: "production",
target: ["web", "es5"],
entry: {
"fineui.min": attachments.fineui,
"fineui.worker.min": attachments.fineuiForWorker,
"fineui_without_jquery_polyfill.min": attachments.fineuiWithout_Jquery_Polyfill,
"font": attachments.font
},
output: {
path: dirs.DEST,
filename: "[name].js",
publicPath: ""
},
devtool: "hidden-source-map"
});

Loading…
Cancel
Save