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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save