Browse Source

BI-107080 fix: 【6.0三轮回归】只有时间过滤组件无限制的时候悬浮无tooltip

es6
zsmj 2 years ago
parent
commit
8205b3f294
  1. 3
      src/widget/dynamicdate/dynamicdate.trigger.js
  2. 12
      src/widget/dynamicdatetime/dynamicdatetime.trigger.js
  3. 3
      src/widget/time/time.trigger.js
  4. 2
      src/widget/yearquarter/trigger.yearquarter.js

3
src/widget/dynamicdate/dynamicdate.trigger.js

@ -152,6 +152,9 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
_getTitle: function () {
var storeValue = this.storeValue || {};
if (BI.isEmptyObject(storeValue)) {
return this.options.watermark;
}
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {

12
src/widget/dynamicdatetime/dynamicdatetime.trigger.js

@ -9,7 +9,7 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
iconWidth: 24
},
props: {
props: () => ({
extraCls: "bi-date-time-trigger",
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
@ -17,8 +17,8 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
iconWidth: 24,
format: "", // 显示的日期格式化方式
allowEdit: true, // 是否允许编辑
watermark: ""
},
watermark: BI.i18nText("BI-Basic_Unrestricted"),
}),
_init: function () {
BI.DynamicDateTimeTrigger.superclass._init.apply(this, arguments);
@ -44,7 +44,7 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true,
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
watermark: o.watermark,
errorText: function (v) {
var str = "";
if (!BI.isKey(o.format)) {
@ -149,7 +149,11 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
},
_getTitle: function () {
var o = this.options;
var storeValue = this.storeValue || {};
if (BI.isEmptyObject(storeValue)) {
return o.watermark;
}
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {

3
src/widget/time/time.trigger.js

@ -157,6 +157,9 @@
_getTitle: function () {
var storeValue = this.storeValue || {};
if (BI.isEmptyObject(storeValue)) {
return this.options.watermark;
}
var date = BI.getDate();
return BI.print(BI.getDate(date.getFullYear(), 0, 1, storeValue.hour, storeValue.minute, storeValue.second), this._getFormatString());
},

2
src/widget/yearquarter/trigger.yearquarter.js

@ -249,9 +249,7 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
value = value || {};
var quarter = BI.isNull(value.quarter) ? null : value.quarter;
this.yearEditor.setValue(value.year);
this.yearEditor.setTitle(value.year);
this.quarterEditor.setValue(quarter);
this.quarterEditor.setTitle(quarter);
this.setTitle(this._getStaticTitle(value));
break;
}

Loading…
Cancel
Save