Browse Source

Merge pull request #215642 in DEC/fineui from release/11.0 to bugfix/11.0

* commit 'c02c27bf01a38ea0c774e6922dee350aff1c2397':
  auto upgrade version to 2.0.20221230161545
  ESIGN-110 feat: 反馈-tooltip
  BI-119217 fix: 【6.0.6冒烟】等比自适应-高清屏-宽度自适应预览,下拉树查看已选展示异常
  JSY-25726 fix: 【冒烟】年季度/年月/年月区间筛选器,输入非法值后清空,设置框仍然标红
  auto upgrade version to 2.0.20221230101648
  KERNEL-13948 docs: 修复combo_group demo接口错误
  auto upgrade version to 2.0.20221228163952
  REPORT-85533 fix: BI.parseDateTime方法对%l:%M:%S %P这种格式的日期如果带有秒数解析出错
  auto upgrade version to 2.0.20221226102617
  auto upgrade version to 2.0.20221223112542
  auto upgrade version to 2.0.20221223092552
  auto upgrade version to 2.0.20221221181657
  auto upgrade version to 2.0.20221221100651
research/test
superman 2 years ago
parent
commit
041dd4594e
  1. 3
      bi.lessconfig.json
  2. 4
      demo/js/core/abstract/combination/demo.combo_group.js
  3. 2
      package.json
  4. 13
      src/core/2.base.js
  5. 2
      src/core/platform/web/dom.js
  6. 24
      src/widget/yearmonth/combo.yearmonth.js
  7. 24
      src/widget/yearquarter/combo.yearquarter.js

3
bi.lessconfig.json

@ -29,7 +29,8 @@
"@color-bi-background-disabled-active-radio-content-theme-dark": "#606479", "@color-bi-background-disabled-active-radio-content-theme-dark": "#606479",
"@color-bi-background-disabled-active-checkbox-content": "#FFFFFF", "@color-bi-background-disabled-active-checkbox-content": "#FFFFFF",
"@color-bi-background-disabled-active-checkbox-content-theme-dark": "#606479", "@color-bi-background-disabled-active-checkbox-content-theme-dark": "#606479",
"@color-bi-background-tooltip-success": "#2E3A4D", "@color-bi-background-tooltip-success": "#3F506A",
"@color-bi-background-tooltip-failure": "#E65251",
"@color-bi-border-tooltip-success": "#2E3A4D", "@color-bi-border-tooltip-success": "#2E3A4D",
"@color-bi-background-toast-success": "#FFFFFF", "@color-bi-background-toast-success": "#FFFFFF",
"@color-bi-background-toast-warning": "#FFFFFF", "@color-bi-background-toast-warning": "#FFFFFF",

4
demo/js/core/abstract/combination/demo.combo_group.js

