Browse Source

Merge branch 'feature/x' of ssh://code.fineres.com:7999/~stan.yang/fineui-dec into feature/x

master
stan.yang 5 days ago
parent
commit
4e3eed5094
  1. BIN
      packages/fineui/dist/font/iconfont.eot
  2. 6
      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. 28
      packages/fineui/src/core/utils/dom.js
  7. 9
      packages/fineui/src/widget/timeinterval/timeinterval.js
  8. 1
      packages/fineui/typescript/widget/timeinterval/timeinterval.ts

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

Binary file not shown.

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

@ -14,6 +14,12 @@
/> />
<missing-glyph /> <missing-glyph />
<glyph glyph-name="a-sanjiaozhongxiao" unicode="&#60267;" d="M560.028 496h-224c-13.184 0-20.708-15.052-12.8-25.6l112-149.332c6.4-8.536 19.2-8.536 25.6 0l112 149.332c7.912 10.548 0.384 25.6-12.8 25.6z" horiz-adv-x="1024" />
<glyph glyph-name="jdy" unicode="&#60265;" d="M88.328 301.696l5.888-65.268C99.76 175.028 151.22 128 212.868 128 278.664 128 332 181.336 332 247.132V660H252v-412.868c0-21.612-17.52-39.132-39.132-39.132a39.132 39.132 0 0 0-38.976 35.616l-6.388 70.804-79.176-12.724zM640 660h-80v-196h-112c-44.184 0-80-35.816-80-80v-176c0-44.184 35.816-80 80-80h160a32 32 0 0 1 32 32V660z m-96-452h-80a16 16 0 0 0-16 16v144a16 16 0 0 0 16 16h80a16 16 0 0 0 16-16v-144a16 16 0 0 0-16-16z m221.328-57.508L657.148 464h84.628l66.688-193.256L866.012 464h83.472l-99.6-334.46-12.424-50.864a151.112 151.112 0 0 0-131.38-114.468l-8.164 79.584a71.112 71.112 0 0 1 61.832 53.868l10.408 42.612a50.772 50.772 0 0 0-4.828 10.22z" horiz-adv-x="1024" />
<glyph glyph-name="jiasu_" unicode="&#60264;" d="M608.84 782.772c0 46.484-58.812 66.976-87.908 30.628l-350.08-437.324c-25.76-32.184-2.752-79.756 38.576-79.756h205.732v-311.092c0-46.484 58.812-66.972 87.908-30.628l350.08 437.324c25.764 32.184 2.752 79.756-38.576 79.756H608.84V782.772z" horiz-adv-x="1024" />
<glyph glyph-name="shishicaiji" unicode="&#60263;" d="M184 56h656V712H184v-656zM112 768a16 16 0 0 0 16 16h768a16 16 0 0 0 16-16v-768a16 16 0 0 0-16-16H128a16 16 0 0 0-16 16V768z m684.676-249.92c0-43.036-34.72-77.924-77.548-77.924a77.52 77.52 0 0 0-15.82 1.624l-81.8-139.268a67.44 67.44 0 0 0 12.32-38.98c0-37.296-30.092-67.532-67.208-67.532s-67.208 30.236-67.208 67.532c0 8.076 1.412 15.82 4 23L403.92 358.84a61.544 61.544 0 0 0-28.58-6.996c-3.012 0-5.968 0.216-8.864 0.632l-36.256-64.852a57.068 57.068 0 0 0 11.516-34.48c0-31.56-25.46-57.144-56.868-57.144S228 221.584 228 253.144c0 31.556 25.46 57.14 56.868 57.14 1.532 0 3.052-0.06 4.552-0.18l36.856 65.924a62.252 62.252 0 0 0-12.976 38.152c0 34.428 27.776 62.34 62.04 62.34 34.26 0 62.036-27.912 62.036-62.34 0-6.868-1.108-13.48-3.152-19.664l99.32-72.184a66.628 66.628 0 0 0 33.076 8.732c5.672 0 11.176-0.704 16.436-2.032l79.644 135.596a77.86 77.86 0 0 0-21.12 53.448c0 43.04 34.72 77.924 77.548 77.924s77.548-34.888 77.548-77.92z" horiz-adv-x="1024" /> <glyph glyph-name="shishicaiji" unicode="&#60263;" d="M184 56h656V712H184v-656zM112 768a16 16 0 0 0 16 16h768a16 16 0 0 0 16-16v-768a16 16 0 0 0-16-16H128a16 16 0 0 0-16 16V768z m684.676-249.92c0-43.036-34.72-77.924-77.548-77.924a77.52 77.52 0 0 0-15.82 1.624l-81.8-139.268a67.44 67.44 0 0 0 12.32-38.98c0-37.296-30.092-67.532-67.208-67.532s-67.208 30.236-67.208 67.532c0 8.076 1.412 15.82 4 23L403.92 358.84a61.544 61.544 0 0 0-28.58-6.996c-3.012 0-5.968 0.216-8.864 0.632l-36.256-64.852a57.068 57.068 0 0 0 11.516-34.48c0-31.56-25.46-57.144-56.868-57.144S228 221.584 228 253.144c0 31.556 25.46 57.14 56.868 57.14 1.532 0 3.052-0.06 4.552-0.18l36.856 65.924a62.252 62.252 0 0 0-12.976 38.152c0 34.428 27.776 62.34 62.04 62.34 34.26 0 62.036-27.912 62.036-62.34 0-6.868-1.108-13.48-3.152-19.664l99.32-72.184a66.628 66.628 0 0 0 33.076 8.732c5.672 0 11.176-0.704 16.436-2.032l79.644 135.596a77.86 77.86 0 0 0-21.12 53.448c0 43.04 34.72 77.924 77.548 77.924s77.548-34.888 77.548-77.92z" horiz-adv-x="1024" />
<glyph glyph-name="mulu1" unicode="&#60233;" d="M369.7664 528.384a28.672 28.672 0 0 0-28.433067-28.842667 28.672 28.672 0 0 0-28.433066 28.8768 28.672 28.672 0 0 0 28.433066 28.8768 28.672 28.672 0 0 0 28.433067-28.8768zM369.7664 384a28.672 28.672 0 0 0-28.433067-28.8768 28.672 28.672 0 0 0-28.433066 28.8768 28.672 28.672 0 0 0 28.433066 28.8768 28.672 28.672 0 0 0 28.433067-28.8768zM369.7664 239.616a28.672 28.672 0 0 0-28.433067-28.910933 28.672 28.672 0 0 0-28.433066 28.8768 28.672 28.672 0 0 0 28.433066 28.8768 28.672 28.672 0 0 0 28.433067-28.8768zM426.666667 528.384c0 11.9808 9.557333 21.674667 21.333333 21.674667h241.7664a21.504 21.504 0 0 0 21.333333-21.640534 21.504 21.504 0 0 0-21.333333-21.674666h-241.7664a21.504 21.504 0 0 0-21.333333 21.674666zM426.666667 384c0 11.946667 9.557333 21.674667 21.333333 21.674667h241.7664a21.504 21.504 0 0 0 21.333333-21.674667 21.504 21.504 0 0 0-21.333333-21.674667h-241.7664A21.504 21.504 0 0 0 426.666667 384zM426.666667 239.616c0 11.946667 9.557333 21.640533 21.333333 21.640533h241.7664a21.504 21.504 0 0 0 21.333333-21.674666 21.504 21.504 0 0 0-21.333333-21.640534h-241.7664a21.504 21.504 0 0 0-21.333333 21.640534zM796.433067 716.117333c7.850667 0 14.2336-6.4512 14.2336-14.404266v-635.426134a14.336 14.336 0 0 0-14.2336-14.4384H227.566933a14.336 14.336 0 0 0-14.2336 14.4384V701.713067a14.336 14.336 0 0 0 14.2336 14.4384h568.866134zM227.566933 759.466667C196.164267 759.466667 170.666667 733.5936 170.666667 701.713067v-635.426134C170.666667 34.4064 196.130133 8.533333 227.566933 8.533333h568.866134c31.402667 0 56.900267 25.873067 56.900266 57.7536V701.713067C853.333333 733.5936 827.869867 759.466667 796.433067 759.466667H227.566933z" horiz-adv-x="1024" /> <glyph glyph-name="mulu1" unicode="&#60233;" d="M369.7664 528.384a28.672 28.672 0 0 0-28.433067-28.842667 28.672 28.672 0 0 0-28.433066 28.8768 28.672 28.672 0 0 0 28.433066 28.8768 28.672 28.672 0 0 0 28.433067-28.8768zM369.7664 384a28.672 28.672 0 0 0-28.433067-28.8768 28.672 28.672 0 0 0-28.433066 28.8768 28.672 28.672 0 0 0 28.433066 28.8768 28.672 28.672 0 0 0 28.433067-28.8768zM369.7664 239.616a28.672 28.672 0 0 0-28.433067-28.910933 28.672 28.672 0 0 0-28.433066 28.8768 28.672 28.672 0 0 0 28.433066 28.8768 28.672 28.672 0 0 0 28.433067-28.8768zM426.666667 528.384c0 11.9808 9.557333 21.674667 21.333333 21.674667h241.7664a21.504 21.504 0 0 0 21.333333-21.640534 21.504 21.504 0 0 0-21.333333-21.674666h-241.7664a21.504 21.504 0 0 0-21.333333 21.674666zM426.666667 384c0 11.946667 9.557333 21.674667 21.333333 21.674667h241.7664a21.504 21.504 0 0 0 21.333333-21.674667 21.504 21.504 0 0 0-21.333333-21.674667h-241.7664A21.504 21.504 0 0 0 426.666667 384zM426.666667 239.616c0 11.946667 9.557333 21.640533 21.333333 21.640533h241.7664a21.504 21.504 0 0 0 21.333333-21.674666 21.504 21.504 0 0 0-21.333333-21.640534h-241.7664a21.504 21.504 0 0 0-21.333333 21.640534zM796.433067 716.117333c7.850667 0 14.2336-6.4512 14.2336-14.404266v-635.426134a14.336 14.336 0 0 0-14.2336-14.4384H227.566933a14.336 14.336 0 0 0-14.2336 14.4384V701.713067a14.336 14.336 0 0 0 14.2336 14.4384h568.866134zM227.566933 759.466667C196.164267 759.466667 170.666667 733.5936 170.666667 701.713067v-635.426134C170.666667 34.4064 196.130133 8.533333 227.566933 8.533333h568.866134c31.402667 0 56.900267 25.873067 56.900266 57.7536V701.713067C853.333333 733.5936 827.869867 759.466667 796.433067 759.466667H227.566933z" horiz-adv-x="1024" />

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

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.

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

