Browse Source

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

research/test
Claire 10 months ago
parent
commit
3f4f732e33
  1. BIN
      packages/fineui/dist/font/iconfont.eot
  2. 8
      packages/fineui/dist/font/iconfont.svg
  3. BIN
      packages/fineui/dist/font/iconfont.ttf
  4. BIN
      packages/fineui/dist/font/iconfont.woff
  5. BIN
      packages/fineui/dist/font/iconfont.woff2
  6. 168
      packages/fineui/src/base/foundation/message.js
  7. 50
      packages/fineui/src/base/layer/layer.popover.js
  8. 26
      packages/fineui/src/case/button/switch.js
  9. 2
      packages/fineui/src/component/form/form.field.js
  10. 2
      packages/fineui/src/less/lib/colors.less
  11. 2
      packages/fineui/src/less/lib/constant.less
  12. 5
      packages/fineui/src/less/lib/font.less
  13. 5
      packages/fineui/src/less/resource/font.less
  14. 5
      packages/fineui/src/widget/multiselect/multiselect.loader.js
  15. 5
      packages/fineui/src/widget/multiselect/multiselect.loader.nobar.js
  16. 6
      packages/fineui/src/widget/searchmultitextvaluecombo/multitextvalue.loader.search.js
  17. 18
      packages/fineui/typescript/base/foundation/message.ts
  18. 5
      packages/fineui/typescript/case/button/switch.ts

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

Binary file not shown.

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

