Browse Source

Merge remote-tracking branch 'origin/master'

es6
imp 3 years ago
parent
commit
61b2802fb5
  1. BIN
      dist/font/iconfont.eot
  2. 12
      dist/font/iconfont.svg
  3. BIN
      dist/font/iconfont.ttf
  4. BIN
      dist/font/iconfont.woff
  5. BIN
      dist/font/iconfont.woff2
  6. 4
      package.json
  7. 2
      src/base/combination/bubble.js
  8. 32
      src/base/combination/combo.js
  9. 68
      src/base/layer/layer.popup.js
  10. 75
      src/base/single/button/listitem/blankiconicontextitem.js
  11. 81
      src/base/single/button/listitem/blankicontexticonitem.js
  12. 62
      src/base/single/button/listitem/blankicontextitem.js
  13. 76
      src/base/single/button/listitem/icontexticonitem.js
  14. 55
      src/base/single/button/listitem/icontextitem.js
  15. 56
      src/base/single/button/listitem/texticonitem.js
  16. 76
      src/base/single/button/node/icontexticonnode.js
  17. 54
      src/base/single/button/node/icontextnode.js
  18. 54
      src/base/single/button/node/texticonnode.js
  19. 4
      src/base/single/input/input.js
  20. 53
      src/case/ztree/0.treeview.js
  21. 20
      src/case/ztree/1.asynctree.js
  22. 2
      src/case/ztree/jquery.ztree.excheck-3.5.js
  23. 2
      src/less/base/colorchooser/colorchooser.trigger.less
  24. 61
      src/less/base/combo/combo.bubble.less
  25. 4
      src/less/base/single/input/checkbox.less
  26. 4
      src/less/base/single/input/radio.less
  27. 1
      src/less/base/single/label.less
  28. 1
      src/less/base/single/text.less
  29. 25
      src/less/base/tree/ztree.less
  30. 18
      src/less/base/view/popupview.less
  31. 3
      typescript/index.ts
  32. 9
      typescript/widget/downlist/popup.downlist.ts

BIN
dist/font/iconfont.eot vendored

Binary file not shown.

12
dist/font/iconfont.svg vendored

