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: [{
el: {
type: "bi.text_item",
cls: "bi-list-item-select",
cls: "bi-border-radius bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
text: o.text,
@ -22,7 +22,7 @@ BI.CalendarDateItem = BI.inherit(BI.BasicButton, {
left: o.lgap,
right: o.rgap,
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) {
return {
type: "bi.label",
height: BI.SIZE_CONSANTS.DATE_LIST_ITEM_HEIGHT,
height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
text: value
};
});
@ -101,7 +101,7 @@ BI.Calendar = BI.inherit(BI.Widget, {
columns: 7,
rows: 6,
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 () {
@ -162,7 +162,7 @@ BI.Calendar = BI.inherit(BI.Widget, {
whiteSpace: "normal",
once: false,
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,
disabled: td.lastMonth || td.nextMonth || td.disabled,
lgap: 2,

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

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

2
src/core/system.js

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

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

@ -10,4 +10,7 @@
.line-segment-button-line {
.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,
el: this.trigger,
popup: {
minWidth: 85,
minWidth: 100,
stopPropagation: false,
el: this.popup
el: {
type: "bi.vertical",
hgap: 6,
items: [this.popup]
}
}
});
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",
items: [{
el: this.calendar,
hgap: 5,
hgap: 12,
bgap: 7
}]
}, {

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

@ -31,11 +31,10 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
columns: 2,
rows: 6,
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",
vgap: 1,
hgap: 2
vgap: 2,
}],
value: o.value
});
@ -63,13 +62,13 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-select",
cls: "bi-border-radius bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
forceSelected: true,
height: BI.SIZE_CONSANTS.DATE_LIST_ITEM_HEIGHT - 1,
width: 38,
height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT - 1,
width: 30,
value: td,
text: 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 () {
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
});
},

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

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

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

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

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

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

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

@ -25,7 +25,7 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
whiteSpace: "nowrap",
once: false,
forceSelected: true,
height: BI.SIZE_CONSANTS.DATE_LIST_ITEM_HEIGHT - 1,
height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT - 1,
width: 38,
value: td,
text: td,
@ -77,7 +77,7 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
columns: 2,
rows: 6,
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",
vgap: 1,

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

@ -7,7 +7,7 @@
*/
BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
constants: {
tabHeight: 30,
tabHeight: 40,
},
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.extend(item, {
type: "bi.text_item",
cls: "bi-list-item-select",
cls: "bi-border-radius bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -72,7 +72,8 @@ BI.StaticYearQuarterCard = BI.inherit(BI.Widget, {
items: this._createQuarter(),
layouts: [{
type: "bi.vertical",
vgap: 10
vgap: 10,
hgap: 12,
}],
value: o.value,
listeners: [{

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

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

Loading…
Cancel
Save