Commit 77e4c204a65927849e98f910860ee2bc663eb05d
1 parent
e493492e
fixed #1761
Showing
3 changed files
with
8 additions
and
8 deletions
Show diff stats
examples/routers/rate.vue
... | ... | @@ -2,11 +2,11 @@ |
2 | 2 | <div> |
3 | 3 | <Rate v-model="value"></Rate> |
4 | 4 | <Rate allow-half v-model="valueHalf"></Rate> |
5 | - <Rate show-text v-model="valueText"></Rate> | |
6 | - <Rate show-text allow-half v-model="valueCustomText"> | |
7 | - <span style="color: #f5a623">{{ valueCustomText }}</span> | |
8 | - </Rate> | |
9 | - <Rate disabled allow-half v-model="valueDisabled"></Rate> | |
5 | + <!--<Rate show-text v-model="valueText"></Rate>--> | |
6 | + <!--<Rate show-text allow-half v-model="valueCustomText">--> | |
7 | + <!--<span style="color: #f5a623">{{ valueCustomText }}</span>--> | |
8 | + <!--</Rate>--> | |
9 | + <!--<Rate disabled allow-half v-model="valueDisabled"></Rate>--> | |
10 | 10 | </div> |
11 | 11 | </template> |
12 | 12 | <script> |
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | value: 0, |
17 | 17 | valueHalf: 2.5, |
18 | 18 | valueText: 3, |
19 | - valueCustomText: 3.8, | |
19 | + valueCustomText: 4.0, | |
20 | 20 | valueDisabled: 2.4 |
21 | 21 | } |
22 | 22 | } | ... | ... |
package.json
src/components/rate/rate.vue
... | ... | @@ -114,7 +114,7 @@ |
114 | 114 | this.hoverIndex = -1; |
115 | 115 | }, |
116 | 116 | setHalf (val) { |
117 | - this.isHalf = val.toString().indexOf('.') >= 0; | |
117 | + this.isHalf = this.allowHalf && val.toString().indexOf('.') >= 0; | |
118 | 118 | }, |
119 | 119 | handleClick (value) { |
120 | 120 | if (this.disabled) return; | ... | ... |