@ -14,6 +14,18 @@
/> />
<missing-glyph /> <missing-glyph />
<glyph glyph-name="niantie" unicode="&#59540;" d="M128 608a32 32 0 0 0 32-32v-512a32 32 0 0 1 32-32h512a32 32 0 1 0 0-64H192A96 96 0 0 0 96 64V576a32 32 0 0 0 32 32z m704 192A96 96 0 0 0 928 704v-512a96 96 0 0 0-96-96H320A96 96 0 0 0 224 192V704A96 96 0 0 0 320 800z m0-64H320a32 32 0 0 1-32-32v-512a32 32 0 0 1 32-32h512a32 32 0 0 1 32 32V704a32 32 0 0 1-32 32z m-256-64c17.664 0 32-16.384 32-36.608L607.936 480h155.456c20.224 0 36.608-14.336 36.608-32s-16.384-32-36.608-32H607.936v-155.52c0-20.16-14.272-36.48-32-36.48-17.6 0-32 16.32-32 36.48V416H388.48c-20.16 0-36.48 14.336-36.48 32s16.32 32 36.48 32H544V635.392c0 20.224 14.4 36.608 32 36.608z" horiz-adv-x="1024" />
<glyph glyph-name="kaiqishoushi" unicode="&#59538;" d="M878.592-5.312l25.088 450.88a96.192 96.192 0 0 1-90.752 101.76L587.264 559.36V736a128 128 0 0 1-128 128l-9.536-0.32A128 128 0 0 1 331.328 736l-0.064-336.832-7.232 4.928a128 128 0 0 1-172.864-181.888l183.552-262.144 6.272-8.32 6.976-7.68 4.864-4.544-1.92 2.304c18.048-23.68 46.08-37.824 76.416-37.824h355.456a96 96 0 0 1 95.808 90.688z m-38.784 455.104l-25.088-451.584a32 32 0 0 0-32-30.208H427.392a31.808 31.808 0 0 0-21.504 8.32l-8.448 9.088a62.848 62.848 0 0 0-10.24 11.392L203.52 258.944a64 64 0 0 0 104.832 73.408l86.848-124.16V736a64 64 0 1 0 128 0v-176.64a64 64 0 0 1 60.608-63.936l225.664-11.968a32 32 0 0 0 30.272-33.664z" horiz-adv-x="1024" />
<glyph glyph-name="jinyongshoushi" unicode="&#59539;" d="M341.12-60.16l-4.48 4.224a120.96 120.96 0 0 0-3.52 3.84l-3.392 3.84-6.336 8.32-183.552 262.144a128 128 0 0 0 172.928 181.888l7.168-4.928L320 736A128 128 0 0 0 438.4 863.68L448 864a128 128 0 0 0 128-128L575.936 559.36l225.664-12.096a96 96 0 0 0 90.88-91.712l-0.064-9.28-3.328-60.672c-1.216-21.76-26.368-34.112-46.144-24.96a29.76 29.76 0 0 0-17.856 28.16l3.392 60.8a32 32 0 0 1-30.272 33.792l-225.664 12.032A64 64 0 0 0 512 559.36V736a64 64 0 1 1-128 0v-527.872l-86.848 124.16a64 64 0 1 1-104.896-73.344l183.552-262.144a62.72 62.72 0 0 1 10.24-11.392l8.448-9.152c5.824-5.248 13.44-8.256 21.504-8.256l109.184-0.064c6.976 0 13.504-3.2 18.112-8.448 15.616-17.856 3.648-55.552-20.096-55.552L416-96c-29.44 0-56.768 13.44-74.88 35.84zM928 128a192 192 0 1 1-384 0 192 192 0 0 1 384 0z m-226.24-123.392l123.968 214.72a128 128 0 0 0-123.968-214.656zM608 128a128 128 0 0 0 162.24 123.392l-123.968-214.72A127.616 127.616 0 0 0 608 128z" horiz-adv-x="1024" />
<glyph glyph-name="yunhangjiedian" unicode="&#59535;" d="M512 800a416 416 0 1 0 0-832 416 416 0 0 0 0 832z m0-64a352 352 0 1 1 0-704 352 352 0 0 1 0 704zM434.24 537.408c5.76 0 11.456-1.664 16.192-4.864l189.696-126.528a29.184 29.184 0 0 0 0-48.576l-189.696-126.528a29.184 29.184 0 0 0-45.376 24.32V508.16c0 16.128 13.12 29.184 29.184 29.184z" horiz-adv-x="1024" />
<glyph glyph-name="quanxuan" unicode="&#59537;" d="M672 672a128 128 0 0 0 128-128v-448a128 128 0 0 0-128-128h-448a128 128 0 0 0-128 128v448a128 128 0 0 0 128 128h448z m0-64h-448a64 64 0 0 1-63.552-56.512L160 544v-448a64 64 0 0 1 56.512-63.552l7.488-0.448h448a64 64 0 0 1 63.552 56.512l0.448 7.488v448a64 64 0 0 1-56.512 63.552L672 608z m96 192a160 160 0 0 0 159.68-149.504L928 640v-512a32 32 0 0 0-63.488-5.76L864 128V640a96 96 0 0 1-86.784 95.552L768 736H320a32 32 0 0 0-5.76 63.488L320 800h448z m-101.952-319.424a32 32 0 0 0 5.504-40.64l-3.52-4.544-225.088-245.824c-0.32-0.32-0.768-0.64-1.344-1.28a51.2 51.2 0 0 0-67.328-1.088l-4.992 4.864-119.04 132.032a32 32 0 0 0 43.264 46.784l4.224-3.84 109.632-121.664L620.8 478.592a32 32 0 0 0 45.248 1.984z" horiz-adv-x="1024" />
<glyph glyph-name="yunhangjiedianjixiayou" unicode="&#59536;" d="M800 224a128 128 0 1 0-123.968-160.064L448 64v117.12l64 37.44V128h164.032a128 128 0 0 0 123.968 96z m0-64a64 64 0 1 1 0-128 64 64 0 0 1 0 128zM391.808 554.368c3.968 0 7.872-1.088 11.328-3.072l241.984-141.76a22.528 22.528 0 0 0 0-38.848L403.2 228.928a22.528 22.528 0 0 0-33.92 19.392V531.84c0 12.416 10.048 22.528 22.528 22.528zM800 800a128 128 0 1 0-123.968-160.064L512 640v-78.336l-64 37.504V640l-100.032-0.064a128 128 0 1 0 0 64.064h328.064A128 128 0 0 0 800 800z m-576-64a64 64 0 1 1 0-128 64 64 0 0 1 0 128z m576 0a64 64 0 1 1 0-128 64 64 0 0 1 0 128z" horiz-adv-x="1024" />
<glyph glyph-name="biduishanchu" unicode="&#59534;" d="M625.7664 810.666667V725.333333c0-123.016533 97.621333-223.232 219.579733-227.4304l7.9872-0.136533 113.7664 0.034133v-512c0-31.4368-25.463467-56.900267-56.866133-56.900266H113.7664c-31.402667 0-56.866133 25.463467-56.866133 56.866133v768c0 31.402667 25.463467 56.900267 56.866133 56.900267h512zM341.333333 327.099733H227.566933a28.433067 28.433067 0 0 1-28.228266-24.849066l-0.238934-3.584v-227.566934c0-14.506667 10.8544-26.453333 24.917334-28.228266l3.549866-0.2048H341.333333a28.433067 28.433067 0 0 1 28.228267 24.8832l0.2048 3.549866V298.666667a28.433067 28.433067 0 0 1-28.433067 28.433066z m227.566934 170.666667h-113.800534a28.433067 28.433067 0 0 1-28.228266-24.849067l-0.2048-3.584v-398.2336c0-14.506667 10.8544-26.453333 24.8832-28.228266l3.549866-0.2048h113.800534a28.433067 28.433067 0 0 1 28.228266 24.8832l0.2048 3.549866V469.333333a28.433067 28.433067 0 0 1-28.433066 28.433067z m227.5328-170.666667H682.666667a28.433067 28.433067 0 0 1-28.228267-24.849066l-0.2048-3.584v-227.566934c0-14.506667 10.8544-26.453333 24.849067-28.228266L682.666667 42.666667h113.7664a28.433067 28.433067 0 0 1 28.228266 24.8832l0.238934 3.549866V298.666667a28.433067 28.433067 0 0 1-28.4672 28.433066zM984.6784 865.3824a28.433067 28.433067 0 0 0 0-40.2432l-91.136-91.101867 91.136-91.136a28.433067 28.433067 0 0 0-40.2432-40.209066L853.333333 693.828267l-91.136-91.136a28.433067 28.433067 0 1 0-40.209066 40.2432l91.136 91.101866-91.136 91.136A28.433067 28.433067 0 0 0 762.231467 865.348267L853.333333 774.2464l91.136 91.136a28.433067 28.433067 0 0 0 40.209067 0z" horiz-adv-x="1024" /> <glyph glyph-name="biduishanchu" unicode="&#59534;" d="M625.7664 810.666667V725.333333c0-123.016533 97.621333-223.232 219.579733-227.4304l7.9872-0.136533 113.7664 0.034133v-512c0-31.4368-25.463467-56.900267-56.866133-56.900266H113.7664c-31.402667 0-56.866133 25.463467-56.866133 56.866133v768c0 31.402667 25.463467 56.900267 56.866133 56.900267h512zM341.333333 327.099733H227.566933a28.433067 28.433067 0 0 1-28.228266-24.849066l-0.238934-3.584v-227.566934c0-14.506667 10.8544-26.453333 24.917334-28.228266l3.549866-0.2048H341.333333a28.433067 28.433067 0 0 1 28.228267 24.8832l0.2048 3.549866V298.666667a28.433067 28.433067 0 0 1-28.433067 28.433066z m227.566934 170.666667h-113.800534a28.433067 28.433067 0 0 1-28.228266-24.849067l-0.2048-3.584v-398.2336c0-14.506667 10.8544-26.453333 24.8832-28.228266l3.549866-0.2048h113.800534a28.433067 28.433067 0 0 1 28.228266 24.8832l0.2048 3.549866V469.333333a28.433067 28.433067 0 0 1-28.433066 28.433067z m227.5328-170.666667H682.666667a28.433067 28.433067 0 0 1-28.228267-24.849066l-0.2048-3.584v-227.566934c0-14.506667 10.8544-26.453333 24.849067-28.228266L682.666667 42.666667h113.7664a28.433067 28.433067 0 0 1 28.228266 24.8832l0.238934 3.549866V298.666667a28.433067 28.433067 0 0 1-28.4672 28.433066zM984.6784 865.3824a28.433067 28.433067 0 0 0 0-40.2432l-91.136-91.101867 91.136-91.136a28.433067 28.433067 0 0 0-40.2432-40.209066L853.333333 693.828267l-91.136-91.136a28.433067 28.433067 0 1 0-40.209066 40.2432l91.136 91.101866-91.136 91.136A28.433067 28.433067 0 0 0 762.231467 865.348267L853.333333 774.2464l91.136 91.136a28.433067 28.433067 0 0 0 40.209067 0z" horiz-adv-x="1024" />
<glyph glyph-name="kaifapingtai" unicode="&#59533;" d="M736 0a32 32 0 1 0 0-64h-448a32 32 0 1 0 0 64h448zM832 832a128 128 0 0 0 128-128v-512a128 128 0 0 0-128-128H192a128 128 0 0 0-128 128V704a128 128 0 0 0 128 128h640z m0-64H192a64 64 0 0 1-63.552-56.512L128 704v-512a64 64 0 0 1 56.512-63.552L192 128h640a64 64 0 0 1 63.552 56.512L896 192V704a64 64 0 0 1-56.512 63.552L832 768zM382.4 611.456a32 32 0 0 0 3.712-40.832l-3.712-4.48L269.248 453.12 382.4 339.84a32 32 0 0 0 3.712-40.832l-3.712-4.48a32 32 0 0 0-40.832-3.648l-4.48 3.712-126.72 126.72a44.8 44.8 0 0 0-3.968 58.752l4.032 4.608 126.72 126.72a32 32 0 0 0 45.248 0z m274.752 0a32 32 0 0 0 45.248 0l126.72-126.72 3.968-4.608a44.8 44.8 0 0 0-3.968-58.752l-126.72-126.72-4.48-3.712a32 32 0 0 0-40.768 3.712l-3.712 4.48a32 32 0 0 0 3.712 40.768l113.152 113.152-113.152 113.088-3.712 4.48a32 32 0 0 0 3.712 40.832zM544 64v-64h-64v64h64z m33.664 578.368a32 32 0 0 0 19.84-40.64L493.312 299.136A32 32 0 1 0 432.832 320L536.96 622.528a32 32 0 0 0 40.64 19.84z" horiz-adv-x="1024" /> <glyph glyph-name="kaifapingtai" unicode="&#59533;" d="M736 0a32 32 0 1 0 0-64h-448a32 32 0 1 0 0 64h448zM832 832a128 128 0 0 0 128-128v-512a128 128 0 0 0-128-128H192a128 128 0 0 0-128 128V704a128 128 0 0 0 128 128h640z m0-64H192a64 64 0 0 1-63.552-56.512L128 704v-512a64 64 0 0 1 56.512-63.552L192 128h640a64 64 0 0 1 63.552 56.512L896 192V704a64 64 0 0 1-56.512 63.552L832 768zM382.4 611.456a32 32 0 0 0 3.712-40.832l-3.712-4.48L269.248 453.12 382.4 339.84a32 32 0 0 0 3.712-40.832l-3.712-4.48a32 32 0 0 0-40.832-3.648l-4.48 3.712-126.72 126.72a44.8 44.8 0 0 0-3.968 58.752l4.032 4.608 126.72 126.72a32 32 0 0 0 45.248 0z m274.752 0a32 32 0 0 0 45.248 0l126.72-126.72 3.968-4.608a44.8 44.8 0 0 0-3.968-58.752l-126.72-126.72-4.48-3.712a32 32 0 0 0-40.768 3.712l-3.712 4.48a32 32 0 0 0 3.712 40.768l113.152 113.152-113.152 113.088-3.712 4.48a32 32 0 0 0 3.712 40.832zM544 64v-64h-64v64h64z m33.664 578.368a32 32 0 0 0 19.84-40.64L493.312 299.136A32 32 0 1 0 432.832 320L536.96 622.528a32 32 0 0 0 40.64 19.84z" horiz-adv-x="1024" />

