From 5e728712c5f0c0770e9ee56331893065ac782d05 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Tue, 19 Jan 2021 10:58:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?BI-80432=20fix:=20=E5=BD=93=E5=A4=A9?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E4=B8=8D=E5=9C=A8=E5=8F=AF=E9=80=89=E8=8C=83?= =?UTF-8?q?=E5=9B=B4=E5=86=85=E6=97=A0=E6=B3=95=E7=BF=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/date/calendar/popup.year.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/widget/date/calendar/popup.year.js b/src/widget/date/calendar/popup.year.js index c77471bc9..39cac5621 100644 --- a/src/widget/date/calendar/popup.year.js +++ b/src/widget/date/calendar/popup.year.js @@ -71,8 +71,8 @@ BI.YearPopup = BI.inherit(BI.Widget, { afterCardCreated: function () { this.setValue(self.selectedYear); var calendar = this.getSelectedCard(); - calendar && self.backBtn.setEnable(!calendar.isFrontYear()); - calendar && self.preBtn.setEnable(!calendar.isFinalYear()); + calendar && self.backBtn.setEnable(self._checkMinYearValid()); + calendar && self.preBtn.setEnable(self._checkMaxYearValid()); } }); @@ -87,12 +87,22 @@ BI.YearPopup = BI.inherit(BI.Widget, { } }, + _checkMinYearValid: function () { + var o = this.options; + return this.selectedYear > BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear(); + }, + + _checkMaxYearValid: function () { + var o = this.options; + return this.selectedYear < BI.parseDateTime(o.max, "%Y-%X-%d").getFullYear(); + }, + _checkMin: function () { var calendar = this.navigation.getSelectedCard(); if (BI.isNotNull(calendar)) { calendar.setMinDate(this.options.min); - this.backBtn.setEnable(!calendar.isFrontYear()); - this.preBtn.setEnable(!calendar.isFinalYear()); + this.backBtn.setEnable(this._checkMinYearValid()); + this.preBtn.setEnable(this._checkMaxYearValid()); } }, @@ -100,8 +110,8 @@ BI.YearPopup = BI.inherit(BI.Widget, { var calendar = this.navigation.getSelectedCard(); if (BI.isNotNull(calendar)) { calendar.setMaxDate(this.options.max); - this.backBtn.setEnable(!calendar.isFrontYear()); - this.preBtn.setEnable(!calendar.isFinalYear()); + this.backBtn.setEnable(this._checkMinYearValid()); + this.preBtn.setEnable(this._checkMaxYearValid()); } }, From e6b6e9e672d0e689d83dfedc82ce2c8f8d64f15b Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Tue, 19 Jan 2021 14:09:48 +0800 Subject: [PATCH 2/2] update --- src/less/base/tree/ztree.less | 4 ++-- src/less/core/utils/common.less | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/less/base/tree/ztree.less b/src/less/base/tree/ztree.less index 181aa69e4..c45be8d5a 100644 --- a/src/less/base/tree/ztree.less +++ b/src/less/base/tree/ztree.less @@ -35,11 +35,11 @@ vertical-align: top; display: inline-block; &:hover { - .background-color(@color-bi-background-highlight, 6%); + .background-color(@color-bi-background-highlight, 10%); } &:active { color: @color-bi-text-highlight; - .background-color(@color-bi-background-highlight, 6%); + .background-color(@color-bi-background-highlight, 15%); } } diff --git a/src/less/core/utils/common.less b/src/less/core/utils/common.less index 05d979099..1b5965b26 100644 --- a/src/less/core/utils/common.less +++ b/src/less/core/utils/common.less @@ -685,7 +685,7 @@ textarea { & .bi-textarea { color: @color-bi-text-black; } - .background-color(@color-bi-background-highlight, 6%); + .background-color(@color-bi-background-highlight, 10%); } &:active { color: @color-bi-text-highlight; @@ -695,7 +695,7 @@ textarea { & .bi-textarea { color: @color-bi-text-highlight; } - .background-color(@color-bi-background-highlight, 6%); + .background-color(@color-bi-background-highlight, 15%); } &.active { color: @color-bi-text-highlight; @@ -773,7 +773,7 @@ textarea { & .bi-textarea { color: @color-bi-text-black; } - .background-color(@color-bi-background-highlight, 6%); + .background-color(@color-bi-background-highlight, 10%); } &:active, &.active { color: @color-bi-text-highlight; @@ -783,7 +783,7 @@ textarea { & .bi-textarea { color: @color-bi-text-highlight; } - .background-color(@color-bi-background-highlight, 6%); + .background-color(@color-bi-background-highlight, 15%); } &.disabled { &, &:hover, &:active { @@ -812,7 +812,7 @@ textarea { & .bi-textarea { color: @color-bi-text; } - .background-color(@color-bi-background-highlight, 6%); + .background-color(@color-bi-background-highlight, 10%); } &:active, &.active { color: @color-bi-text-highlight; @@ -822,7 +822,7 @@ textarea { & .bi-textarea { color: @color-bi-text-highlight; } - .background-color(@color-bi-background-highlight, 6%); + .background-color(@color-bi-background-highlight, 15%); } &.disabled { &, &:hover, &:active { @@ -845,7 +845,7 @@ textarea { // 激活和选中时背景高亮 .bi-list-item-select { &:hover, &.hover { - .background-color(@color-bi-background-highlight, 6%); + .background-color(@color-bi-background-highlight, 10%); } &:active, &.active { color: @color-bi-text;