Browse Source

Pull request #1752: BI-81001 fix: 修正年季度控件错误提示

Merge in VISUAL/fineui from ~WINDY/fui:master to master

* commit '916029f75eeb94ed1746953057c3982218d83f46':
  BI-81001 fix: 修正年季度控件错误提示
es6
windy 4 years ago
parent
commit
86556cb8c8
  1. 6
      src/widget/yearquarter/card.dynamic.yearquarter.js

6
src/widget/yearquarter/card.dynamic.yearquarter.js

@ -8,7 +8,7 @@
BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, { BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-year-month-card" baseCls: "bi-year-quarter-card"
}, },
render: function () { render: function () {
@ -78,7 +78,7 @@ BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, {
case BI.DynamicDateCard.TYPE.YEAR: case BI.DynamicDateCard.TYPE.YEAR:
valueMap.year = (value.offset === 0 ? -value.value : +value.value); valueMap.year = (value.offset === 0 ? -value.value : +value.value);
break; break;
case BI.DynamicDateCard.TYPE.MONTH: case BI.DynamicDateCard.TYPE.QUARTER:
valueMap.quarter = (value.offset === 0 ? -value.value : +value.value); valueMap.quarter = (value.offset === 0 ? -value.value : +value.value);
break; break;
default: default:
@ -108,7 +108,7 @@ BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, {
}, },
setValue: function (v) { setValue: function (v) {
v = v || {year: 0, month: 0}; v = v || {year: 0, quarter: 0};
this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR, v.year)); this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR, v.year));
this.quarter.setValue(this._createValue(BI.DynamicDateCard.TYPE.QUARTER, v.quarter)); this.quarter.setValue(this._createValue(BI.DynamicDateCard.TYPE.QUARTER, v.quarter));
}, },

Loading…
Cancel
Save