Before

Width:  |  Height:  |  Size: 462 KiB

After

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

4
package.json

@ -1,6 +1,6 @@
{ {
"name": "fineui", "name": "fineui",
"version": "2.0.20220209172240", "version": "2.0.20220216115117",
"description": "fineui", "description": "fineui",
"main": "dist/fineui.min.js", "main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts", "types": "dist/lib/index.d.ts",
@ -81,4 +81,4 @@
}, },
"author": "fanruan", "author": "fanruan",
"license": "MIT" "license": "MIT"
} }

2
src/base/combination/bubble.js

@ -332,7 +332,7 @@
name: "offset", name: "offset",
options: { options: {
offset: function () { offset: function () {
return [o.adjustXOffset, (o.showArrow ? 9 : 0) + (o.adjustYOffset || o.adjustLength)]; return [o.adjustXOffset, (o.showArrow ? 9 : 0) + (o.adjustYOffset + o.adjustLength)];
} }
} }
}]; }];

32
src/base/combination/combo.js

@ -213,64 +213,64 @@
switch (o.direction) { switch (o.direction) {
case "bottom": case "bottom":
case "bottom,right": case "bottom,right":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, (o.adjustYOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight, ["bottom", "top", "right", "left"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, (o.adjustYOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight, ["bottom", "top", "right", "left"], o.offsetStyle);
break; break;
case "top": case "top":
case "top,right": case "top,right":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, (o.adjustYOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight, ["top", "bottom", "right", "left"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, (o.adjustYOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight, ["top", "bottom", "right", "left"], o.offsetStyle);
break; break;
case "left": case "left":
case "left,bottom": case "left,bottom":
p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "bottom", "top"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "bottom", "top"], o.offsetStyle);
break; break;
case "right": case "right":
case "right,bottom": case "right,bottom":
p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "bottom", "top"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "bottom", "top"], o.offsetStyle);
break; break;
case "top,left": case "top,left":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, (o.adjustYOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight, ["top", "bottom", "left", "right"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, (o.adjustYOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight, ["top", "bottom", "left", "right"], o.offsetStyle);
break; break;
case "bottom,left": case "bottom,left":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, (o.adjustYOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight, ["bottom", "top", "left", "right"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, (o.adjustYOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight, ["bottom", "top", "left", "right"], o.offsetStyle);
break; break;
case "left,top": case "left,top":
p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "top", "bottom"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "top", "bottom"], o.offsetStyle);
break; break;
case "right,top": case "right,top":
p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
break; break;
case "right,innerRight": case "right,innerRight":
p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerRight", "innerLeft", "bottom", "top"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerRight", "innerLeft", "bottom", "top"], o.offsetStyle);
break; break;
case "right,innerLeft": case "right,innerLeft":
p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerLeft", "innerRight", "bottom", "top"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerLeft", "innerRight", "bottom", "top"], o.offsetStyle);
break; break;
case "innerRight": case "innerRight":
p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["innerRight", "innerLeft", "right", "left", "bottom", "top"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["innerRight", "innerLeft", "right", "left", "bottom", "top"], o.offsetStyle);
break; break;
case "innerLeft": case "innerLeft":
p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["innerLeft", "innerRight", "left", "right", "bottom", "top"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["innerLeft", "innerRight", "left", "right", "bottom", "top"], o.offsetStyle);
break; break;
case "top,custom": case "top,custom":
case "custom,top": case "custom,top":
p = BI.DOM.getTopAdaptPosition(combo, this.popupView, (o.adjustYOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight); p = BI.DOM.getTopAdaptPosition(combo, this.popupView, (o.adjustYOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight);
p.dir = "top"; p.dir = "top";
break; break;
case "custom,bottom": case "custom,bottom":
case "bottom,custom": case "bottom,custom":
p = BI.DOM.getBottomAdaptPosition(combo, this.popupView, (o.adjustYOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight); p = BI.DOM.getBottomAdaptPosition(combo, this.popupView, (o.adjustYOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight);
p.dir = "bottom"; p.dir = "bottom";
break; break;
case "left,custom": case "left,custom":
case "custom,left": case "custom,left":
p = BI.DOM.getLeftAdaptPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0)); p = BI.DOM.getLeftAdaptPosition(combo, this.popupView, (o.adjustXOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0));
delete p.top; delete p.top;
delete p.adaptHeight; delete p.adaptHeight;
p.dir = "left"; p.dir = "left";
break; break;
case "custom,right": case "custom,right":
case "right,custom": case "right,custom":
p = BI.DOM.getRightAdaptPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0)); p = BI.DOM.getRightAdaptPosition(combo, this.popupView, (o.adjustXOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0));
delete p.top; delete p.top;
delete p.adaptHeight; delete p.adaptHeight;
p.dir = "right"; p.dir = "right";

