mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-03-16 22:10:27 +00:00
[rating-bar] remove unnecessary codes
This commit is contained in:
parent
004bfea9e0
commit
660bf87613
1 changed files with 2 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="md-rating-bar" :class="[themeClass]" :disabled="disabled">
|
||||
<div class="back-stars" :disabled="disabled">
|
||||
<md-icon v-for="i in numStars" :key="i"
|
||||
<md-icon v-for="i in numStars"
|
||||
@mouseover.native="hoverStars"
|
||||
@click.native="clickStars"
|
||||
@mouseout.native="onMouseOut">{{ backIcon }}</md-icon>
|
||||
|
|
@ -68,9 +68,7 @@
|
|||
methods: {
|
||||
hoverStars(evt) {
|
||||
if (!this.disabled) {
|
||||
var selected = this.getIconIndex(evt.target);
|
||||
|
||||
this.rating = selected / this.numStars;
|
||||
this.rating = this.getIconIndex(evt.target) / this.numStars;
|
||||
}
|
||||
},
|
||||
clickStars(evt) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue