Browse Source

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

* commit '4e0274fcc4a88b37972328d0b9f1db3ac4a659c5':
  fix(BI-134501): 主线不找最外层body
  BI-133009 fix: 季末日期计算有误
  无JIRA 上传font
  BI-131636 fix: 【6.0.13分析文档迭代验收】分析文档,字体颜色默认值,少了16进制的内容
  feat(KERNEL-15966): 指定body挂载的弹窗挂在最外层
  JSY-31442 style:数值区间控件提供高度设置
research/test
superman 1 year ago
parent
commit
12a65b9bff
  1. BIN
      packages/fineui/dist/font/iconfont.eot
  2. 12
      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. 14
      packages/fineui/src/base/layer/layer.popover.js
  7. 12
      packages/fineui/src/case/colorchooser/colorchooser.popup.hex.js
  8. 2
      packages/fineui/src/case/colorchooser/colorpicker/editor.colorpicker.hex.js
  9. 6
      packages/fineui/src/case/colorchooser/colorpicker/editor.colorpicker.hex.simple.js
  10. 17
      packages/fineui/src/core/controller/controller.layer.js
  11. 17
      packages/fineui/src/core/controller/controller.popover.js
  12. 2
      packages/fineui/src/core/func/date.js
  13. 21
      packages/fineui/src/core/utils/dom.js
  14. 7
      packages/fineui/src/widget/intervalslider/intervalslider.js

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

Binary file not shown.

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