68
src/base/layer/layer.popup.js

@ -104,6 +104,12 @@ BI.PopupView = BI.inherit(BI.Widget, {
cls: "bubble-arrow" cls: "bubble-arrow"
}] }]
}); });
this.arrowWrapper = BI.createWidget({
type: "bi.absolute",
items: [{
el: this.arrow,
}]
})
// 因为三角符号的原因位置变大了,需要占位 // 因为三角符号的原因位置变大了,需要占位
this.placeholder = BI.createWidget({ this.placeholder = BI.createWidget({
type: "bi.layout" type: "bi.layout"
@ -112,7 +118,9 @@ BI.PopupView = BI.inherit(BI.Widget, {
type: "bi.absolute", type: "bi.absolute",
element: this, element: this,
items: [{ items: [{
el: this.arrow el: this.arrowWrapper,
left: 0,
top: 0,
}, { }, {
el: this.placeholder el: this.placeholder
}] }]
@ -174,8 +182,9 @@ BI.PopupView = BI.inherit(BI.Widget, {
}, },
setDirection: function (direction, position) { setDirection: function (direction, position) {
if (this.options.showArrow) { var o = this.options;
var style, placeholderStyle; if (o.showArrow) {
var style, wrapperStyle, placeholderStyle;
var adjustXOffset = position.adjustXOffset || 0; var adjustXOffset = position.adjustXOffset || 0;
var adjustYOffset = position.adjustYOffset || 0; var adjustYOffset = position.adjustYOffset || 0;
var bodyBounds = BI.Widget._renderEngine.createElement("body").bounds(); var bodyBounds = BI.Widget._renderEngine.createElement("body").bounds();
@ -204,6 +213,12 @@ BI.PopupView = BI.inherit(BI.Widget, {
// 5表示留出一定的空间 // 5表示留出一定的空间
left: BI.clamp(((middle ? popupWidth : position.width) - adjustXOffset) / 2 - 6, minLeft, maxLeft) left: BI.clamp(((middle ? popupWidth : position.width) - adjustXOffset) / 2 - 6, minLeft, maxLeft)
}; };
wrapperStyle = {
top: o.tgap + o.vgap,
left: 0,
right: "",
bottom: "",
};
placeholderStyle = { placeholderStyle = {
left: 0, left: 0,
right: 0, right: 0,
@ -217,6 +232,12 @@ BI.PopupView = BI.inherit(BI.Widget, {
style = { style = {
right: BI.clamp(((middle ? popupWidth : position.width) + adjustXOffset) / 2 - 6, minRight, maxRight) right: BI.clamp(((middle ? popupWidth : position.width) + adjustXOffset) / 2 - 6, minRight, maxRight)
}; };
wrapperStyle = {
bottom: o.bgap + o.vgap,
left: "",
right: 0,
top: "",
};
placeholderStyle = { placeholderStyle = {
left: 0, left: 0,
right: 0, right: 0,
@ -231,12 +252,18 @@ BI.PopupView = BI.inherit(BI.Widget, {
style = { style = {
left: BI.clamp(((middle ? popupWidth : position.width) - adjustXOffset) / 2 - 6, minLeft, maxLeft) left: BI.clamp(((middle ? popupWidth : position.width) - adjustXOffset) / 2 - 6, minLeft, maxLeft)
}; };
wrapperStyle = {
bottom: o.bgap + o.vgap,
left: 0,
right: "",
top: "",
};
placeholderStyle = { placeholderStyle = {
left: 0, left: 0,
right: 0, right: 0,
height: this._const.TRIANGLE_LENGTH, height: this._const.TRIANGLE_LENGTH,
top: "", top: "",
bottom: -this._const.TRIANGLE_LENGTH bottom: -this._const.TRIANGLE_LENGTH,
}; };
break; break;
case "top,left": case "top,left":
@ -244,12 +271,18 @@ BI.PopupView = BI.inherit(BI.Widget, {
style = { style = {
right: BI.clamp(((middle ? popupWidth : position.width) + adjustXOffset) / 2 - 6, minRight, maxRight) right: BI.clamp(((middle ? popupWidth : position.width) + adjustXOffset) / 2 - 6, minRight, maxRight)
}; };
wrapperStyle = {
bottom: o.bgap + o.vgap,
right: 0,
left: "",
top: "",
};
placeholderStyle = { placeholderStyle = {
left: 0, left: 0,
right: 0, right: 0,
height: this._const.TRIANGLE_LENGTH, height: this._const.TRIANGLE_LENGTH,
top: "", top: "",
bottom: -this._const.TRIANGLE_LENGTH bottom: -this._const.TRIANGLE_LENGTH,
}; };
break; break;
case "left": case "left":
@ -258,6 +291,12 @@ BI.PopupView = BI.inherit(BI.Widget, {
style = { style = {
top: BI.clamp(((middle ? popupHeight : position.height) - adjustYOffset) / 2 - 6, minTop, maxTop) top: BI.clamp(((middle ? popupHeight : position.height) - adjustYOffset) / 2 - 6, minTop, maxTop)
}; };
wrapperStyle = {
right: o.rgap + o.hgap,
top: 0,
bottom: "",
left: "",
};
placeholderStyle = { placeholderStyle = {
top: 0, top: 0,
bottom: 0, bottom: 0,
@ -271,6 +310,12 @@ BI.PopupView = BI.inherit(BI.Widget, {
style = { style = {
bottom: BI.clamp(((middle ? popupHeight : position.height) + adjustYOffset) / 2 - 6, minBottom, maxBottom) bottom: BI.clamp(((middle ? popupHeight : position.height) + adjustYOffset) / 2 - 6, minBottom, maxBottom)
}; };
wrapperStyle = {
right: o.rgap + o.hgap,
bottom: 0,
top: "",
left: "",
};
placeholderStyle = { placeholderStyle = {
top: 0, top: 0,
bottom: 0, bottom: 0,
@ -285,6 +330,12 @@ BI.PopupView = BI.inherit(BI.Widget, {
style = { style = {
top: BI.clamp(((middle ? popupHeight : position.height) - adjustYOffset) / 2 - 6, minTop, maxTop) top: BI.clamp(((middle ? popupHeight : position.height) - adjustYOffset) / 2 - 6, minTop, maxTop)
}; };
wrapperStyle = {
left: o.lgap + o.hgap,
top: 0,
bottom: "",
right: "",
};
placeholderStyle = { placeholderStyle = {
top: 0, top: 0,
bottom: 0, bottom: 0,
@ -298,6 +349,12 @@ BI.PopupView = BI.inherit(BI.Widget, {
style = { style = {
bottom: BI.clamp(((middle ? popupHeight : position.height) + adjustYOffset) / 2 - 6, minBottom, maxBottom) bottom: BI.clamp(((middle ? popupHeight : position.height) + adjustYOffset) / 2 - 6, minBottom, maxBottom)
}; };
wrapperStyle = {
left: o.lgap + o.hgap,
bottom: 0,
top: "",
right: "",
};
placeholderStyle = { placeholderStyle = {
top: 0, top: 0,
bottom: 0, bottom: 0,
@ -317,6 +374,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
} }
this.element.removeClass("left").removeClass("right").removeClass("top").removeClass("bottom").addClass(direction); this.element.removeClass("left").removeClass("right").removeClass("top").removeClass("bottom").addClass(direction);
this.arrow.element.css(style); this.arrow.element.css(style);
this.arrowWrapper.element.css(wrapperStyle);
this.placeholder.element.css(placeholderStyle); this.placeholder.element.css(placeholderStyle);
} }
}, },

75
src/base/single/button/listitem/blankiconicontextitem.js

@ -27,45 +27,44 @@ BI.BlankIconIconTextItem = BI.inherit(BI.BasicButton, {
}, },
render: function () { render: function () {
var o = this.options, c = this._const; var self = this, o = this.options;
var blank = BI.createWidget({
type: "bi.layout",
width: o.blankWidth,
height: o.height
});
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
});
this.icon1 = BI.createWidget({
type: "bi.icon_button",
cls: o.iconCls1,
forceNotSelected: true,
width: o.height,
height: o.height
});
this.icon2 = BI.createWidget({
type: "bi.icon_button",
cls: o.iconCls2,
forceNotSelected: true,
width: o.height,
height: o.height
});
BI.createWidget(BI.extend({ return {
element: this type: "bi.vertical_adapt",
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { columnSize: [o.blankWidth, o.leftIconWrapperWidth || o.height, o.rightIconWrapperWidth || o.height, "fill"],
items: BI.LogicFactory.createLogicItemsByDirection("left", blank, this.icon1, this.icon2, this.text) items: [{
})))); type: "bi.layout",
width: o.blankWidth
}, {
type: "bi.icon_label",
cls: o.iconCls1,
width: o.leftIconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}, {
type: "bi.icon_label",
cls: o.iconCls2,
width: o.rightIconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}, {
type: "bi.label",
ref: function (_ref) {
self.text = _ref;
},
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
}]
};
}, },
doClick: function () { doClick: function () {

81
src/base/single/button/listitem/blankicontexticonitem.js

@ -28,57 +28,44 @@ BI.BlankIconTextIconItem = BI.inherit(BI.BasicButton, {
}, },
render: function () { render: function () {
var o = this.options, c = this._const; var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
});
var icon1 = BI.createWidget({ return {
type: "bi.icon_label", type: "bi.vertical_adapt",
cls: o.iconCls1, columnSize: [o.blankWidth, o.leftIconWrapperWidth || o.height, "fill", o.rightIconWrapperWidth || o.height],
width: o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{ items: [{
el: {
type: "bi.icon_label",
cls: o.iconCls2,
width: o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
},
top: 0,
bottom: 0,
right: 0
}]
});
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection("left", {
type: "bi.layout", type: "bi.layout",
width: o.blankWidth width: o.blankWidth
}, icon1, this.text, { }, {
type: "bi.layout", type: "bi.icon_label",
width: o.height cls: o.iconCls1,
}) width: o.leftIconWrapperWidth || o.height,
})))); height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}, {
type: "bi.label",
ref: function (_ref) {
self.text = _ref;
},
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
}, {
type: "bi.icon_label",
cls: o.iconCls2,
width: o.rightIconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}]
};
}, },
doClick: function () { doClick: function () {

62
src/base/single/button/listitem/blankicontextitem.js

@ -26,38 +26,38 @@ BI.BlankIconTextItem = BI.inherit(BI.BasicButton, {
}, },
render: function () { render: function () {
var o = this.options, c = this._const; var self = this, o = this.options;
var blank = BI.createWidget({
type: "bi.layout",
width: o.blankWidth
});
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
});
this.icon = BI.createWidget({
type: "bi.icon_label",
cls: o.iconCls,
width: o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
});
BI.createWidget(BI.extend({ return {
element: this type: "bi.vertical_adapt",
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { columnSize: [o.blankWidth, "fill", o.iconWrapperWidth || o.height],
items: BI.LogicFactory.createLogicItemsByDirection("left", blank, this.icon, this.text) items: [{
})))); type: "bi.layout",
width: o.blankWidth
}, {
type: "bi.label",
ref: function (_ref) {
self.text = _ref;
},
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
}, {
type: "bi.icon_label",
cls: o.iconCls,
width: o.iconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}]
};
}, },
doClick: function () { doClick: function () {

76
src/base/single/button/listitem/icontexticonitem.js

@ -27,55 +27,41 @@ BI.IconTextIconItem = BI.inherit(BI.BasicButton, {
}, },
render: function () { render: function () {
var o = this.options, c = this._const; var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
});
var icon1 = BI.createWidget({ return {
type: "bi.icon_label", type: "bi.vertical_adapt",
cls: o.iconCls1, columnSize: [o.leftIconWrapperWidth || o.height, "fill", o.rightIconWrapperWidth || o.height],
width: o.leftIconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
});
var blank = BI.createWidget({
type: "bi.layout",
width: o.height
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{ items: [{
el: { type: "bi.icon_label",
type: "bi.icon_label", cls: o.iconCls1,
cls: o.iconCls2, width: o.leftIconWrapperWidth || o.height,
width: o.rightIconWrapperWidth || o.height, height: o.height,
height: o.height, iconWidth: o.iconWidth,
iconWidth: o.iconWidth, iconHeight: o.iconHeight
iconHeight: o.iconHeight }, {
type: "bi.label",
ref: function (_ref) {
self.text = _ref;
}, },
top: 0, textAlign: "left",
bottom: 0, hgap: o.textHgap,
right: 0 vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
}, {
type: "bi.icon_label",
cls: o.iconCls2,
width: o.rightIconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}] }]
}); };
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection("left", icon1, this.text, blank)
}))));
}, },
doClick: function () { doClick: function () {

55
src/base/single/button/listitem/icontextitem.js

@ -27,34 +27,35 @@ BI.IconTextItem = BI.inherit(BI.BasicButton, {
}, },
render: function () { render: function () {
var o = this.options, c = this._const; var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
});
this.icon = BI.createWidget({
type: "bi.icon_label",
cls: o.iconCls,
width: o.iconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
});
BI.createWidget(BI.extend({ return {
element: this type: "bi.vertical_adapt",
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend(o.logic, { columnSize: [o.iconWrapperWidth || o.height, "fill"],
items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.icon, this.text) items: [{
})))); type: "bi.icon_label",
cls: o.iconCls,
width: o.iconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}, {
type: "bi.label",
ref: function (_ref) {
self.text = _ref;
},
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
}]
};
}, },
doClick: function () { doClick: function () {

56
src/base/single/button/listitem/texticonitem.js

@ -15,6 +15,7 @@ BI.TextIconItem = BI.inherit(BI.BasicButton, {
logic: { logic: {
dynamic: false dynamic: false
}, },
iconWrapperWidth: null,
iconHeight: null, iconHeight: null,
iconWidth: null, iconWidth: null,
iconCls: "", iconCls: "",
@ -26,34 +27,35 @@ BI.TextIconItem = BI.inherit(BI.BasicButton, {
}, },
render: function () { render: function () {
var o = this.options, c = this._const; var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
});
this.icon = BI.createWidget({
type: "bi.icon_label",
cls: o.iconCls,
width: o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
});
BI.createWidget(BI.extend({ return {
element: this type: "bi.vertical_adapt",
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { columnSize: ["fill", o.iconWrapperWidth || o.height],
items: BI.LogicFactory.createLogicItemsByDirection("left", this.text, this.icon) items: [{
})))); type: "bi.label",
ref: function (_ref) {
self.text = _ref;
},
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
}, {
type: "bi.icon_label",
cls: o.iconCls,
width: o.iconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}]
};
}, },
doClick: function () { doClick: function () {

76
src/base/single/button/node/icontexticonnode.js

@ -25,55 +25,41 @@ BI.IconTextIconNode = BI.inherit(BI.NodeButton, {
}, },
render: function () { render: function () {
var o = this.options, c = this._const; var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
});
var icon1 = BI.createWidget({ return {
type: "bi.icon_label", type: "bi.vertical_adapt",
cls: o.iconCls1, columnSize: [o.leftIconWrapperWidth || o.height, "fill", o.rightIconWrapperWidth || o.height],
width: o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
});
var blank = BI.createWidget({
type: "bi.layout",
width: o.height,
height: o.height
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{ items: [{
el: { type: "bi.icon_label",
type: "bi.icon_label", cls: o.iconCls1,
cls: o.iconCls2, width: o.leftIconWrapperWidth || o.height,
width: o.height, height: o.height,
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight
}, {
type: "bi.label",
ref: function (_ref) {
self.text = _ref;
}, },
top: 0, textAlign: "left",
bottom: 0, hgap: o.textHgap,
right: 0 vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
}, {
type: "bi.icon_label",
cls: o.iconCls2,
width: o.rightIconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}] }]
}); };
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection("left", icon1, this.text, blank)
}))));
}, },
doClick: function () { doClick: function () {

54
src/base/single/button/node/icontextnode.js

@ -24,33 +24,35 @@ BI.IconTextNode = BI.inherit(BI.NodeButton, {
}, },
render: function () { render: function () {
var o = this.options, c = this._const; var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
});
this.icon = BI.createWidget({
type: "bi.icon_label",
width: o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
});
BI.createWidget(BI.extend({ return {
element: this type: "bi.vertical_adapt",
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { columnSize: [o.iconWrapperWidth || o.height, "fill"],
items: BI.LogicFactory.createLogicItemsByDirection("left", this.icon, this.text) items: [{
})))); type: "bi.icon_label",
cls: o.iconCls,
width: o.iconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}, {
type: "bi.label",
ref: function (_ref) {
self.text = _ref;
},
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
}]
};
}, },
doClick: function () { doClick: function () {

54
src/base/single/button/node/texticonnode.js

@ -23,33 +23,35 @@ BI.TextIconNode = BI.inherit(BI.NodeButton, {
}, },
render: function () { render: function () {
var o = this.options, c = this._const; var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
});
this.icon = BI.createWidget({
type: "bi.icon_label",
width: o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
});
BI.createWidget(BI.extend({ return {
element: this type: "bi.vertical_adapt",
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { columnSize: ["fill", o.iconWrapperWidth || o.height],
items: BI.LogicFactory.createLogicItemsByDirection("left", this.text, this.icon) items: [{
})))); type: "bi.label",
ref: function (_ref) {
self.text = _ref;
},
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
}, {
type: "bi.icon_label",
cls: o.iconCls,
width: o.iconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}]
};
}, },
doClick: function () { doClick: function () {

4
src/base/single/input/input.js

@ -24,7 +24,7 @@ BI.Input = BI.inherit(BI.Single, {
var _keydown = BI.debounce(function (keyCode) { var _keydown = BI.debounce(function (keyCode) {
self.onKeyDown(keyCode, ctrlKey); self.onKeyDown(keyCode, ctrlKey);
self._keydown_ = false; self._keydown_ = false;
}, 300); }, BI.EVENT_RESPONSE_TIME);
var _clk = BI.debounce(BI.bind(this._click, this), BI.EVENT_RESPONSE_TIME, { var _clk = BI.debounce(BI.bind(this._click, this), BI.EVENT_RESPONSE_TIME, {
"leading": true, "leading": true,
"trailing": false "trailing": false
@ -96,7 +96,7 @@ BI.Input = BI.inherit(BI.Single, {
_blur: function () { _blur: function () {
var self = this; var self = this;
if (self._keydown_ === true) { if (self._keydown_ === true) {
BI.delay(blur, 300); BI.delay(blur, BI.EVENT_RESPONSE_TIME);
} else { } else {
blur(); blur();
} }

53
src/case/ztree/0.treeview.js

@ -140,7 +140,9 @@ BI.TreeView = BI.inherit(BI.Pane, {
} }
return true; return true;
} }
BI.Msg.toast("Please Wait。", "warning"); // 不展开节点,也不触发onExpand事件 BI.Msg.toast("Please Wait。", {
level: "warning"
}); // 不展开节点,也不触发onExpand事件
return false; return false;
} }
@ -184,6 +186,9 @@ BI.TreeView = BI.inherit(BI.Pane, {
} }
function beforeCheck (treeId, treeNode) { function beforeCheck (treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
// 下面主动修改了node的halfCheck属性, 节点属性的判断依赖halfCheck,改之前就获取一下 // 下面主动修改了node的halfCheck属性, 节点属性的判断依赖halfCheck,改之前就获取一下
var status = treeNode.getCheckStatus(); var status = treeNode.getCheckStatus();
treeNode.halfCheck = false; treeNode.halfCheck = false;
@ -213,14 +218,23 @@ BI.TreeView = BI.inherit(BI.Pane, {
} }
function onCheck (event, treeId, treeNode) { function onCheck (event, treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
self._selectTreeNode(treeId, treeNode); self._selectTreeNode(treeId, treeNode);
} }
function onExpand (event, treeId, treeNode) { function onExpand (event, treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
treeNode.halfCheck = false; treeNode.halfCheck = false;
} }
function onCollapse (event, treeId, treeNode) { function onCollapse (event, treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
} }
return setting; return setting;
@ -335,22 +349,33 @@ BI.TreeView = BI.inherit(BI.Pane, {
var ns = BI.Tree.arrayFormat(nodes); var ns = BI.Tree.arrayFormat(nodes);
BI.each(ns, function (i, n) { BI.each(ns, function (i, n) {
n.isParent = n.isParent || n.parent; n.isParent = n.isParent || n.parent;
n.value = BI.isUndefined(n.value) ? n.text : n.value; // n.value = BI.isUndefined(n.value) ? n.text : n.value;
n.text = BI.isUndefined(n.text) ? n.value : n.text; // n.text = BI.isUndefined(n.text) ? n.value : n.text;
if (n.text === null) { // if (n.text === null) {
n.text = ""; // n.text = "";
} // }
if (BI.isNull(n.title)) { if (BI.isNull(n.title)) {
n.title = n.text; n.title = n.text;
} }
// 处理标红 var text = BI.createWidget(BI.extend({
if (BI.isNotNull(n.text)) { type: "bi.text",
if (BI.isKey(o.paras.keyword)) { cls: "tree-node-text",
n.text = BI.$("<div>").__textKeywordMarked__(BI.Text.formatText(n.text + ""), o.paras.keyword, n.py).html(); css: {
} else { display: "inline"
n.text = BI.htmlEncode(BI.Text.formatText(n.text + "")); },
} root: true
} }, n));
var fragment = BI.Widget._renderEngine.createElement("<div>");
fragment.append(text.element[0]);
n.text = fragment.html();
// // 处理标红
// if (BI.isNotNull(n.text)) {
// if (BI.isKey(o.paras.keyword)) {
// n.text = BI.$("<div>").__textKeywordMarked__(BI.Text.formatText(n.text + ""), o.paras.keyword, n.py).html();
// } else {
// n.text = BI.htmlEncode(BI.Text.formatText(n.text + ""));
// }
// }
}); });
return nodes; return nodes;
}, },

20
src/case/ztree/1.asynctree.js

@ -59,6 +59,9 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
}; };
function onClick (event, treeId, treeNode) { function onClick (event, treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
var zTree = BI.$.fn.zTree.getZTreeObj(treeId); var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
// 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选 // 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选
var checked = treeNode.checked; var checked = treeNode.checked;
@ -70,6 +73,9 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
} }
function beforeCheck (treeId, treeNode) { function beforeCheck (treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
// 下面主动修改了node的halfCheck属性, 节点属性的判断依赖halfCheck,改之前就获取一下 // 下面主动修改了node的halfCheck属性, 节点属性的判断依赖halfCheck,改之前就获取一下
var status = treeNode.getCheckStatus(); var status = treeNode.getCheckStatus();
treeNode.halfCheck = false; treeNode.halfCheck = false;
@ -98,18 +104,30 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
} }
function beforeExpand (treeId, treeNode) { function beforeExpand (treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
self._beforeExpandNode(treeId, treeNode); self._beforeExpandNode(treeId, treeNode);
} }
function onCheck (event, treeId, treeNode) { function onCheck (event, treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
self._selectTreeNode(treeId, treeNode); self._selectTreeNode(treeId, treeNode);
} }
function onExpand (event, treeId, treeNode) { function onExpand (event, treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
treeNode.halfCheck = false; treeNode.halfCheck = false;
} }
function onCollapse (event, treeId, treeNode) { function onCollapse (event, treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
treeNode.halfCheck = false; treeNode.halfCheck = false;
} }
@ -245,4 +263,4 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
} }
}); });
BI.shortcut("bi.async_tree", BI.AsyncTree); BI.shortcut("bi.async_tree", BI.AsyncTree);

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

@ -455,7 +455,7 @@
chClass += ' bi-checkbox checkbox-content'; chClass += ' bi-checkbox checkbox-content';
break; break;
} }
return chClass; return chClass + (node.disabled ? " disabled" : "");
}, },
repairAllChk: function(setting, checked) { repairAllChk: function(setting, checked) {
if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) { if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) {

2
src/less/base/colorchooser/colorchooser.trigger.less

@ -5,7 +5,7 @@
} }
.bi-combo-popup { .bi-combo-popup {
.bi-color-chooser-trigger { &>.bi-color-chooser-trigger {
border-color: @color-bi-border-hover-combo; border-color: @color-bi-border-hover-combo;
} }
} }

