windy 3 years ago
parent
commit
f09927972f
  1. 4
      src/case/calendar/calendar.date.item.js
  2. 6
      src/case/calendar/calendar.js
  3. 4
      src/case/calendar/calendar.year.js
  4. 2
      src/core/system.js
  5. 3
      src/less/base/segment/button.segment.less
  6. 8
      src/widget/date/calendar/combo.month.date.js
  7. 2
      src/widget/date/calendar/popup.calendar.date.js
  8. 11
      src/widget/date/calendar/popup.month.js
  9. 2
      src/widget/date/calendar/trigger.triangle.date.js
  10. 2
      src/widget/dynamicdate/dynamicdate.popup.js
  11. 2
      src/widget/dynamicdatetime/dynamicdatetime.popup.js
  12. 2
      src/widget/year/popup.year.js
  13. 4
      src/widget/yearmonth/card.static.yearmonth.js
  14. 2
      src/widget/yearmonth/popup.yearmonth.js
  15. 5
      src/widget/yearquarter/card.static.yearquarter.js
  16. 2
      src/widget/yearquarter/popup.yearquarter.js

4
src/case/calendar/calendar.date.item.js

@ -10,7 +10,7 @@ BI.CalendarDateItem = BI.inherit(BI.BasicButton, {
items: [{ items: [{
el: { el: {
type: "bi.text_item", type: "bi.text_item",
cls: "bi-list-item-select", cls: "bi-border-radius bi-list-item-select",
textAlign: "center", textAlign: "center",
whiteSpace: "normal", whiteSpace: "normal",
text: o.text, text: o.text,
@ -22,7 +22,7 @@ BI.CalendarDateItem = BI.inherit(BI.BasicButton, {
left: o.lgap, left: o.lgap,
right: o.rgap, right: o.rgap,
top: o.tgap, top: o.tgap,
bottom: o.rgap bottom: o.bgap
}] }]
}; };
}, },

6
src/case/calendar/calendar.js

@ -78,7 +78,7 @@ BI.Calendar = BI.inherit(BI.Widget, {
var items = BI.map(this._getWeekLabel(), function (i, value) { var items = BI.map(this._getWeekLabel(), function (i, value) {
return { return {
type: "bi.label", type: "bi.label",
height: BI.SIZE_CONSANTS.DATE_LIST_ITEM_HEIGHT, height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
text: value text: value
}; };
}); });
@ -101,7 +101,7 @@ BI.Calendar = BI.inherit(BI.Widget, {
columns: 7, columns: 7,
rows: 6, rows: 6,
columnSize: [1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7], columnSize: [1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7],
rowSize: BI.SIZE_CONSANTS.DATE_LIST_ITEM_HEIGHT + 10 rowSize: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT + 8
}))] }))]
}); });
this.days.on(BI.Controller.EVENT_CHANGE, function () { this.days.on(BI.Controller.EVENT_CHANGE, function () {
@ -162,7 +162,7 @@ BI.Calendar = BI.inherit(BI.Widget, {
whiteSpace: "normal", whiteSpace: "normal",
once: false, once: false,
forceSelected: true, forceSelected: true,
height: BI.SIZE_CONSANTS.DATE_LIST_ITEM_HEIGHT + 10, height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT + 8,
value: o.year + "-" + month + "-" + td.text, value: o.year + "-" + month + "-" + td.text,
disabled: td.lastMonth || td.nextMonth || td.disabled, disabled: td.lastMonth || td.nextMonth || td.disabled,
lgap: 2, lgap: 2,

4
src/case/calendar/calendar.year.js

@ -51,7 +51,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
columns: 2, columns: 2,
rows: 6, rows: 6,
columnSize: [1 / 2, 1 / 2], columnSize: [1 / 2, 1 / 2],
rowSize: BI.SIZE_CONSANTS.DATE_LIST_ITEM_HEIGHT, rowSize: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
})), { })), {
type: "bi.center_adapt", type: "bi.center_adapt",
vgap: 2 vgap: 2
@ -112,7 +112,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
whiteSpace: "normal", whiteSpace: "normal",
once: false, once: false,
forceSelected: true, forceSelected: true,
height: BI.SIZE_CONSANTS.DATE_LIST_ITEM_HEIGHT, height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
width: 45, width: 45,
value: td.text, value: td.text,
disabled: td.disabled disabled: td.disabled

2
src/core/system.js

@ -16,8 +16,6 @@
LIST_ITEM_HEIGHT: 24, LIST_ITEM_HEIGHT: 24,
TRIGGER_HEIGHT: 24, TRIGGER_HEIGHT: 24,
TOAST_TOP: 10, TOAST_TOP: 10,
// 根据控件类型特化尺寸
DATE_LIST_ITEM_HEIGHT: 24
} }
}; };

3
src/less/base/segment/button.segment.less

@ -10,4 +10,7 @@
.line-segment-button-line { .line-segment-button-line {
.transition(background 0.3s); .transition(background 0.3s);
} }
&.active, &:active {
font-weight: bold;
}
} }

8
src/widget/date/calendar/combo.month.date.js

