From f09927972fc4898ba478f69e32f98268088f914e Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 12 Jan 2022 15:42:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/calendar/calendar.date.item.js | 4 ++-- src/case/calendar/calendar.js | 6 +++--- src/case/calendar/calendar.year.js | 4 ++-- src/core/system.js | 2 -- src/less/base/segment/button.segment.less | 3 +++ src/widget/date/calendar/combo.month.date.js | 8 ++++++-- src/widget/date/calendar/popup.calendar.date.js | 2 +- src/widget/date/calendar/popup.month.js | 11 +++++------ src/widget/date/calendar/trigger.triangle.date.js | 2 +- src/widget/dynamicdate/dynamicdate.popup.js | 2 +- src/widget/dynamicdatetime/dynamicdatetime.popup.js | 2 +- src/widget/year/popup.year.js | 2 +- src/widget/yearmonth/card.static.yearmonth.js | 4 ++-- src/widget/yearmonth/popup.yearmonth.js | 2 +- src/widget/yearquarter/card.static.yearquarter.js | 5 +++-- src/widget/yearquarter/popup.yearquarter.js | 2 +- 16 files changed, 33 insertions(+), 28 deletions(-) diff --git a/src/case/calendar/calendar.date.item.js b/src/case/calendar/calendar.date.item.js index 9da26c663..f5212fa0c 100644 --- a/src/case/calendar/calendar.date.item.js +++ b/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 }] }; }, diff --git a/src/case/calendar/calendar.js b/src/case/calendar/calendar.js index 733e3a662..3de5fa77d 100644 --- a/src/case/calendar/calendar.js +++ b/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, diff --git a/src/case/calendar/calendar.year.js b/src/case/calendar/calendar.year.js index 29679bb41..95fcaccdb 100644 --- a/src/case/calendar/calendar.year.js +++ b/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 diff --git a/src/core/system.js b/src/core/system.js index 8de9226a7..d12fb9154 100644 --- a/src/core/system.js +++ b/src/core/system.js @@ -16,8 +16,6 @@ LIST_ITEM_HEIGHT: 24, TRIGGER_HEIGHT: 24, TOAST_TOP: 10, - // 根据控件类型特化尺寸 - DATE_LIST_ITEM_HEIGHT: 24 } }; diff --git a/src/less/base/segment/button.segment.less b/src/less/base/segment/button.segment.less index 07f6cab2c..acb0a7b43 100644 --- a/src/less/base/segment/button.segment.less +++ b/src/less/base/segment/button.segment.less @@ -10,4 +10,7 @@ .line-segment-button-line { .transition(background 0.3s); } + &.active, &:active { + font-weight: bold; + } } diff --git a/src/widget/date/calendar/combo.month.date.js b/src/widget/date/calendar/combo.month.date.js index cbdb552dc..49139cb26 100644 --- a/src/widget/date/calendar/combo.month.date.js +++ b/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 () { diff --git a/src/widget/date/calendar/popup.calendar.date.js b/src/widget/date/calendar/popup.calendar.date.js index 1a353afef..ce2892f55 100644 --- a/src/widget/date/calendar/popup.calendar.date.js +++ b/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 }] }, { diff --git a/src/widget/date/calendar/popup.month.js b/src/widget/date/calendar/popup.month.js index 32fa25698..23d262424 100644 --- a/src/widget/date/calendar/popup.month.js +++ b/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) diff --git a/src/widget/date/calendar/trigger.triangle.date.js b/src/widget/date/calendar/trigger.triangle.date.js index e77bef98c..32c61dc1f 100644 --- a/src/widget/date/calendar/trigger.triangle.date.js +++ b/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 }); }, diff --git a/src/widget/dynamicdate/dynamicdate.popup.js b/src/widget/dynamicdate/dynamicdate.popup.js index b2d0e76ef..d72c67323 100644 --- a/src/widget/dynamicdate/dynamicdate.popup.js +++ b/src/widget/dynamicdate/dynamicdate.popup.js @@ -1,6 +1,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, { constants: { - tabHeight: 30, + tabHeight: 40, }, props: { diff --git a/src/widget/dynamicdatetime/dynamicdatetime.popup.js b/src/widget/dynamicdatetime/dynamicdatetime.popup.js index d4b30b141..a06b3764e 100644 --- a/src/widget/dynamicdatetime/dynamicdatetime.popup.js +++ b/src/widget/dynamicdatetime/dynamicdatetime.popup.js @@ -1,6 +1,6 @@ BI.DynamicDateTimePopup = BI.inherit(BI.Widget, { constants: { - tabHeight: 30, + tabHeight: 40, buttonHeight: 24 }, diff --git a/src/widget/year/popup.year.js b/src/widget/year/popup.year.js index 73afd9681..7645f3974 100644 --- a/src/widget/year/popup.year.js +++ b/src/widget/year/popup.year.js @@ -7,7 +7,7 @@ */ BI.DynamicYearPopup = BI.inherit(BI.Widget, { constants: { - tabHeight: 30, + tabHeight: 40, }, props: { diff --git a/src/widget/yearmonth/card.static.yearmonth.js b/src/widget/yearmonth/card.static.yearmonth.js index 6483a675b..09ff4ac2f 100644 --- a/src/widget/yearmonth/card.static.yearmonth.js +++ b/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, diff --git a/src/widget/yearmonth/popup.yearmonth.js b/src/widget/yearmonth/popup.yearmonth.js index 66dec8de2..c0d715efb 100644 --- a/src/widget/yearmonth/popup.yearmonth.js +++ b/src/widget/yearmonth/popup.yearmonth.js @@ -7,7 +7,7 @@ */ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, { constants: { - tabHeight: 30, + tabHeight: 40, }, props: { diff --git a/src/widget/yearquarter/card.static.yearquarter.js b/src/widget/yearquarter/card.static.yearquarter.js index 62e329130..78cdb518c 100644 --- a/src/widget/yearquarter/card.static.yearquarter.js +++ b/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: [{ diff --git a/src/widget/yearquarter/popup.yearquarter.js b/src/widget/yearquarter/popup.yearquarter.js index de49b4ef6..bf8d7c392 100644 --- a/src/widget/yearquarter/popup.yearquarter.js +++ b/src/widget/yearquarter/popup.yearquarter.js @@ -1,6 +1,6 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, { constants: { - tabHeight: 30, + tabHeight: 40, buttonHeight: 24 },