@ -14,7 +14,11 @@
/>
<missing-glyph />
<glyph glyph-name="fasong" unicode="&#60047;" d="M807.996 728v-336H305.348l174.744 174.744-90.508 90.508L61.48 329.16l328.1-328.096 90.508 90.508L307.66 264H936V728h-128z" 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" />
<glyph glyph-name="fasong" unicode="&#60047;" d="M270.7 360l243.456 235-55.56 57.56L112 318l346.596-334.56 55.56 57.56-247.6 239H913.6V696h-80v-336H270.7zM833.6 696h80V736h-80v-40z" horiz-adv-x="1024" />
<glyph glyph-name="AIzhuli" unicode="&#60046;" d="M372 411.944a36 36 0 0 0 36 36 36 36 0 0 0 36-36v-40a36 36 0 0 0-72 0v40zM580 411.944a36 36 0 0 0 36 36 36 36 0 0 0 36-36v-40a36 36 0 0 0-72 0v40zM920 395.944a36 36 0 0 0 36 36 36 36 0 0 0 36-36v-128a36 36 0 0 0-72 0v128zM32 395.944a36 36 0 0 0 36 36 36 36 0 0 0 36-36v-128a36 36 0 0 0-72 0v128zM600 531.948c125.92 0 228-102.08 228-228.004 0-125.92-102.08-228-228-228h-176c-125.92 0-228 102.08-228 228 0 125.924 102.08 228 228 228h176z m-176 72c-165.684 0-300-134.316-300-300.004 0-165.684 134.316-300 300-300h176c165.684 0 300 134.316 300 300 0 165.688-134.316 300-300 300h-176zM668.128 731.772c-9.384-21.732-4.916-45.96 9.492-62.812l-41.332-67.132a298.22 298.22 0 0 0 60.524-13.792l21.048 60.172c25.1-2.252 49.9 11.592 60.436 35.992 13.136 30.42-0.876 65.732-31.296 78.868-30.424 13.136-65.736-0.876-78.872-31.296zM308.796 581.08l-23.48 67.128c-25.104-2.252-49.9 11.592-60.44 35.992-13.132 30.42 0.88 65.732 31.3 78.868 30.424 13.136 65.732-0.876 78.872-31.296 9.384-21.732 4.912-45.96-9.496-62.812l43.132-70.048c-20.8-3.88-40.84-9.9-59.888-17.828z" horiz-adv-x="1024" />
@ -92,7 +96,7 @@
<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="M0 896h5120v-256H0zM0 128h5120v-256H0z" horiz-adv-x="5120" />
<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" />
@ -380,7 +384,7 @@
<glyph glyph-name="fenxishitu" unicode="&#59865;" d="M896 532V752a16 16 0 0 1-16 16h-161.716c-13 35.036-46.728 60-86.284 60H392c-39.56 0-73.28-24.964-86.28-60H144a16 16 0 0 1-16-16v-752a16 16 0 0 1 16-16h256v64H200a8 8 0 0 0-8 8V696a8 8 0 0 0 8 8h105.72C318.72 668.964 352.44 644 392 644h240c39.556 0 73.284 24.964 86.284 60H824a8 8 0 0 0 8-8v-164h64zM392 708a28 28 0 1 0 0 56h240a28 28 0 1 0 0-56H392zM531.608 148.596a16 16 0 0 1-4.672-11.3v-135.776a16 16 0 0 1 16-16h135.752a16.016 16.016 0 0 1 11.332 4.7l295.248 296.092a16.004 16.004 0 0 1-0.016 22.612l-135.764 135.764a16 16 0 0 1-22.644-0.016l-295.236-296.076z m59.328-31.14l247.284 247.988 67.884-67.884-247.34-248.04h-67.828v67.936zM779.256 503.432a8 8 0 0 1 0 11.312l-39.6 39.6a8 8 0 0 1-11.312 0l-150.888-150.888-148.344 148.344a8 8 0 0 1-11.312 0l-172.144-172.144a8 8 0 0 1 0-11.312l39.6-39.6a8 8 0 0 1 11.312 0l126.888 126.888 148.344-148.344a8 8 0 0 1 11.312 0l196.144 196.144z" horiz-adv-x="1024" />
<glyph glyph-name="zhutixieyuan" unicode="&#59866;" d="M720 688v-136h176V688h-176z m-48 64h272a16 16 0 0 0 16-16v-232a16 16 0 0 0-16-16h-272a16 16 0 0 0-16 16V588h-58.116a32 32 0 0 1-30.308-21.728l-50.54-149.092a95.828 95.828 0 0 0-19.36-33.18 95.828 95.828 0 0 0 19.36-33.18l50.54-149.092a32 32 0 0 1 30.308-21.728H656v84a16 16 0 0 0 16 16h272a16 16 0 0 0 16-16v-232a16 16 0 0 0-16-16h-272a16 16 0 0 0-16 16v84h-58.116a96 96 0 0 0-90.92 65.18l-50.54 149.092a32 32 0 0 1-30.308 21.728H368v-84a16 16 0 0 0-16-16H80a16 16 0 0 0-16 16V500a16 16 0 0 0 16 16h272a16 16 0 0 0 16-16v-84h58.116a32 32 0 0 1 30.308 21.728l50.54 149.092A96 96 0 0 0 597.884 652H656V736a16 16 0 0 0 16 16zM128 452v-136h176v136H128z m592-372h176v136h-176v-136z" horiz-adv-x="1024" />
<glyph glyph-name="zhutixieyuan" unicode="&#59866;" d="M304 688v-136H128V688h176z m48 64H80a16 16 0 0 1-16-16v-232a16 16 0 0 1 16-16h272a16 16 0 0 1 16 16V588h58.116a32 32 0 0 0 30.308-21.728l50.54-149.092a95.828 95.828 0 0 1 19.36-33.18 95.828 95.828 0 0 1-19.36-33.18l-50.54-149.092a32 32 0 0 0-30.308-21.728H368v84a16 16 0 0 1-16 16H80a16 16 0 0 1-16-16v-232a16 16 0 0 1 16-16h272a16 16 0 0 1 16 16v84h58.116a96 96 0 0 1 90.92 65.18l50.54 149.092a32 32 0 0 0 30.308 21.728H656v-84a16 16 0 0 1 16-16h272a16 16 0 0 1 16 16V500a16 16 0 0 1-16 16h-272a16 16 0 0 1-16-16v-84h-58.116a32 32 0 0 0-30.308 21.728l-50.54 149.092A96 96 0 0 1 426.116 652H368V736a16 16 0 0 1-16 16z m544-300v-136h-176v136h176zM304 80H128v136h176v-136z" horiz-adv-x="1024" />
<glyph glyph-name="quanbuzhankai" unicode="&#59863;" d="M152 752a16 16 0 0 0 16 16h688a16 16 0 0 0 16-16v-264a16 16 0 0 0-16-16H168a16 16 0 0 0-16 16V752z m64-48v-168h592V704H216zM218.628 375.312a15.992 15.992 0 0 0 22.628 0l272.224-272.224 271.836 271.836a16 16 0 0 0 22.628 0l33.94-33.944a16 16 0 0 0 0-22.628l-316.784-316.78a15.992 15.992 0 0 0-17.636-3.388 15.916 15.916 0 0 0-5.992 3.776l-316.784 316.784a16 16 0 0 0 0 22.628l33.94 33.94z" horiz-adv-x="1024" />
@ -852,7 +856,7 @@
<glyph glyph-name="shujukaifa1" unicode="&#59590;" d="M120 740a8 8 0 0 1-8-8v-256a8 8 0 0 1 8-8h88v-115.044a8 8 0 0 1 8-8h520V300H120a8 8 0 0 1-8-8v-256a8 8 0 0 1 8-8h784a8 8 0 0 1 8 8v256a8 8 0 0 1-8 8h-88v116.956a8 8 0 0 1-8 8H288V468h616a8 8 0 0 1 8 8V732a8 8 0 0 1-8 8H120z m96-96h64a8 8 0 0 0 8-8v-64a8 8 0 0 0-8-8H216a8 8 0 0 0-8 8V636a8 8 0 0 0 8 8z m136-8a8 8 0 0 0 8 8h64a8 8 0 0 0 8-8v-64a8 8 0 0 0-8-8H360a8 8 0 0 0-8 8V636z m152 8h304a8 8 0 0 0 8-8v-64a8 8 0 0 0-8-8h-304a8 8 0 0 0-8 8V636a8 8 0 0 0 8 8zM216 204h64a8 8 0 0 0 8-8v-64a8 8 0 0 0-8-8H216a8 8 0 0 0-8 8v64a8 8 0 0 0 8 8z m136-8a8 8 0 0 0 8 8h64a8 8 0 0 0 8-8v-64a8 8 0 0 0-8-8H360a8 8 0 0 0-8 8v64z m152 8h304a8 8 0 0 0 8-8v-64a8 8 0 0 0-8-8h-304a8 8 0 0 0-8 8v64a8 8 0 0 0 8 8z" horiz-adv-x="1024" />
<glyph glyph-name="icontuozhuai" unicode="&#59588;" d="M192 576m-64 0a64 64 0 1 1 128 0 64 64 0 1 1-128 0ZM192 192m-64 0a64 64 0 1 1 128 0 64 64 0 1 1-128 0ZM512 576m-64 0a64 64 0 1 1 128 0 64 64 0 1 1-128 0ZM512 192m-64 0a64 64 0 1 1 128 0 64 64 0 1 1-128 0ZM832 576m-64 0a64 64 0 1 1 128 0 64 64 0 1 1-128 0ZM832 192m-64 0a64 64 0 1 1 128 0 64 64 0 1 1-128 0Z" horiz-adv-x="1024" />
<glyph glyph-name="icontuozhuai" unicode="&#59588;" d="M304 712a8 8 0 0 1-8-8v-80a8 8 0 0 1 8-8h80a8 8 0 0 1 8 8V704a8 8 0 0 1-8 8H304z m0-280a8 8 0 0 1-8-8v-80a8 8 0 0 1 8-8h80a8 8 0 0 1 8 8v80a8 8 0 0 1-8 8H304z m-8-288a8 8 0 0 0 8 8h80a8 8 0 0 0 8-8v-80a8 8 0 0 0-8-8H304a8 8 0 0 0-8 8v80z m344 568a8 8 0 0 1-8-8v-80a8 8 0 0 1 8-8h80a8 8 0 0 1 8 8V704a8 8 0 0 1-8 8h-80z m-8-288a8 8 0 0 0 8 8h80a8 8 0 0 0 8-8v-80a8 8 0 0 0-8-8h-80a8 8 0 0 0-8 8v80z m8-272a8 8 0 0 1-8-8v-80a8 8 0 0 1 8-8h80a8 8 0 0 1 8 8v80a8 8 0 0 1-8 8h-80z" horiz-adv-x="1024" />
<glyph glyph-name="xiazaimoban" unicode="&#59581;" d="M896 294.4a38.4 38.4 0 0 0 38.4-38.4v-256a38.4 38.4 0 0 0-38.4-38.4H128a38.4 38.4 0 0 0-38.4 38.4v256a38.4 38.4 0 1 0 76.8 0v-217.6h691.2V256a38.4 38.4 0 0 0 38.4 38.4zM512 768a38.4 38.4 0 0 0 38.4-38.4v-472.32l115.52 115.456a38.4 38.4 0 0 0 54.4-54.272l-181.12-181.056a38.4 38.4 0 0 0-54.4 0l-181.12 181.056a38.4 38.4 0 1 0 54.4 54.272L473.6 257.28V729.6A38.4 38.4 0 0 0 512 768z" horiz-adv-x="1024" />

