mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-03-16 22:10:27 +00:00
[rating-bar] add support to custom font icon
This commit is contained in:
parent
e72757fa3a
commit
a5285b2b87
1 changed files with 10 additions and 2 deletions
|
|
@ -4,13 +4,13 @@
|
|||
<md-icon v-for="i in numStars" :key="i"
|
||||
@mouseover.native="hoverStars"
|
||||
@click.native="clickStars"
|
||||
@mouseout.native="onMouseOut">star</md-icon>
|
||||
@mouseout.native="onMouseOut">{{ backIcon }}</md-icon>
|
||||
</div>
|
||||
<div class="front-stars" :style="frontStarsStyle">
|
||||
<md-icon v-for="i in numStars"
|
||||
@mouseover.native="hoverStars"
|
||||
@click.native="clickStars"
|
||||
@mouseout.native="onMouseOut">star</md-icon>
|
||||
@mouseout.native="onMouseOut">{{ frontIcon }}</md-icon>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -35,6 +35,14 @@
|
|||
return value >= 0 && value <= 1;
|
||||
},
|
||||
default: 0
|
||||
},
|
||||
frontIcon: {
|
||||
type: String,
|
||||
default: 'star'
|
||||
},
|
||||
backIcon: {
|
||||
type: String,
|
||||
default: 'star'
|
||||
}
|
||||
},
|
||||
mixins: [theme],
|
||||
|
|
|
|||
Loading…
Reference in a new issue