61
src/less/base/combo/combo.bubble.less

@ -1,57 +1,12 @@
@import "../../index"; @import "../../index";
.bi-bubble-combo { // .bi-bubble-combo {
& .button-combo-triangle-wrapper { // & .button-combo-triangle-wrapper {
position: fixed !important; // position: fixed !important;
// 消除祖先节点设置的line-height:normal对空白节点的行高影响 // // 消除祖先节点设置的line-height:normal对空白节点的行高影响
line-height: 0; // line-height: 0;
.z-index-layer(@zIndex-popup); // .z-index-layer(@zIndex-popup);
// ie10一下无背景色会鼠标穿透 // // ie10一下无背景色会鼠标穿透
.background-color(@color-bi-background-default, 0); // .background-color(@color-bi-background-default, 0);
}
& .bubble-combo-triangle-left {
z-index: 1;
.triangle-right();
}
& .bubble-combo-triangle-right {
z-index: 1;
.triangle-left();
}
& .bubble-combo-triangle-top {
z-index: 1;
.triangle-bottom();
}
& .bubble-combo-triangle-bottom {
z-index: 1;
.triangle-top();
}
& .bubble-combo-triangle-left, & .bubble-combo-triangle-right, & .bubble-combo-triangle-top, & .bubble-combo-triangle-bottom {
&:before {
background-color: @color-bi-background-bubble-combo-triangle;
}
&.bi-primary:before {
background-color: @background-color-card-primary;
}
}
}
// .bi-combo-popup .bi-bubble-popup-view {
// &.bi-zoom-big-leave{
// .zoom-big-motion-enter();
// }
// &.bi-zoom-big-leave-active{
// .zoom-big-motion-enter-active();
// } // }
// } // }
.bi-theme-dark {
.bi-bubble-combo {
& .bubble-combo-triangle-left, & .bubble-combo-triangle-right, & .bubble-combo-triangle-top, & .bubble-combo-triangle-bottom {
&:before {
background-color: @color-bi-background-bubble-combo-triangle-theme-dark;
border-bottom: 1px solid @color-bi-border-bubble-combo-triangle-theme-dark;
border-right: 1px solid @color-bi-border-bubble-combo-triangle-theme-dark;
}
}
}
}