Before

Width:  |  Height:  |  Size: 980 KiB

After

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

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

@ -16,6 +16,7 @@ import {
} from "@/core";
import { Label, IconButton, Button } from "../single";
import { Resizers } from "../0.base";
import { getOuterBody } from "@/core/utils/dom";
/**
* Popover弹出层
@ -66,10 +67,11 @@ export class Popover extends Widget {
this.startX = 0;
this.startY = 0;
const size = this._calculateSize();
const bodyDom = getOuterBody();
this.tracker = new MouseMoveTracker(
(deltaX, deltaY) => {
const W = Widget._renderEngine.createElement("body").width();
const H = Widget._renderEngine.createElement("body").height();
const W = Widget._renderEngine.createElement(bodyDom).width();
const H = Widget._renderEngine.createElement(bodyDom).height();
this.startX += deltaX;
this.startY += deltaY;
this.element.css({
@ -228,11 +230,11 @@ export class Popover extends Widget {
_getSuitableBodyHeight(height) {
const { headerHeight, footer, footerHeight, bodyTgap } = this.options;
const bodyDom = getOuterBody();
return clamp(
height,
0,
Widget._renderEngine.createElement("body")[0].clientHeight -
Widget._renderEngine.createElement(bodyDom)[0].clientHeight -
headerHeight -
(footer ? footerHeight : 0) -
bodyTgap
@ -240,11 +242,11 @@ export class Popover extends Widget {
}
_getSuitableHeight(height) {
return clamp(height, 0, Widget._renderEngine.createElement("body")[0].clientHeight);
return clamp(height, 0, Widget._renderEngine.createElement(getOuterBody())[0].clientHeight);
}
_getSuitableWidth(width) {
return clamp(width, 0, Widget._renderEngine.createElement("body").width());
return clamp(width, 0, Widget._renderEngine.createElement(getOuterBody()).width());
}
_calculateSize() {

12
packages/fineui/src/case/colorchooser/colorchooser.popup.hex.js

@ -22,7 +22,13 @@ import { Label, Combo, TextItem } from "@/base";
import { PopupPanel } from "../layer";
import { CustomColorChooser } from "./colorchooser.custom";
import { ColorChooserPopup } from "./colorchooser.popup";
import { ColorPickerEditor, ColorPicker, HexColorPicker } from "./colorpicker";
import {
ColorPickerEditor,
ColorPicker,
HexColorPicker,
SimpleHexColorPickerEditor,
HexColorPickerEditor
} from "./colorpicker";
/**
* @author windy
@ -59,8 +65,8 @@ export class HexColorChooserPopup extends Widget {
extend(
{
type: o.simple
? "bi.simple_hex_color_picker_editor"
: "bi.hex_color_picker_editor",
? SimpleHexColorPickerEditor.xtype
: HexColorPickerEditor.xtype,
value: o.value,
height: o.simple ? 36 : 70,
listeners: [

2
packages/fineui/src/case/colorchooser/colorpicker/editor.colorpicker.hex.js

@ -39,7 +39,7 @@ export class HexColorPickerEditor extends Widget {
static EVENT_CHANGE = "EVENT_CHANGE";
props = {
baseCls: "bi-color-picker-editor",
baseCls: "bi-color-picker-editor bi-hex-color-picker-editor",
height: 30,
};

6
packages/fineui/src/case/colorchooser/colorpicker/editor.colorpicker.hex.simple.js

@ -23,7 +23,8 @@ import { TextEditor } from "@/widget/editor/editor.text";
const RGB_WIDTH = 32,
HEX_WIDTH = 70,
HEX_PREFIX_POSITION = 1;
HEX_PREFIX_POSITION = 1,
DEFAULT_HEX = "ffffff";
/**
* @author windy
@ -37,7 +38,7 @@ export class SimpleHexColorPickerEditor extends Widget {
static EVENT_CHANGE = "EVENT_CHANGE";
props = {
baseCls: "bi-color-picker-editor",
baseCls: "bi-color-picker-editor bi-simple-hex-color-picker-editor",
height: 36,
};
@ -112,6 +113,7 @@ export class SimpleHexColorPickerEditor extends Widget {
errorText: i18nText("BI-Color_Picker_Error_Text_Hex"),
width: HEX_WIDTH,
height: 24,
value: DEFAULT_HEX,
listeners: [
{
eventName: "EVENT_CHANGE",

17
packages/fineui/src/core/controller/controller.layer.js

@ -8,7 +8,7 @@ import { isNull, isNotNull, each, keys, isWidget, isNotEmptyString, extend, bind
import { Widget } from "../4.widget";
import { createWidget } from "../5.inject";
import { zIndex_layer } from "../constant";
import { DOM } from "../utils";
import { getPositionRelativeContainingBlockRect, getOuterBody } from "../utils/dom";
export class LayerController extends Controller {
constructor(Resizers) {
@ -63,7 +63,7 @@ export class LayerController extends Controller {
w = from.element;
}
if (isNotEmptyString(w)) {
w = Widget._renderEngine.createElement(w);
w = Widget._renderEngine.createElement(w === 'body' ? getOuterBody() : w);
}
if (this.has(name)) {
return this.get(name);
@ -86,7 +86,7 @@ export class LayerController extends Controller {
}, context);
createWidget({
type: "bi.absolute",
element: op.container || this.options.render,
element: op.container || this.getRender(),
items: [
{
el: layout,
@ -108,7 +108,7 @@ export class LayerController extends Controller {
height: offset.height || (w.outerHeight() - (offset.top || 0) - (offset.bottom || 0)) || "",
};
const { top, left, scaleY, scaleX } = DOM.getPositionRelativeContainingBlockRect(layout.element[0]);
const { top, left, scaleY, scaleX } = getPositionRelativeContainingBlockRect(layout.element[0]);
css.top = (css.top - top) / scaleY;
css.left = (css.left - left) / scaleX;
@ -164,6 +164,15 @@ export class LayerController extends Controller {
return this;
}
getRender() {
// 默认挂在body上的都找最外层的body
let render = this.options.render;
if (render === 'body') {
return getOuterBody();
}
return render;
}
_getLayout(name) {
return this.layouts[name];
}

17
packages/fineui/src/core/controller/controller.popover.js

@ -7,6 +7,7 @@ import { isNotNull, each } from "../2.base";
import { Widget } from "../4.widget";
import { createWidget } from "../5.inject";
import { zIndex_popover } from "../constant";
import { getOuterBody } from "../utils/dom";
export class PopoverController extends Controller {
constructor() {
@ -56,8 +57,9 @@ export class PopoverController extends Controller {
this.floatContainer[name].visible();
const popover = this.get(name);
popover.show && popover.show();
const W = Widget._renderEngine.createElement(this.options.render).width(),
H = Widget._renderEngine.createElement(this.options.render).height();
const render = this.getRender();
const W = Widget._renderEngine.createElement(render).width(),
H = Widget._renderEngine.createElement(render).height();
const w = popover.element.width(), h = popover.element.height();
let left = (W - w) / 2, top = (H - h) / 2;
if (left < 0) {
@ -124,7 +126,7 @@ export class PopoverController extends Controller {
popover.on(BI.Popover.EVENT_CLOSE, () => this.close(name));
createWidget({
type: "bi.absolute",
element: options.container || this.options.render,
element: options.container || this.getRender(),
items: [{
el: this.floatContainer[name],
left: 0,
@ -137,6 +139,15 @@ export class PopoverController extends Controller {
return this;
}
getRender() {
// 默认挂在body上的都找最外层的body
let render = this.options.render;
if (render === 'body') {
return getOuterBody();
}
return render;
}
get(name) {
return this.floatManager[name];
}

2
packages/fineui/src/core/func/date.js

@ -180,7 +180,7 @@ export function getQuarterStartDate(date) {
export function getQuarterEndDate(date) {
const quarterEndMonth = getQuarterStartMonth(date) + 2;
return getDate(date.getFullYear(), quarterEndMonth, getMonthDays(date));
return getDate(date.getFullYear(), quarterEndMonth, getMonthDays(date, quarterEndMonth));
}
/**

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

@ -1,9 +1,9 @@
/**
* 对DOM操作的通用函数
*/
import { Widget } from "../4.widget";
import { each, isEmpty, isNull, isNotNull } from "../2.base";
import $ from "jquery";
import { each, isEmpty, isNotNull, isNull } from "../2.base";
import { Widget } from "../4.widget";
import { isIE } from "./../platform";
export function ready(fn) {
@ -788,3 +788,20 @@ export function getPositionRelativeContainingBlockRect(element) {
scaleY: rect.height / positionRelativeElement.offsetHeight,
};
}
/**
* 获取最外层的body
*/
export function getOuterBody() {
// 默认挂在body上的都找最外层的body
// let parentWindow = window;
// let body = document.body;
// try {
// while (parentWindow.parent !== parentWindow) {
// parentWindow = parentWindow.parent;
// }
// body = parentWindow.document.body;
// } catch (e) {}
// return body;
return document.body;
}

