From e1da40623675cb22a48aa6291804a871d887a2ee Mon Sep 17 00:00:00 2001 From: neoliu6 Date: Tue, 5 May 2020 18:24:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E8=BF=87=E7=A8=8B=E4=B8=ADra?= =?UTF-8?q?te=E5=9C=A8disabled=E6=83=85=E5=86=B5=E4=B8=8B,=E6=95=B4?= =?UTF-8?q?=E6=95=B0=E4=BC=9A=E6=B8=B2=E6=9F=93=E6=88=90=E5=8D=8A=E6=98=9F?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/rate/src/rate.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/rate/src/rate.vue b/src/components/rate/src/rate.vue index 3702eac..08c804d 100644 --- a/src/components/rate/src/rate.vue +++ b/src/components/rate/src/rate.vue @@ -113,7 +113,7 @@ export default { const STAR_OFF_CLASS_NAME = 'at-rate__item--off' const STAR_HALF_CLASS_NAME = 'at-rate__item--half' - const isHalf = this.isHalf + const isHalf = this.disabled ? (this.value > Math.floor(this.value)) : this.isHalf const isHoverStar = this.hoverIndex !== -1 const currentIndex = isHoverStar ? this.hoverIndex : this.currentValue const lastItemIndex = Math.ceil(currentIndex)