@ -14,6 +14,10 @@
/> />
<missing-glyph /> <missing-glyph />
<glyph glyph-name="quxiaohebing" unicode="&#60090;" d="M384 728a8 8 0 0 0-8-8H176v-672h200a8 8 0 0 0 8-8v-48a8 8 0 0 0-8-8H128a16 16 0 0 0-16 16V768a16 16 0 0 0 16 16h248a8 8 0 0 0 8-8v-48z m256-736a8 8 0 0 1 8-8h248a16 16 0 0 1 16 16V768a16 16 0 0 1-16 16h-248a8 8 0 0 1-8-8v-48a8 8 0 0 1 8-8h200v-672h-200a8 8 0 0 1-8-8v-48zM480 592a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8V776a8 8 0 0 1-8 8h-48a8 8 0 0 1-8-8v-184z m0-600a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8v184a8 8 0 0 1-8 8h-48a8 8 0 0 1-8-8v-184z m203.412 523.5a8 8 0 0 0 0-11.312l-120.344-120.344 120.344-120.344a8 8 0 0 0 0-11.312l-39.6-39.6a8 8 0 0 0-11.312 0l-120.344 120.344-122.9-122.9a8 8 0 0 0-11.312 0l-39.6 39.596a8 8 0 0 0 0 11.312l122.9 122.904-122.9 122.9a8 8 0 0 0 0 11.316l39.6 39.6a8 8 0 0 0 11.312 0l122.9-122.904 120.344 120.344a8 8 0 0 0 11.316 0l39.596-39.6z" horiz-adv-x="1024" />
<glyph glyph-name="chakanbiduixiangqing" unicode="&#60078;" d="M180 52V716h224v-449.884a331.58 331.58 0 0 0 68 118.616V768a16 16 0 0 1-16 16H128a16 16 0 0 1-16-16v-768a16 16 0 0 1 16-16h312.984A330.54 330.54 0 0 0 404 61.884V52H180zM912 768v-333.116a331.248 331.248 0 0 1-68 37.184V716h-224v-235.324a330.2 330.2 0 0 1-68-30.256V768a16 16 0 0 0 16 16h328a16 16 0 0 0 16-16z m48-600a231.996 231.996 0 0 0-45.328-137.76l80.28-80.28a8 8 0 0 0 0-11.316l-39.596-39.596a8 8 0 0 0-11.316 0l-80.592 80.592a232.024 232.024 0 0 0-299.496 24.312A232 232 0 1 0 960 168z m-400 0a168 168 0 1 1 336.004 0A168 168 0 0 1 560 168z" horiz-adv-x="1024" />
<glyph glyph-name="zhinengwenda" unicode="&#60077;" d="M561.404 272l55.864-38.192L732 160.684V272h164V736H276v-464h285.404z m20.596-91.608L541.616 208H260c-26.508 0-48 21.492-48 48V752c0 26.508 21.492 48 48 48h652c26.508 0 48-21.492 48-48v-496c0-26.508-21.492-48-48-48h-116v-105.656c0-25.264-27.896-40.564-49.2-26.988l-164.8 105.036zM184 524H112c-26.508 0-48-21.492-48-48v-342.688c0-26.512 21.492-48 48-48h116v-101.276c0-25.24 27.86-40.544 49.16-27.008l164.84 104.748 34.532 23.536h87.528v64h-107.264l-49.992-34.072L292 42.284v107.028H128V460h56V524zM696 644l-76-256h64l46 154.948L776 388h64l-76 256h-68zM532 518c0 34.24-27.76 62-62 62-34.24 0-62-27.76-62-62 0-34.24 27.76-62 62-62 34.24 0 62 27.76 62 62z m9.808-103.548A125.4 125.4 0 0 0 470 392C400.412 392 344 448.412 344 518S400.412 644 470 644 596 587.588 596 518c0-19.692-4.516-38.328-12.572-54.932l31.832-27.216-41.592-48.644-31.86 27.244z" horiz-adv-x="1024" /> <glyph glyph-name="zhinengwenda" unicode="&#60077;" d="M561.404 272l55.864-38.192L732 160.684V272h164V736H276v-464h285.404z m20.596-91.608L541.616 208H260c-26.508 0-48 21.492-48 48V752c0 26.508 21.492 48 48 48h652c26.508 0 48-21.492 48-48v-496c0-26.508-21.492-48-48-48h-116v-105.656c0-25.264-27.896-40.564-49.2-26.988l-164.8 105.036zM184 524H112c-26.508 0-48-21.492-48-48v-342.688c0-26.512 21.492-48 48-48h116v-101.276c0-25.24 27.86-40.544 49.16-27.008l164.84 104.748 34.532 23.536h87.528v64h-107.264l-49.992-34.072L292 42.284v107.028H128V460h56V524zM696 644l-76-256h64l46 154.948L776 388h64l-76 256h-68zM532 518c0 34.24-27.76 62-62 62-34.24 0-62-27.76-62-62 0-34.24 27.76-62 62-62 34.24 0 62 27.76 62 62z m9.808-103.548A125.4 125.4 0 0 0 470 392C400.412 392 344 448.412 344 518S400.412 644 470 644 596 587.588 596 518c0-19.692-4.516-38.328-12.572-54.932l31.832-27.216-41.592-48.644-31.86 27.244z" horiz-adv-x="1024" />
<glyph glyph-name="a-typeshujuzhongxinstatenormal" unicode="&#60076;" d="M920 624a16 16 0 0 1-16 16h-64a16 16 0 0 1-16-16v-480a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16V624z m-176 88a16 16 0 0 0 16-16v-624a16 16 0 0 0-16-16h-64a16 16 0 0 0-16 16V696a16 16 0 0 0 16 16h64z m-160 72a16 16 0 0 0 16-16v-768a16 16 0 0 0-16-16H128a16 16 0 0 0-16 16V768a16 16 0 0 0 16 16h456z m-116-136H244a8 8 0 0 1-8-8v-56a8 8 0 0 1 8-8h224a8 8 0 0 1 8 8V640a8 8 0 0 1-8 8z m8-160a8 8 0 0 1-8 8H244a8 8 0 0 1-8-8v-56a8 8 0 0 1 8-8h224a8 8 0 0 1 8 8v56z m-8-144H244a8 8 0 0 1-8-8v-56a8 8 0 0 1 8-8h224a8 8 0 0 1 8 8v56a8 8 0 0 1-8 8z m8-160a8 8 0 0 1-8 8H244a8 8 0 0 1-8-8v-56a8 8 0 0 1 8-8h224a8 8 0 0 1 8 8v56z" horiz-adv-x="1024" /> <glyph glyph-name="a-typeshujuzhongxinstatenormal" unicode="&#60076;" d="M920 624a16 16 0 0 1-16 16h-64a16 16 0 0 1-16-16v-480a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16V624z m-176 88a16 16 0 0 0 16-16v-624a16 16 0 0 0-16-16h-64a16 16 0 0 0-16 16V696a16 16 0 0 0 16 16h64z m-160 72a16 16 0 0 0 16-16v-768a16 16 0 0 0-16-16H128a16 16 0 0 0-16 16V768a16 16 0 0 0 16 16h456z m-116-136H244a8 8 0 0 1-8-8v-56a8 8 0 0 1 8-8h224a8 8 0 0 1 8 8V640a8 8 0 0 1-8 8z m8-160a8 8 0 0 1-8 8H244a8 8 0 0 1-8-8v-56a8 8 0 0 1 8-8h224a8 8 0 0 1 8 8v56z m-8-144H244a8 8 0 0 1-8-8v-56a8 8 0 0 1 8-8h224a8 8 0 0 1 8 8v56a8 8 0 0 1-8 8z m8-160a8 8 0 0 1-8 8H244a8 8 0 0 1-8-8v-56a8 8 0 0 1 8-8h224a8 8 0 0 1 8 8v56z" horiz-adv-x="1024" />
@ -1888,7 +1892,7 @@
<glyph glyph-name="normal63" unicode="&#59160;" d="M725.333333 704h85.333334a85.333333 85.333333 0 0 0 85.333333-85.333333v-512a85.333333 85.333333 0 0 0-85.333333-85.333334H213.333333a85.333333 85.333333 0 0 0-85.333333 85.333334v512a85.333333 85.333333 0 0 0 85.333333 85.333333h85.333334V725.333333a21.333333 21.333333 0 0 0 42.666666 0v-21.333333h341.333334V725.333333a21.333333 21.333333 0 1 0 42.666666 0v-21.333333z m0-42.666667V640a21.333333 21.333333 0 1 0-42.666666 0v21.333333H341.333333V640a21.333333 21.333333 0 0 0-42.666666 0v21.333333H213.333333a42.666667 42.666667 0 0 1-42.666666-42.666666v-85.333334h682.666666v85.333334a42.666667 42.666667 0 0 1-42.666666 42.666666h-85.333334z m-370.389333-237.824a159.530667 159.530667 0 0 0-34.56-27.264c-13.824-7.68-26.496-13.056-38.784-16.128v-41.472c25.344 7.296 46.464 18.816 62.976 34.56V149.333333h41.856v274.176h-31.488z m213.12 40.704l-134.4-353.28h35.712l134.016 353.28h-35.328z m135.552-40.704a159.530667 159.530667 0 0 0-34.56-27.264c-13.824-7.68-26.496-13.056-38.784-16.128v-41.472c25.344 7.296 46.464 18.816 62.976 34.56V149.333333h41.856v274.176h-31.488z" horiz-adv-x="1024" /> <glyph glyph-name="normal63" unicode="&#59160;" d="M725.333333 704h85.333334a85.333333 85.333333 0 0 0 85.333333-85.333333v-512a85.333333 85.333333 0 0 0-85.333333-85.333334H213.333333a85.333333 85.333333 0 0 0-85.333333 85.333334v512a85.333333 85.333333 0 0 0 85.333333 85.333333h85.333334V725.333333a21.333333 21.333333 0 0 0 42.666666 0v-21.333333h341.333334V725.333333a21.333333 21.333333 0 1 0 42.666666 0v-21.333333z m0-42.666667V640a21.333333 21.333333 0 1 0-42.666666 0v21.333333H341.333333V640a21.333333 21.333333 0 0 0-42.666666 0v21.333333H213.333333a42.666667 42.666667 0 0 1-42.666666-42.666666v-85.333334h682.666666v85.333334a42.666667 42.666667 0 0 1-42.666666 42.666666h-85.333334z m-370.389333-237.824a159.530667 159.530667 0 0 0-34.56-27.264c-13.824-7.68-26.496-13.056-38.784-16.128v-41.472c25.344 7.296 46.464 18.816 62.976 34.56V149.333333h41.856v274.176h-31.488z m213.12 40.704l-134.4-353.28h35.712l134.016 353.28h-35.328z m135.552-40.704a159.530667 159.530667 0 0 0-34.56-27.264c-13.824-7.68-26.496-13.056-38.784-16.128v-41.472c25.344 7.296 46.464 18.816 62.976 34.56V149.333333h41.856v274.176h-31.488z" horiz-adv-x="1024" />
<glyph glyph-name="ditupeizhi_fangda" unicode="&#59023;" d="M480 704a8 8 0 0 1-8-8v-272H200a8 8 0 0 1-8-8v-64a8 8 0 0 1 8-8h272v-272a8 8 0 0 1 8-8h64a8 8 0 0 1 8 8v272h272a8 8 0 0 1 8 8v64a8 8 0 0 1-8 8h-272V696a8 8 0 0 1-8 8h-64z" horiz-adv-x="1024" /> <glyph glyph-name="ditupeizhi_fangda" unicode="&#59023;" d="M552 736a8 8 0 0 1-8 8h-64a8 8 0 0 1-8-8v-312H160a8 8 0 0 1-8-8v-64a8 8 0 0 1 8-8h312v-312a8 8 0 0 1 8-8h64a8 8 0 0 1 8 8v312h312a8 8 0 0 1 8 8v64a8 8 0 0 1-8 8h-312V736z" horiz-adv-x="1024" />
<glyph glyph-name="cengjiziduan" unicode="&#59495;" d="M526.532 799.156a8 8 0 0 0 7.156 0L975.8 578.096c5.896-2.948 5.896-11.36 0-14.308l-442.112-221.056a8.016 8.016 0 0 0-7.156 0L84.424 563.788c-5.9 2.948-5.9 11.36 0 14.308L526.532 799.16zM229.548 570.944l300.564-150.28 300.56 150.28-300.56 150.28-300.56-150.28zM98.112 401.784a8 8 0 0 0 11.504 7.192l420.496-204.84 420.496 204.84a8 8 0 0 0 11.504-7.192v-59.216c0-3.048-1.732-5.832-4.468-7.176l-427.532-210.448-427.532 210.448a7.996 7.996 0 0 0-4.468 7.176v59.216zM109.62 190.53200000000004c-5.312 2.592-11.508-1.276-11.508-7.188v-57.724c0-3.032 1.712-5.804 4.424-7.16l427.576-213.516 427.572 213.516a8.008 8.008 0 0 1 4.428 7.16v57.724a8 8 0 0 1-11.508 7.188l-420.492-205.248-420.492 205.248z" horiz-adv-x="1024" /> <glyph glyph-name="cengjiziduan" unicode="&#59495;" d="M526.532 799.156a8 8 0 0 0 7.156 0L975.8 578.096c5.896-2.948 5.896-11.36 0-14.308l-442.112-221.056a8.016 8.016 0 0 0-7.156 0L84.424 563.788c-5.9 2.948-5.9 11.36 0 14.308L526.532 799.16zM229.548 570.944l300.564-150.28 300.56 150.28-300.56 150.28-300.56-150.28zM98.112 401.784a8 8 0 0 0 11.504 7.192l420.496-204.84 420.496 204.84a8 8 0 0 0 11.504-7.192v-59.216c0-3.048-1.732-5.832-4.468-7.176l-427.532-210.448-427.532 210.448a7.996 7.996 0 0 0-4.468 7.176v59.216zM109.62 190.53200000000004c-5.312 2.592-11.508-1.276-11.508-7.188v-57.724c0-3.032 1.712-5.804 4.424-7.16l427.576-213.516 427.572 213.516a8.008 8.008 0 0 1 4.428 7.16v57.724a8 8 0 0 1-11.508 7.188l-420.492-205.248-420.492 205.248z" horiz-adv-x="1024" />
@ -1900,7 +1904,7 @@
<glyph glyph-name="normal65" unicode="&#59162;" d="M725.333333 704h85.333334a85.333333 85.333333 0 0 0 85.333333-85.333333v-512a85.333333 85.333333 0 0 0-85.333333-85.333334H213.333333a85.333333 85.333333 0 0 0-85.333333 85.333334v512a85.333333 85.333333 0 0 0 85.333333 85.333333h85.333334V725.333333a21.333333 21.333333 0 0 0 42.666666 0v-21.333333h341.333334V725.333333a21.333333 21.333333 0 1 0 42.666666 0v-21.333333z m0-42.666667V640a21.333333 21.333333 0 1 0-42.666666 0v21.333333H341.333333V640a21.333333 21.333333 0 0 0-42.666666 0v21.333333H213.333333a42.666667 42.666667 0 0 1-42.666666-42.666666v-85.333334h682.666666v85.333334a42.666667 42.666667 0 0 1-42.666666 42.666666h-85.333334zM384 426.666667v-42.666667h384v42.666667H384z m-128-256v-42.666667h384v42.666667H256z m0 128v-42.666667h512v42.666667H256z" horiz-adv-x="1024" /> <glyph glyph-name="normal65" unicode="&#59162;" d="M725.333333 704h85.333334a85.333333 85.333333 0 0 0 85.333333-85.333333v-512a85.333333 85.333333 0 0 0-85.333333-85.333334H213.333333a85.333333 85.333333 0 0 0-85.333333 85.333334v512a85.333333 85.333333 0 0 0 85.333333 85.333333h85.333334V725.333333a21.333333 21.333333 0 0 0 42.666666 0v-21.333333h341.333334V725.333333a21.333333 21.333333 0 1 0 42.666666 0v-21.333333z m0-42.666667V640a21.333333 21.333333 0 1 0-42.666666 0v21.333333H341.333333V640a21.333333 21.333333 0 0 0-42.666666 0v21.333333H213.333333a42.666667 42.666667 0 0 1-42.666666-42.666666v-85.333334h682.666666v85.333334a42.666667 42.666667 0 0 1-42.666666 42.666666h-85.333334zM384 426.666667v-42.666667h384v42.666667H384z m-128-256v-42.666667h384v42.666667H256z m0 128v-42.666667h512v42.666667H256z" horiz-adv-x="1024" />
<glyph glyph-name="ditupeizhi_suoxiao" unicode="&#59025;" d="M192 416a8 8 0 0 0 8 8h624a8 8 0 0 0 8-8v-64a8 8 0 0 0-8-8H200a8 8 0 0 0-8 8v64z" horiz-adv-x="1024" /> <glyph glyph-name="ditupeizhi_suoxiao" unicode="&#59025;" d="M152 416a8 8 0 0 0 8 8h704a8 8 0 0 0 8-8v-64a8 8 0 0 0-8-8H160a8 8 0 0 0-8 8v64z" 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" /> <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: 1012 KiB