7
packages/fineui/src/widget/intervalslider/intervalslider.js

@ -31,6 +31,7 @@ export class IntervalSlider extends Single {
EDITOR_R_GAP: 60,
EDITOR_HEIGHT: 20,
SLIDER_WIDTH_HALF: 15,
LABEL_HEIGHT: 30,
SLIDER_WIDTH: 30,
SLIDER_HEIGHT: 30,
TRACK_HEIGHT: 24,
@ -60,6 +61,7 @@ export class IntervalSlider extends Single {
render() {
const c = this._constant;
const o = this.options;
this.enable = false;
this.valueOne = "";
this.valueTwo = "";
@ -150,7 +152,7 @@ export class IntervalSlider extends Single {
return {
type: VerticalFillLayout.xtype,
rowSize: [30, 30],
rowSize: [o.labelHeight || c.LABEL_HEIGHT, o.sliderHeight || c.SLIDER_HEIGHT],
items: [
this._createLabelWrapper(),
{
@ -250,6 +252,7 @@ export class IntervalSlider extends Single {
}
_createLabelWrapper() {
const o = this.options;
const c = this._constant;
return {
@ -272,7 +275,7 @@ export class IntervalSlider extends Single {
],
},
],
height: c.SLIDER_HEIGHT,
height: o.labelHeight || c.LABEL_HEIGHT,
},
top: 0,
left: 0,

Loading…
Cancel
Save