Commit b5e1430d3ccefb92a8daa5dc632603f720e9cc1e
1 parent
2baba209
Fix rating when init value is decimal
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
src/components/rate/rate.vue
@@ -47,7 +47,7 @@ | @@ -47,7 +47,7 @@ | ||
47 | prefixCls: prefixCls, | 47 | prefixCls: prefixCls, |
48 | hoverIndex: -1, | 48 | hoverIndex: -1, |
49 | isHover: false, | 49 | isHover: false, |
50 | - isHalf: false, | 50 | + isHalf: this.allowHalf && this.value % 1 == 0.5, |
51 | currentValue: this.value | 51 | currentValue: this.value |
52 | }; | 52 | }; |
53 | }, | 53 | }, |
@@ -127,4 +127,4 @@ | @@ -127,4 +127,4 @@ | ||
127 | } | 127 | } |
128 | } | 128 | } |
129 | }; | 129 | }; |
130 | -</script> | ||
131 | \ No newline at end of file | 130 | \ No newline at end of file |
131 | +</script> |