@ -2,7 +2,7 @@
* 对DOM操作的通用函数 * 对DOM操作的通用函数
*/ */
import $ from "jquery"; import $ from "jquery";
import { each, isEmpty, isNotNull, isNull } from "../2.base"; import { each, isEmpty, isNotEmptyObject } from "../2.base";
import { Widget } from "../4.widget"; import { Widget } from "../4.widget";
import { isIE } from "./../platform"; import { isIE } from "./../platform";
@ -102,23 +102,37 @@ export function getTextSizeHeight(text, fontSize = 12) {
} }
// 获取滚动条的宽度,页面display: none时候获取到的为0 // 获取滚动条的宽度,页面display: none时候获取到的为0
let _scrollWidth = null; const _scrollWidthMap = {};
export function getScrollWidth(css) { export function getScrollWidth(css) {
if (isNull(_scrollWidth) || isNotNull(css) || _scrollWidth === 0) { /**
const ul = Widget._renderEngine.createElement("<div>").width(50).height(50) * 指定 scrollbar-width: none;
* 支持的浏览器版本结果肯定为 0无需重复计算
*/
const supportScrollWidth = 'scrollbarWidth' in document.documentElement.style;
const hasNoneScrollWidth =
supportScrollWidth && isNotEmptyObject(css) && [css["scrollbar-width"], css["scrollbarWidth"]].includes("none");
const key = JSON.stringify(css) || "default";
if (hasNoneScrollWidth) {
return 0;
} else if (!_scrollWidthMap[key]) {
const ul = Widget._renderEngine
.createElement("<div>")
.width(50)
.height(50)
.css({ .css({
position: "absolute", position: "absolute",
top: "-9999px", top: "-9999px",
overflow: "scroll", overflow: "scroll",
...css ...css,
}) })
.appendTo("body"); .appendTo("body");
_scrollWidth = ul[0].offsetWidth - ul[0].clientWidth; _scrollWidthMap[key] = ul[0].offsetWidth - ul[0].clientWidth;
ul.destroy(); ul.destroy();
} }
return _scrollWidth; return _scrollWidthMap[key];
} }
export function getImage(param, fillStyle, backgroundColor) { export function getImage(param, fillStyle, backgroundColor) {

9
packages/fineui/src/widget/timeinterval/timeinterval.js

@ -31,6 +31,7 @@ export class TimeInterval extends Single {
static EVENT_CHANGE = "EVENT_CHANGE"; static EVENT_CHANGE = "EVENT_CHANGE";
static EVENT_BEFORE_START_POPUPVIEW = "EVENT_BEFORE_START_POPUPVIEW"; static EVENT_BEFORE_START_POPUPVIEW = "EVENT_BEFORE_START_POPUPVIEW";
static EVENT_BEFORE_END_POPUPVIEW = "EVENT_BEFORE_END_POPUPVIEW"; static EVENT_BEFORE_END_POPUPVIEW = "EVENT_BEFORE_END_POPUPVIEW";
static EVENT_BEFORE_YEAR_MONTH_POPUPVIEW = "EVENT_BEFORE_YEAR_MONTH_POPUPVIEW";
_defaultConfig() { _defaultConfig() {
const conf = super._defaultConfig(...arguments); const conf = super._defaultConfig(...arguments);
@ -102,6 +103,14 @@ export class TimeInterval extends Single {
watermark, watermark,
value: v, value: v,
height: o.height, height: o.height,
listeners: [
{
eventName: DynamicDateTimeCombo.EVENT_BEFORE_YEAR_MONTH_POPUPVIEW,
action: () => {
this.fireEvent(TimeInterval.EVENT_BEFORE_YEAR_MONTH_POPUPVIEW);
},
},
],
}); });
combo.on(DynamicDateTimeCombo.EVENT_ERROR, () => { combo.on(DynamicDateTimeCombo.EVENT_ERROR, () => {
this._clearTitle(); this._clearTitle();

1
packages/fineui/typescript/widget/timeinterval/timeinterval.ts

@ -8,6 +8,7 @@ export declare class TimeInterval extends Single {
static EVENT_ERROR: string; static EVENT_ERROR: string;
static EVENT_BEFORE_START_POPUPVIEW: string; static EVENT_BEFORE_START_POPUPVIEW: string;
static EVENT_BEFORE_END_POPUPVIEW: string; static EVENT_BEFORE_END_POPUPVIEW: string;
static EVENT_BEFORE_YEAR_MONTH_POPUPVIEW: string;
props: { props: {
minDate?: string; minDate?: string;

Loading…
Cancel
Save