Browse Source

REPORT-58805 feat: adjust可配置

es6
iapyang 3 years ago
parent
commit
5e92ab3f74
  1. 9
      src/widget/dynamicdate/dynamicdate.combo.js
  2. 9
      src/widget/dynamicdatetime/dynamicdatetime.combo.js
  3. 8
      src/widget/time/time.combo.js
  4. 9
      src/widget/yearmonth/combo.yearmonth.js
  5. 7
      src/widget/yearquarter/combo.yearquarter.js

9
src/widget/dynamicdate/dynamicdate.combo.js

@ -16,7 +16,9 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
supportDynamic: true,
attributes: {
tabIndex: -1
}
},
isNeedAdjustHeight: false,
isNeedAdjustWidth: false
},
_init: function () {
@ -53,8 +55,8 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
self.combo = this;
},
toggle: false,
isNeedAdjustHeight: false,
isNeedAdjustWidth: false,
isNeedAdjustHeight: opts.isNeedAdjustHeight,
isNeedAdjustWidth: opts.isNeedAdjustWidth,
destroyWhenHide: true,
el: {
type: "bi.dynamic_date_trigger",
@ -143,6 +145,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
popup: {
el: {
type: "bi.dynamic_date_popup",
width: opts.isNeedAdjustWidth ? opts.width : undefined,
supportDynamic: opts.supportDynamic,
behaviors: opts.behaviors,
min: opts.minDate,

9
src/widget/dynamicdatetime/dynamicdatetime.combo.js

@ -16,7 +16,9 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
supportDynamic: true,
attributes: {
tabIndex: -1
}
},
isNeedAdjustHeight: false,
isNeedAdjustWidth: false
},
_init: function () {
@ -54,8 +56,8 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
self.combo = this;
},
toggle: false,
isNeedAdjustHeight: false,
isNeedAdjustWidth: false,
isNeedAdjustHeight: opts.isNeedAdjustHeight,
isNeedAdjustWidth: opts.isNeedAdjustWidth,
el: {
type: "bi.dynamic_date_time_trigger",
min: opts.minDate,
@ -148,6 +150,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
popup: {
el: {
type: "bi.dynamic_date_time_popup",
width: opts.isNeedAdjustWidth ? opts.width : undefined,
supportDynamic: opts.supportDynamic,
behaviors: opts.behaviors,
min: opts.minDate,

8
src/widget/time/time.combo.js

@ -17,6 +17,8 @@
height: 24,
format: "",
allowEdit: false,
isNeedAdjustHeight: false,
isNeedAdjustWidth: false
},
_init: function () {
@ -66,8 +68,8 @@
cls: "bi-border bi-border-radius bi-focus-shadow",
container: opts.container,
toggle: false,
isNeedAdjustHeight: false,
isNeedAdjustWidth: false,
isNeedAdjustHeight: opts.isNeedAdjustHeight,
isNeedAdjustWidth: opts.isNeedAdjustWidth,
el: {
type: "bi.time_trigger",
height: opts.height,
@ -150,7 +152,7 @@
adjustLength: this.constants.comboAdjustHeight,
popup: {
el: popup,
width: this.constants.popupWidth,
width: opts.isNeedAdjustWidth ? opts.width : this.constants.popupWidth,
stopPropagation: false
},
hideChecker: function (e) {

9
src/widget/yearmonth/combo.yearmonth.js

@ -6,7 +6,9 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
minDate: "1900-01-01", // 最小日期
maxDate: "2099-12-31", // 最大日期
height: 24,
supportDynamic: true
supportDynamic: true,
isNeedAdjustHeight: false,
isNeedAdjustWidth: false
},
_init: function () {
@ -60,8 +62,8 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
this.combo = BI.createWidget({
type: "bi.combo",
container: o.container,
isNeedAdjustHeight: false,
isNeedAdjustWidth: false,
isNeedAdjustHeight: o.isNeedAdjustHeight,
isNeedAdjustWidth: o.isNeedAdjustWidth,
el: this.trigger,
destroyWhenHide: true,
adjustLength: 1,
@ -70,6 +72,7 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
stopPropagation: false,
el: {
type: "bi.dynamic_year_month_popup",
width: o.isNeedAdjustWidth ? o.width : undefined,
supportDynamic: o.supportDynamic,
ref: function () {
self.popup = this;

7
src/widget/yearquarter/combo.yearquarter.js

@ -7,6 +7,8 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
maxDate: "2099-12-31", // 最大日期
height: 24,
supportDynamic: true,
isNeedAdjustHeight: false,
isNeedAdjustWidth: false
},
_init: function () {
@ -60,8 +62,8 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
this.combo = BI.createWidget({
type: "bi.combo",
container: o.container,
isNeedAdjustHeight: false,
isNeedAdjustWidth: false,
isNeedAdjustHeight: o.isNeedAdjustHeight,
isNeedAdjustWidth: o.isNeedAdjustWidth,
el: this.trigger,
destroyWhenHide: true,
adjustLength: 1,
@ -70,6 +72,7 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
stopPropagation: false,
el: {
type: "bi.dynamic_year_quarter_popup",
width: o.isNeedAdjustWidth ? o.width : undefined,
supportDynamic: o.supportDynamic,
ref: function () {
self.popup = this;

Loading…
Cancel
Save