</div>
</div>
export default{ props:{ size: { type: Number }, score: { type: Number }, starAll: { type: Number } }, computed:{ showWidth(){ let res = parseInt( this.score / this.starAll * 100) ; return 'width:'+res+'%'; } } }
.star-box{
position: relative;
overflow: hidden;
display: inline-block;
vertical-align: middle;
span{
display:inline-block;
}
.star-y{
position: absolute;
top: 0;
left: 0;
overflow:hidden;
}
.star-g{
}
}
.col-g{
color: gray;
}
.col-y{
color: orange;
}