@ -41,9 +41,13 @@ BI.MonthDateCombo = BI.inherit(BI.Trigger, {
isNeedAdjustWidth: false, isNeedAdjustWidth: false,
el: this.trigger, el: this.trigger,
popup: { popup: {
minWidth: 85, minWidth: 100,
stopPropagation: false, stopPropagation: false,
el: this.popup el: {
type: "bi.vertical",
hgap: 6,
items: [this.popup]
}
} }
}); });
this.combo.on(BI.Combo.EVENT_CHANGE, function () { this.combo.on(BI.Combo.EVENT_CHANGE, function () {

2
src/widget/date/calendar/popup.calendar.date.js

@ -87,7 +87,7 @@ BI.DateCalendarPopup = BI.inherit(BI.Widget, {
type: "bi.vertical", type: "bi.vertical",
items: [{ items: [{
el: this.calendar, el: this.calendar,
hgap: 5, hgap: 12,
bgap: 7 bgap: 7
}] }]
}, { }, {

11
src/widget/date/calendar/popup.month.js

@ -31,11 +31,10 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
columns: 2, columns: 2,
rows: 6, rows: 6,
columnSize: [1 / 2, 1 / 2], columnSize: [1 / 2, 1 / 2],
rowSize: BI.SIZE_CONSANTS.DATE_LIST_ITEM_HEIGHT + 1 rowSize: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1
})), { })), {
type: "bi.center_adapt", type: "bi.center_adapt",
vgap: 1, vgap: 2,
hgap: 2
}], }],
value: o.value value: o.value
}); });
@ -63,13 +62,13 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) { return BI.map(item, function (j, td) {
return { return {
type: "bi.text_item", type: "bi.text_item",
cls: "bi-list-item-select", cls: "bi-border-radius bi-list-item-select",
textAlign: "center", textAlign: "center",
whiteSpace: "nowrap", whiteSpace: "nowrap",
once: false, once: false,
forceSelected: true, forceSelected: true,
height: BI.SIZE_CONSANTS.DATE_LIST_ITEM_HEIGHT - 1, height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT - 1,
width: 38, width: 30,
value: td, value: td,
text: td, text: td,
disabled: !BI.contains(m, td) disabled: !BI.contains(m, td)

2
src/widget/date/calendar/trigger.triangle.date.js

@ -14,7 +14,7 @@ BI.DateTriangleTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend( BI.DateTriangleTrigger.superclass._defaultConfig.apply(this, arguments), { return BI.extend( BI.DateTriangleTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-date-triangle-trigger pull-down-ha-font cursor-pointer", baseCls: "bi-date-triangle-trigger solid-triangle-bottom-font cursor-pointer",
height: 24 height: 24
}); });
}, },

2
src/widget/dynamicdate/dynamicdate.popup.js

@ -1,6 +1,6 @@
BI.DynamicDatePopup = BI.inherit(BI.Widget, { BI.DynamicDatePopup = BI.inherit(BI.Widget, {
constants: { constants: {
tabHeight: 30, tabHeight: 40,
}, },
props: { props: {

2
src/widget/dynamicdatetime/dynamicdatetime.popup.js

@ -1,6 +1,6 @@
BI.DynamicDateTimePopup = BI.inherit(BI.Widget, { BI.DynamicDateTimePopup = BI.inherit(BI.Widget, {
constants: { constants: {
tabHeight: 30, tabHeight: 40,
buttonHeight: 24 buttonHeight: 24
}, },

2
src/widget/year/popup.year.js

@ -7,7 +7,7 @@
*/ */
BI.DynamicYearPopup = BI.inherit(BI.Widget, { BI.DynamicYearPopup = BI.inherit(BI.Widget, {
constants: { constants: {
tabHeight: 30, tabHeight: 40,
}, },
props: { props: {

4
src/widget/yearmonth/card.static.yearmonth.js

@ -25,7 +25,7 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
whiteSpace: "nowrap", whiteSpace: "nowrap",
once: false, once: false,
forceSelected: true, forceSelected: true,
height: BI.SIZE_CONSANTS.DATE_LIST_ITEM_HEIGHT - 1, height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT - 1,
width: 38, width: 38,
value: td, value: td,
text: td, text: td,
@ -77,7 +77,7 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
columns: 2, columns: 2,
rows: 6, rows: 6,
columnSize: [1 / 2, 1 / 2], columnSize: [1 / 2, 1 / 2],
rowSize: BI.SIZE_CONSANTS.DATE_LIST_ITEM_HEIGHT + 1 rowSize: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1
})), { })), {
type: "bi.center_adapt", type: "bi.center_adapt",
vgap: 1, vgap: 1,

2
src/widget/yearmonth/popup.yearmonth.js

@ -7,7 +7,7 @@
*/ */
BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, { BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
constants: { constants: {
tabHeight: 30, tabHeight: 40,
}, },
props: { props: {

5
src/widget/yearquarter/card.static.yearquarter.js

@ -23,7 +23,7 @@ BI.StaticYearQuarterCard = BI.inherit(BI.Widget, {
return BI.map(items, function (j, item) { return BI.map(items, function (j, item) {
return BI.extend(item, { return BI.extend(item, {
type: "bi.text_item", type: "bi.text_item",
cls: "bi-list-item-select", cls: "bi-border-radius bi-list-item-select",
textAlign: "center", textAlign: "center",
whiteSpace: "nowrap", whiteSpace: "nowrap",
once: false, once: false,
@ -72,7 +72,8 @@ BI.StaticYearQuarterCard = BI.inherit(BI.Widget, {
items: this._createQuarter(), items: this._createQuarter(),
layouts: [{ layouts: [{
type: "bi.vertical", type: "bi.vertical",
vgap: 10 vgap: 10,
hgap: 12,
}], }],
value: o.value, value: o.value,
listeners: [{ listeners: [{

2
src/widget/yearquarter/popup.yearquarter.js

@ -1,6 +1,6 @@
BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, { BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, {
constants: { constants: {
tabHeight: 30, tabHeight: 40,
buttonHeight: 24 buttonHeight: 24
}, },

Loading…
Cancel
Save