@ -12,7 +12,7 @@ Demo.Func = BI.inherit(BI.Widget, {
height: 25, height: 25,
iconCls: "close-ha-font" iconCls: "close-ha-font"
}, },
children: [{ items: [{
type: "bi.single_select_item", type: "bi.single_select_item",
height: 25, height: 25,
text: "一月", text: "一月",
@ -63,7 +63,7 @@ Demo.Func = BI.inherit(BI.Widget, {
}, },
width: 200 width: 200
}); });
childCombo.setValue(BI.deepClone(this.child)[0].children[0].value); childCombo.setValue(BI.deepClone(this.child)[0].items[0].value);
return BI.createWidget({ return BI.createWidget({
type: "bi.left", type: "bi.left",

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "fineui", "name": "fineui",
"version": "2.0.20221218194544", "version": "2.0.20221230161545",
"description": "fineui", "description": "fineui",
"main": "dist/fineui_without_conflict.min.js", "main": "dist/fineui_without_conflict.min.js",
"types": "dist/lib/index.d.ts", "types": "dist/lib/index.d.ts",

13
src/core/2.base.js

@ -1037,11 +1037,18 @@
return MM >= 1 && MM <= 12 && DD <= MD[MM - 1]; return MM >= 1 && MM <= 12 && DD <= MD[MM - 1];
}, },
/**
*
* @param str
* @param fmt
* @returns {Date|Date}
* 年月日缺省值为当前日期, 时分秒缺省值为0
*/
parseDateTime: function (str, fmt) { parseDateTime: function (str, fmt) {
var today = BI.getDate(); var today = BI.getDate();
var y = 0; var y;
var m = 0; var m;
var d = 1; var d;
// wei : 对于fmt为‘YYYYMM’或者‘YYYYMMdd’的格式,str的值为类似'201111'的形式,因为年月之间没有分隔符,所以正则表达式分割无效,导致bug7376。 // wei : 对于fmt为‘YYYYMM’或者‘YYYYMMdd’的格式,str的值为类似'201111'的形式,因为年月之间没有分隔符,所以正则表达式分割无效,导致bug7376。
var a = str.split(/\W+/); var a = str.split(/\W+/);
if (fmt.toLowerCase() == "%y%x" || fmt.toLowerCase() == "%y%x%d") { if (fmt.toLowerCase() == "%y%x" || fmt.toLowerCase() == "%y%x%d") {

2
src/core/platform/web/dom.js

@ -710,7 +710,7 @@
break; break;
} }
if (needAdaptHeight === true) { if (needAdaptHeight === true) {
popup.resetHeight && popup.resetHeight(Math.min(viewportBounds.height - position.top + (positionRelativeElement ? positionRelativeElement.getBoundingClientRect().top : 0), maxHeight)); popup.resetHeight && popup.resetHeight(Math.min(viewportBounds.height - position.top - (positionRelativeElement ? positionRelativeElement.getBoundingClientRect().top : 0), maxHeight));
} }
return position; return position;
}, },

24
src/widget/yearmonth/combo.yearmonth.js

@ -80,7 +80,8 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
ref: function () { ref: function () {
self.popup = this; self.popup = this;
}, },
listeners: [{ listeners: [
{
eventName: BI.DynamicYearMonthPopup.EVENT_CHANGE, eventName: BI.DynamicYearMonthPopup.EVENT_CHANGE,
action: function () { action: function () {
self.setValue(self.popup.getValue()); self.setValue(self.popup.getValue());
@ -91,6 +92,7 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
eventName: BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE, eventName: BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE,
action: function () { action: function () {
self.setValue(); self.setValue();
self.comboWrapper.element.removeClass("error");
self.combo.hideView(); self.combo.hideView();
self.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM); self.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM);
} }
@ -98,7 +100,10 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
eventName: BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE, eventName: BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE,
action: function () { action: function () {
var date = BI.getDate(); var date = BI.getDate();
self.setValue({ type: BI.DynamicYearMonthCombo.Static, value: { year: date.getFullYear(), month: date.getMonth() + 1 } }); self.setValue({
type: BI.DynamicYearMonthCombo.Static,
value: { year: date.getFullYear(), month: date.getMonth() + 1 }
});
self.combo.hideView(); self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM); self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
} }
@ -112,7 +117,8 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
self.combo.hideView(); self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM); self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
} }
}], }
],
behaviors: o.behaviors, behaviors: o.behaviors,
min: o.minDate, min: o.minDate,
max: o.maxDate max: o.maxDate
@ -130,7 +136,8 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
BI.createWidget({ BI.createWidget({
type: "bi.absolute", type: "bi.absolute",
element: this, element: this,
items: [{ items: [
{
el: { el: {
type: "bi.horizontal_fill", type: "bi.horizontal_fill",
columnSize: ["", "fill"], columnSize: ["", "fill"],
@ -138,7 +145,8 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
ref: function () { ref: function () {
self.comboWrapper = this; self.comboWrapper = this;
}, },
items: [{ items: [
{
el: { el: {
type: "bi.icon_button", type: "bi.icon_button",
cls: "bi-trigger-icon-button date-change-h-font", cls: "bi-trigger-icon-button date-change-h-font",
@ -148,13 +156,15 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
self.changeIcon = this; self.changeIcon = this;
} }
} }
}, this.combo] }, this.combo
]
}, },
top: 0, top: 0,
left: 0, left: 0,
right: 0, right: 0,
bottom: 0 bottom: 0
}] }
]
}); });
this._checkDynamicValue(o.value); this._checkDynamicValue(o.value);
}, },

24
src/widget/yearquarter/combo.yearquarter.js

@ -83,7 +83,8 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
ref: function () { ref: function () {
self.popup = this; self.popup = this;
}, },
listeners: [{ listeners: [
{
eventName: BI.DynamicYearQuarterPopup.EVENT_CHANGE, eventName: BI.DynamicYearQuarterPopup.EVENT_CHANGE,
action: function () { action: function () {
self.setValue(self.popup.getValue()); self.setValue(self.popup.getValue());
@ -94,6 +95,7 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
eventName: BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE, eventName: BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE,
action: function () { action: function () {
self.setValue(); self.setValue();
self.comboWrapper.element.removeClass("error");
self.combo.hideView(); self.combo.hideView();
self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM); self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM);
} }
@ -101,7 +103,10 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
eventName: BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE, eventName: BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE,
action: function () { action: function () {
var date = BI.getDate(); var date = BI.getDate();
self.setValue({ type: BI.DynamicYearMonthCombo.Static, value: { year: date.getFullYear(), quarter: BI.getQuarter(date) } }); self.setValue({
type: BI.DynamicYearMonthCombo.Static,
value: { year: date.getFullYear(), quarter: BI.getQuarter(date) }
});
self.combo.hideView(); self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM); self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
} }
@ -115,7 +120,8 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
self.combo.hideView(); self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM); self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
} }
}], }
],
behaviors: o.behaviors, behaviors: o.behaviors,
min: o.minDate, min: o.minDate,
max: o.maxDate max: o.maxDate
@ -133,7 +139,8 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
BI.createWidget({ BI.createWidget({
type: "bi.absolute", type: "bi.absolute",
element: this, element: this,
items: [{ items: [
{
el: { el: {
type: "bi.horizontal_fill", type: "bi.horizontal_fill",
columnSize: ["", "fill"], columnSize: ["", "fill"],
@ -141,7 +148,8 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
ref: function () { ref: function () {
self.comboWrapper = this; self.comboWrapper = this;
}, },
items: [{ items: [
{
el: { el: {
type: "bi.icon_button", type: "bi.icon_button",
cls: "bi-trigger-icon-button date-change-h-font", cls: "bi-trigger-icon-button date-change-h-font",
@ -151,13 +159,15 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
self.changeIcon = this; self.changeIcon = this;
} }
} }
}, this.combo] }, this.combo
]
}, },
top: 0, top: 0,
left: 0, left: 0,
right: 0, right: 0,
bottom: 0 bottom: 0
}] }
]
}); });
this._checkDynamicValue(o.value); this._checkDynamicValue(o.value);
}, },

Loading…
Cancel
Save