4
src/less/base/single/input/checkbox.less

@ -27,7 +27,7 @@
border-color: @color-bi-border-hover-active-checkbox; border-color: @color-bi-border-hover-active-checkbox;
} }
} }
&.active, &:active { &.active {
& .checkbox-content, &.checkbox-content{ & .checkbox-content, &.checkbox-content{
border-color: @color-bi-border-hover-active-checkbox; border-color: @color-bi-border-hover-active-checkbox;
background-color: @color-bi-background-active-checkbox; background-color: @color-bi-background-active-checkbox;
@ -65,7 +65,7 @@
border-color: @color-bi-border-hover-active-checkbox-theme-dark; border-color: @color-bi-border-hover-active-checkbox-theme-dark;
} }
} }
&.active, &:active { &.active {
& .checkbox-content, &.checkbox-content { & .checkbox-content, &.checkbox-content {
border-color: @color-bi-border-hover-active-checkbox-theme-dark; border-color: @color-bi-border-hover-active-checkbox-theme-dark;
background-color: @color-bi-background-active-checkbox-theme-dark; background-color: @color-bi-background-active-checkbox-theme-dark;

4
src/less/base/single/input/radio.less

@ -13,7 +13,7 @@
border-color: @color-bi-border-hover-active-radio; border-color: @color-bi-border-hover-active-radio;
} }
} }
&:active, &.active { &.active {
& .radio-content, &.radio-content { & .radio-content, &.radio-content {
border-color: @color-bi-border-hover-active-radio; border-color: @color-bi-border-hover-active-radio;
background-color: @color-bi-background-active-radio; background-color: @color-bi-background-active-radio;
@ -59,7 +59,7 @@
border-color: @color-bi-border-hover-active-radio-theme-dark; border-color: @color-bi-border-hover-active-radio-theme-dark;
} }
} }
&.active, &:active { &.active {
& .radio-content, &.radio-content { & .radio-content, &.radio-content {
border-color:@color-bi-border-hover-active-radio-theme-dark; border-color:@color-bi-border-hover-active-radio-theme-dark;
&:after { &:after {

1
src/less/base/single/label.less

@ -2,5 +2,6 @@
.bi-label { .bi-label {
.overflow-hidden(); .overflow-hidden();
word-wrap: break-word;
word-break: break-all; word-break: break-all;
} }

1
src/less/base/single/text.less

@ -3,5 +3,6 @@
.bi-text { .bi-text {
.overflow-hidden(); .overflow-hidden();
.box-sizing(border-box); .box-sizing(border-box);
word-wrap: break-word;
word-break: break-all; word-break: break-all;
} }

25
src/less/base/tree/ztree.less

@ -76,12 +76,16 @@
text-decoration: none; text-decoration: none;
vertical-align: top; vertical-align: top;
display: inline-block; display: inline-block;
&:hover { .tree-node-text {
.background-color(@color-bi-background-highlight, 10%); &:not(.disabled) {
} &:hover {
&:active { .background-color(@color-bi-background-highlight, 10%);
color: @color-bi-text-highlight; }
.background-color(@color-bi-background-highlight, 15%); &:active {
color: @color-bi-text-highlight;
.background-color(@color-bi-background-highlight, 15%);
}
}
} }
} }
@ -161,7 +165,14 @@
box-sizing: border-box; box-sizing: border-box;
&.active { &.active {
background-color: @color-bi-background-highlight; background-color: @color-bi-background-highlight;
border-color: @color-bi-border-highlight;; border-color: @color-bi-border-highlight;
}
&.disabled {
border: 1px solid @color-bi-border-disabled;
background-color: @color-bi-background-disabled;
&.active {
border-color: @color-bi-border-disabled;
}
} }
} }
&.bi-half-button { &.bi-half-button {

18
src/less/base/view/popupview.less

@ -28,34 +28,42 @@
} }
.bi-popup-view[data-popper-placement^='top'], .bi-popup-view.top { .bi-popup-view[data-popper-placement^='top'], .bi-popup-view.top {
> .bi-bubble-arrow { > div > .bi-bubble-arrow {
bottom: -12px; bottom: -12px;
width: 14px;
> .bubble-arrow { > .bubble-arrow {
bottom: 8px; bottom: 8px;
left: 1px;
} }
} }
} }
.bi-popup-view[data-popper-placement^='bottom'], .bi-popup-view.bottom { .bi-popup-view[data-popper-placement^='bottom'], .bi-popup-view.bottom {
> .bi-bubble-arrow { > div > .bi-bubble-arrow {
top: -12px; top: -12px;
width: 14px;
> .bubble-arrow { > .bubble-arrow {
top: 8px; top: 8px;
left: 1px;
} }
} }
} }
.bi-popup-view[data-popper-placement^='left'], .bi-popup-view.left { .bi-popup-view[data-popper-placement^='left'], .bi-popup-view.left {
> .bi-bubble-arrow { > div > .bi-bubble-arrow {
right: -12px; right: -12px;
height: 14px;
> .bubble-arrow { > .bubble-arrow {
right: 8px; right: 8px;
top: 1px;
} }
} }
} }
.bi-popup-view[data-popper-placement^='right'], .bi-popup-view.right { .bi-popup-view[data-popper-placement^='right'], .bi-popup-view.right {
> .bi-bubble-arrow { > div > .bi-bubble-arrow {
left: -12px; left: -12px;
height: 14px;
> .bubble-arrow { > .bubble-arrow {
left: 8px; left: 8px;
top: 1px;
} }
} }
} }
@ -63,6 +71,8 @@
.bi-bubble-arrow { .bi-bubble-arrow {
width: 12px; width: 12px;
height: 12px; height: 12px;
// 消除祖先节点设置的line-height:normal对空白节点的行高影响
line-height: 0;
overflow: hidden; overflow: hidden;
.bubble-arrow { .bubble-arrow {
width: 12px; width: 12px;

3
typescript/index.ts

@ -49,6 +49,7 @@ import { VerticalFillLayout } from "./core/wrapper/layout/fill/fill.vertical";
import { VerticalLayout } from "./core/wrapper/layout/layout.vertical"; import { VerticalLayout } from "./core/wrapper/layout/layout.vertical";
import { DefaultLayout } from "./core/wrapper/layout/layout.default"; import { DefaultLayout } from "./core/wrapper/layout/layout.default";
import { DownListCombo } from "./widget/downlist/combo.downlist"; import { DownListCombo } from "./widget/downlist/combo.downlist";
import { DownListPopup } from "./widget/downlist/popup.downlist";
import { Icon } from "./base/single/icon/icon"; import { Icon } from "./base/single/icon/icon";
import { LeftVerticalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.leftvertical"; import { LeftVerticalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.leftvertical";
import { LeftRightVerticalAdaptLayout, RightVerticalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.leftrightvertical"; import { LeftRightVerticalAdaptLayout, RightVerticalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.leftrightvertical";
@ -245,6 +246,7 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
MultiTreeInsertCombo: typeof MultiTreeInsertCombo; MultiTreeInsertCombo: typeof MultiTreeInsertCombo;
Decorators: typeof decorator; Decorators: typeof decorator;
DownListCombo: typeof DownListCombo; DownListCombo: typeof DownListCombo;
DownListPopup: typeof DownListPopup;
Iframe: typeof Iframe; Iframe: typeof Iframe;
AbsoluteLayout: typeof AbsoluteLayout; AbsoluteLayout: typeof AbsoluteLayout;
HorizontalFillLayout: typeof HorizontalFillLayout; HorizontalFillLayout: typeof HorizontalFillLayout;
@ -423,6 +425,7 @@ export {
Label, Label,
TextButton, TextButton,
DownListCombo, DownListCombo,
DownListPopup,
IconChangeButton, IconChangeButton,
Button, Button,
TextEditor, TextEditor,

9
typescript/widget/downlist/popup.downlist.ts

@ -0,0 +1,9 @@
import { Widget } from "../../core/widget";
export declare class DownListPopup extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
static EVENT_SON_VALUE_CHANGE: string;
populate: (items: any) => void;
}
Loading…
Cancel
Save