Browse Source

Pull request #2186: REPORT-59338 统一修改日期类控件边框造成size不正确的问题

Merge in VISUAL/fineui from ~TELLER/fineui:master to master

* commit '585f31b7f4e61f9900ca476d766bbe64499bc321':
  refactor: 统一格式
  REPORT-59338 fix: 统一修改日期类控件边框造成size不正确的问题
es6
Teller 3 years ago
parent
commit
394033fcae
  1. 7
      src/widget/dynamicdate/dynamicdate.combo.js
  2. 7
      src/widget/dynamicdatetime/dynamicdatetime.combo.js
  3. 2
      src/widget/time/time.combo.js
  4. 7
      src/widget/yearmonth/combo.yearmonth.js
  5. 7
      src/widget/yearquarter/combo.yearquarter.js

7
src/widget/dynamicdate/dynamicdate.combo.js

@ -7,7 +7,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
}, },
props: { props: {
baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius", baseCls: "bi-dynamic-date-combo",
height: 24, height: 24,
minDate: "1900-01-01", minDate: "1900-01-01",
maxDate: "2099-12-31", maxDate: "2099-12-31",
@ -22,8 +22,6 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
}, },
_init: function () { _init: function () {
var o = this.options;
o.height -= 2;
BI.DynamicDateCombo.superclass._init.apply(this, arguments); BI.DynamicDateCombo.superclass._init.apply(this, arguments);
}, },
@ -50,6 +48,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
items: [{ items: [{
el: { el: {
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-border-radius bi-focus-shadow",
container: opts.container, container: opts.container,
ref: function () { ref: function () {
self.combo = this; self.combo = this;
@ -65,7 +64,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
format: opts.format, format: opts.format,
allowEdit: opts.allowEdit, allowEdit: opts.allowEdit,
watermark: opts.watermark, watermark: opts.watermark,
height: opts.height, height: opts.height - 2,
value: opts.value, value: opts.value,
ref: function () { ref: function () {
self.trigger = this; self.trigger = this;

7
src/widget/dynamicdatetime/dynamicdatetime.combo.js

@ -7,7 +7,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
}, },
props: { props: {
baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius", baseCls: "bi-dynamic-date-combo",
height: 24, height: 24,
minDate: "1900-01-01", minDate: "1900-01-01",
maxDate: "2099-12-31", maxDate: "2099-12-31",
@ -22,8 +22,6 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
}, },
_init: function () { _init: function () {
var o = this.options;
o.height -= 2;
BI.DynamicDateTimeCombo.superclass._init.apply(this, arguments); BI.DynamicDateTimeCombo.superclass._init.apply(this, arguments);
}, },
@ -50,6 +48,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
items: [{ items: [{
el: { el: {
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-border-radius bi-focus-shadow",
destroyWhenHide: true, destroyWhenHide: true,
container: opts.container, container: opts.container,
ref: function () { ref: function () {
@ -65,7 +64,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
allowEdit: opts.allowEdit, allowEdit: opts.allowEdit,
watermark: opts.watermark, watermark: opts.watermark,
format: opts.format, format: opts.format,
height: opts.height, height: opts.height - 2,
value: opts.value, value: opts.value,
ref: function () { ref: function () {
self.trigger = this; self.trigger = this;

2
src/widget/time/time.combo.js

@ -72,7 +72,7 @@
isNeedAdjustWidth: opts.isNeedAdjustWidth, isNeedAdjustWidth: opts.isNeedAdjustWidth,
el: { el: {
type: "bi.time_trigger", type: "bi.time_trigger",
height: opts.height, height: opts.height - 2,
allowEdit: opts.allowEdit, allowEdit: opts.allowEdit,
watermark: opts.watermark, watermark: opts.watermark,
format: opts.format, format: opts.format,

7
src/widget/yearmonth/combo.yearmonth.js

@ -1,7 +1,7 @@
BI.DynamicYearMonthCombo = BI.inherit(BI.Single, { BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
props: { props: {
baseCls: "bi-year-month-combo bi-border bi-border-radius bi-focus-shadow", baseCls: "bi-year-month-combo",
behaviors: {}, behaviors: {},
minDate: "1900-01-01", // 最小日期 minDate: "1900-01-01", // 最小日期
maxDate: "2099-12-31", // 最大日期 maxDate: "2099-12-31", // 最大日期
@ -13,8 +13,6 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
_init: function () { _init: function () {
var self = this, o = this.options; var self = this, o = this.options;
o.height -= 2;
BI.isNumeric(o.width) && (o.width -= 2);
BI.DynamicYearMonthCombo.superclass._init.apply(this, arguments); BI.DynamicYearMonthCombo.superclass._init.apply(this, arguments);
this.storeValue = o.value; this.storeValue = o.value;
this.storeTriggerValue = ""; this.storeTriggerValue = "";
@ -22,7 +20,7 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
type: "bi.dynamic_year_month_trigger", type: "bi.dynamic_year_month_trigger",
min: o.minDate, min: o.minDate,
max: o.maxDate, max: o.maxDate,
height: o.height, height: o.height - 2,
value: o.value || "" value: o.value || ""
}); });
this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN, function () { this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN, function () {
@ -61,6 +59,7 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-border-radius bi-focus-shadow",
container: o.container, container: o.container,
isNeedAdjustHeight: o.isNeedAdjustHeight, isNeedAdjustHeight: o.isNeedAdjustHeight,
isNeedAdjustWidth: o.isNeedAdjustWidth, isNeedAdjustWidth: o.isNeedAdjustWidth,

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

@ -1,7 +1,7 @@
BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, { BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-year-quarter-combo bi-border bi-border-radius bi-focus-shadow", baseCls: "bi-year-quarter-combo",
behaviors: {}, behaviors: {},
minDate: "1900-01-01", // 最小日期 minDate: "1900-01-01", // 最小日期
maxDate: "2099-12-31", // 最大日期 maxDate: "2099-12-31", // 最大日期
@ -13,8 +13,6 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
_init: function () { _init: function () {
var self = this, o = this.options; var self = this, o = this.options;
o.height -= 2;
BI.isNumeric(o.width) && (o.width -= 2);
BI.DynamicYearQuarterCombo.superclass._init.apply(this, arguments); BI.DynamicYearQuarterCombo.superclass._init.apply(this, arguments);
this.storeValue = o.value; this.storeValue = o.value;
self.storeTriggerValue = ""; self.storeTriggerValue = "";
@ -22,7 +20,7 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
type: "bi.dynamic_year_quarter_trigger", type: "bi.dynamic_year_quarter_trigger",
min: o.minDate, min: o.minDate,
max: o.maxDate, max: o.maxDate,
height: o.height, height: o.height - 2,
value: o.value || "" value: o.value || ""
}); });
this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN, function () { this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN, function () {
@ -61,6 +59,7 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-border-radius bi-focus-shadow",
container: o.container, container: o.container,
isNeedAdjustHeight: o.isNeedAdjustHeight, isNeedAdjustHeight: o.isNeedAdjustHeight,
isNeedAdjustWidth: o.isNeedAdjustWidth, isNeedAdjustWidth: o.isNeedAdjustWidth,

Loading…
Cancel
Save