diff --git a/packages/fineui/dist/font/iconfont.eot b/packages/fineui/dist/font/iconfont.eot
index b006514f8..2bcb77c86 100644
Binary files a/packages/fineui/dist/font/iconfont.eot and b/packages/fineui/dist/font/iconfont.eot differ
diff --git a/packages/fineui/dist/font/iconfont.svg b/packages/fineui/dist/font/iconfont.svg
index 691e36b7d..2fcab0a04 100644
--- a/packages/fineui/dist/font/iconfont.svg
+++ b/packages/fineui/dist/font/iconfont.svg
@@ -14,6 +14,12 @@
/>
+
+
+
+
+
+
diff --git a/packages/fineui/dist/font/iconfont.ttf b/packages/fineui/dist/font/iconfont.ttf
index d1cb7537c..c0dd73e45 100644
Binary files a/packages/fineui/dist/font/iconfont.ttf and b/packages/fineui/dist/font/iconfont.ttf differ
diff --git a/packages/fineui/dist/font/iconfont.woff b/packages/fineui/dist/font/iconfont.woff
index f70a516ce..be66647c1 100644
Binary files a/packages/fineui/dist/font/iconfont.woff and b/packages/fineui/dist/font/iconfont.woff differ
diff --git a/packages/fineui/dist/font/iconfont.woff2 b/packages/fineui/dist/font/iconfont.woff2
index 62468d5b4..a31812d97 100644
Binary files a/packages/fineui/dist/font/iconfont.woff2 and b/packages/fineui/dist/font/iconfont.woff2 differ
diff --git a/packages/fineui/src/core/utils/dom.js b/packages/fineui/src/core/utils/dom.js
index 275aa3adf..a917a4de6 100644
--- a/packages/fineui/src/core/utils/dom.js
+++ b/packages/fineui/src/core/utils/dom.js
@@ -2,7 +2,7 @@
* 对DOM操作的通用函数
*/
import $ from "jquery";
-import { each, isEmpty, isNotNull, isNull } from "../2.base";
+import { each, isEmpty, isNotEmptyObject } from "../2.base";
import { Widget } from "../4.widget";
import { isIE } from "./../platform";
@@ -102,23 +102,37 @@ export function getTextSizeHeight(text, fontSize = 12) {
}
// 获取滚动条的宽度,页面display: none时候获取到的为0
-let _scrollWidth = null;
+const _scrollWidthMap = {};
export function getScrollWidth(css) {
- if (isNull(_scrollWidth) || isNotNull(css) || _scrollWidth === 0) {
- const ul = Widget._renderEngine.createElement("
").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("
")
+ .width(50)
+ .height(50)
.css({
position: "absolute",
top: "-9999px",
overflow: "scroll",
- ...css
+ ...css,
})
.appendTo("body");
- _scrollWidth = ul[0].offsetWidth - ul[0].clientWidth;
+ _scrollWidthMap[key] = ul[0].offsetWidth - ul[0].clientWidth;
ul.destroy();
}
- return _scrollWidth;
+ return _scrollWidthMap[key];
}
export function getImage(param, fillStyle, backgroundColor) {
diff --git a/packages/fineui/src/widget/timeinterval/timeinterval.js b/packages/fineui/src/widget/timeinterval/timeinterval.js
index 4a4b580d7..11808d69c 100644
--- a/packages/fineui/src/widget/timeinterval/timeinterval.js
+++ b/packages/fineui/src/widget/timeinterval/timeinterval.js
@@ -31,6 +31,7 @@ export class TimeInterval extends Single {
static EVENT_CHANGE = "EVENT_CHANGE";
static EVENT_BEFORE_START_POPUPVIEW = "EVENT_BEFORE_START_POPUPVIEW";
static EVENT_BEFORE_END_POPUPVIEW = "EVENT_BEFORE_END_POPUPVIEW";
+ static EVENT_BEFORE_YEAR_MONTH_POPUPVIEW = "EVENT_BEFORE_YEAR_MONTH_POPUPVIEW";
_defaultConfig() {
const conf = super._defaultConfig(...arguments);
@@ -102,6 +103,14 @@ export class TimeInterval extends Single {
watermark,
value: v,
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, () => {
this._clearTitle();
diff --git a/packages/fineui/typescript/widget/dynamicdate/dynamicdate.combo.ts b/packages/fineui/typescript/widget/dynamicdate/dynamicdate.combo.ts
index a4f82a741..52fb6c560 100644
--- a/packages/fineui/typescript/widget/dynamicdate/dynamicdate.combo.ts
+++ b/packages/fineui/typescript/widget/dynamicdate/dynamicdate.combo.ts
@@ -22,6 +22,7 @@ export declare class DynamicDateCombo extends Single {
format?: string;
allowEdit?: boolean;
supportDynamic?: boolean;
+ supportWorkDay?: boolean;
attributes?: {
tabIndex?: number;
};
diff --git a/packages/fineui/typescript/widget/timeinterval/timeinterval.ts b/packages/fineui/typescript/widget/timeinterval/timeinterval.ts
index e7a72f9af..4b8d0f1f4 100644
--- a/packages/fineui/typescript/widget/timeinterval/timeinterval.ts
+++ b/packages/fineui/typescript/widget/timeinterval/timeinterval.ts
@@ -8,11 +8,13 @@ export declare class TimeInterval extends Single {
static EVENT_ERROR: string;
static EVENT_BEFORE_START_POPUPVIEW: string;
static EVENT_BEFORE_END_POPUPVIEW: string;
+ static EVENT_BEFORE_YEAR_MONTH_POPUPVIEW: string;
props: {
minDate?: string;
maxDate?: string;
supportDynamic?: boolean;
+ supportWorkDay?: boolean;
watermark?: string;
simple?: boolean;
container?: string;