Redo rating template to sync with latest PrimeReact version

pull/5/head
cagataycivici 2018-12-24 23:19:18 +03:00
parent 6908614ec9
commit ece2604344
2 changed files with 6 additions and 9 deletions

View File

@ -1,4 +1,4 @@
.p-rating a {
.p-rating .p-rating-icon {
cursor: pointer;
}
@ -6,7 +6,7 @@
font-size: 1.25em;
}
.p-rating.p-disabled a,
.p-rating.p-rating-readonly a {
.p-rating.p-disabled .p-rating-icon,
.p-rating.p-rating-readonly .p-rating-icon {
cursor: default;
}

View File

@ -1,11 +1,8 @@
<template>
<div :class="containerClass">
<a class="p-rating-cancel" v-if="cancel" @click="onCancelClick" tabindex="0">
<span class="p-rating-icon pi pi-ban"></span>
</a>
<a :key="i" v-for="i in stars" @click="onStarClick($event,i)" tabindex="0" @keydown.enter.prevent="onStarClick($event,i)">
<span :class="['p-rating-icon', {'pi pi-star-o': (i > value), 'pi pi-star': (i <= value)}]"></span>
</a>
<span class="p-rating-icon p-rating-cancel pi pi-ban" tabindex="0" v-if="cancel" @click="onCancelClick"></span>
<span :key="i" v-for="i in stars" @click="onStarClick($event,i)" tabindex="0" @keydown.enter.prevent="onStarClick($event,i)"
:class="['p-rating-icon', {'pi pi-star-o': (i > value), 'pi pi-star': (i <= value)}]"></span>
</div>
</template>