After

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

168
packages/fineui/src/base/foundation/message.js

@ -17,30 +17,48 @@ import {
i18nText, i18nText,
KeyCode, KeyCode,
isPlainObject, isPlainObject,
SIZE_CONSANTS SIZE_CONSANTS,
CenterAdaptLayout,
VerticalLayout,
HTapeLayout,
RightVerticalAdaptLayout
} from "../../core"; } from "../../core";
import { Toast } from "../single"; import { Button, IconLabel, Label, Toast } from "../single";
export const Msg = (() => { let $mask, $pop;
let $mask, $pop;
const messageShows = []; const messageShows = [];
const toastStack = []; const toastStack = [];
const defaultConfig = { const AlertLevel = {
buttonHeight: 24, WARNING: 'warning',
}; INFO: 'info',
ERROR: 'error',
SUCCESS: 'success',
}
return { function getIconCls(level) {
alert(title, message, callback, config = defaultConfig) { switch (level) {
this._show(false, title, message, callback, config); case AlertLevel.ERROR:
}, return 'alert-error-font';
confirm(title, message, callback, config = defaultConfig) { case AlertLevel.SUCCESS:
this._show(true, title, message, callback, config); return 'alert-success-font';
case AlertLevel.INFO:
return 'alert-info-font';
case AlertLevel.WARNING:
default:
return 'alert-warning-font';
}
}
export const Msg = {
alert(title, message, callback, config) {
_show(false, title, message, callback, config);
}, },
prompt(title, message, value, callback, min_width) { confirm(title, message, callback, config) {
// Msg.prompt(title, message, value, callback, min_width); _show(true, title, message, callback, config);
}, },
toast(message, options, context) { toast(message, options, context) {
isString(options) && (options = { level: options }); isString(options) && (options = { level: options });
@ -101,7 +119,16 @@ export const Msg = (() => {
toast.destroy?.(); toast.destroy?.();
}; };
}, },
_show(hasCancel, title, message, callback, config) { };
function _show(hasCancel, title, message, callback, config = {}) {
config = {
buttonHeight: 28,
cancelText: i18nText("BI-Basic_Cancel"),
sureText: i18nText("BI-Basic_OK"),
level: AlertLevel.WARNING,
...config,
}
isNull($mask) && isNull($mask) &&
($mask = Widget._renderEngine ($mask = Widget._renderEngine
.createElement("<div class=\"bi-z-index-mask\">") .createElement("<div class=\"bi-z-index-mask\">")
@ -140,9 +167,9 @@ export const Msg = (() => {
if (hasCancel === true) { if (hasCancel === true) {
controlItems.push({ controlItems.push({
el: { el: {
type: "bi.button", type: Button.xtype,
height: config.buttonHeight, height: config.buttonHeight,
text: i18nText("BI-Basic_Cancel"), text: config.cancelText,
light: true, light: true,
handler() { handler() {
close(); close();
@ -155,9 +182,9 @@ export const Msg = (() => {
} }
controlItems.push({ controlItems.push({
el: { el: {
type: "bi.button", type: Button.xtype,
height: config.buttonHeight, height: config.buttonHeight,
text: i18nText("BI-Basic_OK"), text: config.sureText,
handler() { handler() {
close(); close();
if (isFunction(callback)) { if (isFunction(callback)) {
@ -168,10 +195,13 @@ export const Msg = (() => {
}); });
const conf = { const conf = {
element: $pop, element: $pop,
type: "bi.center_adapt", type: CenterAdaptLayout.xtype,
items: [ items: [
{ {
type: "bi.border", type: VerticalLayout.xtype,
cls: "bi-card bi-border-radius",
width: 450,
hgap: 32,
attributes: { attributes: {
tabIndex: 1, tabIndex: 1,
}, },
@ -196,79 +226,61 @@ export const Msg = (() => {
} catch (e) { } catch (e) {
} }
}, },
cls: "bi-card", items: [
items: { {
north: {
el: {
type: "bi.border",
cls: "bi-message-title bi-background",
items: {
center: {
el: { el: {
type: "bi.label", type: HTapeLayout.xtype,
cls: "bi-font-bold", height: 24,
text: title || i18nText("BI-Basic_Prompt"), items: [
textAlign: "left", {
hgap: 20, type: IconLabel.xtype,
height: 40, cls: `${getIconCls(config.level)} icon-size-20`,
}, width: 24,
height: 24,
}, },
east: { {
el: { el: {
type: "bi.icon_button", type: Label.xtype,
cls: "bi-message-close close-font", css: {"font-size": 16},
// height: 50, cls: 'bi-font-bold', // 16px
handler() { textAlign: 'left',
close(); text: title || i18nText('BI-Basic_Prompt'),
if (isFunction(callback)) { lgap: 16,
callback.apply(null, [false]);
}
},
},
width: 56,
}, },
width: 'fill',
}, },
],
}, },
height: 40, tgap: 32,
}, },
center: { {
el: isPlainObject(message) el: isPlainObject(message)
? message ? message
: { : {
type: "bi.label", type: Label.xtype,
vgap: 10, css: { "font-size": 14 },
hgap: 20, cls: 'alert-content',
whiteSpace: "normal", textAlign: 'left',
text: message, text: message,
whiteSpace: 'normal',
}, },
height: 'fill',
tgap: 12,
lgap: 40,
}, },
south: {
el: {
type: "bi.absolute",
items: [
{ {
el: { el: config.footer && isFunction(config.footer) ? config.footer(close) : {
type: "bi.right_vertical_adapt", type: RightVerticalAdaptLayout.xtype,
lgap: 10, lgap: 12,
items: controlItems, items: controlItems,
}, },
top: 0, tgap: 32,
left: 20, bgap: 24,
right: 20,
bottom: 0,
}
],
},
height: 44,
}, },
],
}, },
width: 450,
height: 200,
}
], ],
}; };
messageShows[messageShows.length] = createWidget(conf); messageShows[messageShows.length] = createWidget(conf);
}, }
};
})();

50
packages/fineui/src/base/layer/layer.popover.js

@ -47,7 +47,7 @@ export class Popover extends Widget {
body: null, body: null,
footer: null, footer: null,
footerHeight: 44, footerHeight: 44,
footerButtonHeight: 24, footerButtonHeight: 28,
closable: true, // BI-40839 是否显示右上角的关闭按钮 closable: true, // BI-40839 是否显示右上角的关闭按钮
bodyHgap: SIZE_CONSANTS.H_GAP_SIZE, bodyHgap: SIZE_CONSANTS.H_GAP_SIZE,
bodyTgap: SIZE_CONSANTS.V_GAP_SIZE, bodyTgap: SIZE_CONSANTS.V_GAP_SIZE,
@ -64,30 +64,7 @@ export class Popover extends Widget {
// var self = this; // var self = this;
const { header, headerHeight, closable, logic, footer, footerHeight, body, bodyTgap, bodyHgap } = this.options; const { header, headerHeight, closable, logic, footer, footerHeight, body, bodyTgap, bodyHgap } = this.options;
const c = this._constant; const c = this._constant;
this.startX = 0;
this.startY = 0;
const size = this._calculateSize(); const size = this._calculateSize();
const bodyDom = getOuterBody();
this.tracker = new MouseMoveTracker(
(deltaX, deltaY) => {
const W = Widget._renderEngine.createElement(bodyDom).width();
const H = Widget._renderEngine.createElement(bodyDom).height();
this.startX += deltaX;
this.startY += deltaY;
this.element.css({
left: `${clamp(this.startX, 0, W - this.element.width())}px`,
top: `${clamp(this.startY, 0, H - this.element.height())}px`,
});
// BI-12134 没有什么特别好的方法
Resizers._resize({
target: this.element[0],
});
},
() => {
this.tracker.releaseMouseMoves();
},
_global
);
const items = [ const items = [
{ {
el: { el: {
@ -219,7 +196,30 @@ export class Popover extends Widget {
// mounted之后绑定事件 // mounted之后绑定事件
mounted() { mounted() {
this.dragger.element.mousedown(e => { this.startX = 0;
this.startY = 0;
const bodyDom = getOuterBody();
this.tracker = new MouseMoveTracker(
(deltaX, deltaY) => {
const W = Widget._renderEngine.createElement(bodyDom).width();
const H = Widget._renderEngine.createElement(bodyDom).height();
this.startX += deltaX;
this.startY += deltaY;
this.element.css({
left: `${clamp(this.startX, 0, W - this.element.width())}px`,
top: `${clamp(this.startY, 0, H - this.element.height())}px`,
});
// BI-12134 没有什么特别好的方法
Resizers._resize({
target: this.element[0],
});
},
() => {
this.tracker.releaseMouseMoves();
},
_global
);
this.dragger?.element.mousedown(e => {
if (this.options.draggable !== false) { if (this.options.draggable !== false) {
this.startX = this.element[0].offsetLeft; this.startX = this.element[0].offsetLeft;
this.startY = this.element[0].offsetTop; this.startY = this.element[0].offsetTop;

26
packages/fineui/src/case/button/switch.js

@ -1,15 +1,13 @@
import { AbsoluteLayout, shortcut, i18nText } from "@/core"; import { AbsoluteLayout, shortcut, i18nText } from "@/core";
import { TextButton, Label, BasicButton } from "@/base"; import { TextButton, Label, BasicButton } from "@/base";
const CIRCLE_SIZE = 12;
@shortcut() @shortcut()
export class Switch extends BasicButton { export class Switch extends BasicButton {
static xtype = "bi.switch"; static xtype = "bi.switch";
static EVENT_CHANGE = "EVENT_CHANGE"; static EVENT_CHANGE = "EVENT_CHANGE";
constants = {
CIRCLE_SIZE: 12,
};
props = { props = {
extraCls: "bi-switch", extraCls: "bi-switch",
attributes: { attributes: {
@ -18,12 +16,12 @@ export class Switch extends BasicButton {
height: 20, height: 20,
width: 44, width: 44,
showTip: false, showTip: false,
textGap: 8,
}; };
render() { render() {
const o = this.options, const { selected, width, height, textGap, showTip } = this.options;
c = this.constants; const tgap = (height - CIRCLE_SIZE) / 2;
const tgap = (o.height - c.CIRCLE_SIZE) / 2;
return { return {
type: AbsoluteLayout.xtype, type: AbsoluteLayout.xtype,
@ -39,15 +37,15 @@ export class Switch extends BasicButton {
width: 12, width: 12,
height: 12, height: 12,
top: tgap, top: tgap,
left: o.selected ? 28 : 4, left: selected ? width - height + tgap : tgap,
}, },
{ {
type: Label.xtype, type: Label.xtype,
text: i18nText("BI-Basic_Simple_Open"), text: i18nText("BI-Basic_Simple_Open"),
cls: "content-tip", cls: "content-tip",
left: 8, left: textGap,
top: tgap - 2, top: tgap - 2,
invisible: !(o.showTip && o.selected), invisible: !(showTip && selected),
ref: _ref => { ref: _ref => {
this.openTip = _ref; this.openTip = _ref;
}, },
@ -56,9 +54,9 @@ export class Switch extends BasicButton {
type: Label.xtype, type: Label.xtype,
text: i18nText("BI-Basic_Simple_Close"), text: i18nText("BI-Basic_Simple_Close"),
cls: "content-tip", cls: "content-tip",
right: 8, right: textGap,
top: tgap - 2, top: tgap - 2,
invisible: !(o.showTip && !o.selected), invisible: !(showTip && !selected),
ref: _ref => { ref: _ref => {
this.closeTip = _ref; this.closeTip = _ref;
}, },
@ -78,7 +76,9 @@ export class Switch extends BasicButton {
setSelected(v) { setSelected(v) {
super.setSelected(...arguments); super.setSelected(...arguments);
this.layout.attr("items")[0].left = v ? 28 : 4; const { width, height } = this.options;
const tgap = (height - CIRCLE_SIZE) / 2;
this.layout.attr("items")[0].left = v ? width - height + tgap : tgap;
this.layout.resize(); this.layout.resize();
this.options.showTip && this.openTip.setVisible(v); this.options.showTip && this.openTip.setVisible(v);
this.options.showTip && this.closeTip.setVisible(!v); this.options.showTip && this.closeTip.setVisible(!v);

2
packages/fineui/src/component/form/form.field.js

@ -69,7 +69,7 @@ export class FormField extends Widget {
return { return {
type: VerticalAdaptLayout.xtype, type: VerticalAdaptLayout.xtype,
columnSize: ["auto", "fill"], columnSize: isKey(o.label) ? ["auto", "fill"] : ["fill"],
verticalAlign: VerticalAlign.Stretch, verticalAlign: VerticalAlign.Stretch,
items: isKey(o.label) items: isKey(o.label)
? [ ? [

2
packages/fineui/src/less/lib/colors.less

@ -132,3 +132,5 @@
@color-bi-border-warning: @border-color-warning; @color-bi-border-warning: @border-color-warning;
//边框提亮 //边框提亮
@color-bi-border-highlight: @border-color-highlight; @color-bi-border-highlight: @border-color-highlight;
@color-bi-alert-warning: @color-bi-orange;

2
packages/fineui/src/less/lib/constant.less

@ -248,3 +248,5 @@
//box-shadow效果 //box-shadow效果
@box-shadow-toast: 0 6px 20px -2px rgba(9, 30, 64, 0.16); @box-shadow-toast: 0 6px 20px -2px rgba(9, 30, 64, 0.16);
@color-bi-orange: #f0ac3c;

5
packages/fineui/src/less/lib/font.less

@ -58,3 +58,8 @@
@font-key: "e1d0"; @font-key: "e1d0";
@font-add: "e1c7"; @font-add: "e1c7";
@font-alert-warning: 'e755';
@font-alert-success: 'e6de';
@font-alert-info: 'e74b';
@font-alert-error: 'e757';

5
packages/fineui/src/less/resource/font.less

@ -118,3 +118,8 @@
.font(text-align-left-font, @font-align-left); .font(text-align-left-font, @font-align-left);
.font(text-align-center-font, @font-align-center); .font(text-align-center-font, @font-align-center);
.font(text-align-right-font, @font-align-right); .font(text-align-right-font, @font-align-right);
.font(alert-success-font, @font-alert-success, @color-sea-green-100);
.font(alert-warning-font, @font-alert-warning, @color-bi-alert-warning);
.font(alert-error-font, @font-alert-error, @color-red-100);
.font(alert-info-font, @font-alert-info, @color-bi-text-highlight);

5
packages/fineui/src/widget/multiselect/multiselect.loader.js

@ -107,7 +107,10 @@ export class MultiSelectLoader extends Widget {
} }
firstItems = self._createItems(json); firstItems = self._createItems(json);
} }
callback(firstItems.concat(self._createItems(ob.items)), ob.keyword || ""); const context = {
tipText: ob.tipText,
};
callback(firstItems.concat(self._createItems(ob.items)), ob.keyword || "", context);
if (op.times === 1 && self.storeValue) { if (op.times === 1 && self.storeValue) {
isKey(startValue) && isKey(startValue) &&
(self.storeValue.type === Selection.All (self.storeValue.type === Selection.All

5
packages/fineui/src/widget/multiselect/multiselect.loader.nobar.js

@ -115,7 +115,10 @@ export class MultiSelectNoBarLoader extends Widget {
} }
firstItems = self._createItems(json); firstItems = self._createItems(json);
} }
callback(firstItems.concat(self._createItems(ob.items)), ob.keyword || ""); const context = {
tipText: ob.tipText,
};
callback(firstItems.concat(self._createItems(ob.items)), ob.keyword || "", context);
if (op.times === 1 && self.storeValue) { if (op.times === 1 && self.storeValue) {
isKey(startValue) && isKey(startValue) &&
(self.storeValue.type === Selection.All (self.storeValue.type === Selection.All

6
packages/fineui/src/widget/searchmultitextvaluecombo/multitextvalue.loader.search.js

@ -120,8 +120,10 @@ export class SearchMultiSelectLoader extends Widget {
} }
firstItems = this._createItems(json); firstItems = this._createItems(json);
} }
const context = {
callback(firstItems.concat(this._createItems(ob.items)), ob.keyword || ""); tipText: ob.tipText,
};
callback(firstItems.concat(this._createItems(ob.items)), ob.keyword || "", context);
if (op.times === 1 && this.storeValue) { if (op.times === 1 && this.storeValue) {
isKey(startValue) && isKey(startValue) &&
(this.storeValue.type === Selection.All (this.storeValue.type === Selection.All

18
packages/fineui/typescript/base/foundation/message.ts

@ -8,13 +8,23 @@ type toastOptions = {
export declare namespace Msg { export declare namespace Msg {
function alert(title: string, message?: string | { function alert(title: string, message?: string | {
[key: string]: any [key: string]: any
}, callback?: (result?: boolean) => void): void }, callback?: (result?: boolean) => void, config?: {
buttonHeight?: number,
sureText?: string,
cancelText?: string,
level?: 'success' | 'warning' | 'error' | 'info',
footer?: (onClose: Function) => Obj;
}): void
function confirm(title: string, message?: string | { function confirm(title: string, message?: string | {
[key: string]: any [key: string]: any
}, callback?: (result: boolean) => void): void }, callback?: (result: boolean) => void, config?: {
buttonHeight?: number,
function prompt(title: string, message?: string, value?: any, callback?: (result: string) => void, minWidth?: number): void sureText?: string,
cancelText?: string,
level?: 'success' | 'warning' | 'error' | 'info',
footer?: (onClose: Function) => Obj;
}): void
function toast(message: string | Obj, options?: toastOptions | string, context?: HTMLElement): Function function toast(message: string | Obj, options?: toastOptions | string, context?: HTMLElement): Function
} }

5
packages/fineui/typescript/case/button/switch.ts

@ -1,6 +1,11 @@
import { BasicButton } from "../../base/single/button/button.basic"; import { BasicButton } from "../../base/single/button/button.basic";
export declare class Switch extends BasicButton { export declare class Switch extends BasicButton {
props: {
textGap: number;
} & BasicButton['props']
static xtype: string; static xtype: string;
static EVENT_CHANGE: string; static EVENT_CHANGE: string;
} }

Loading…
Cancel
Save