correction :modelValue property for Rating

pull/601/head
Tuğçe Küçükoğlu 2020-10-25 20:34:57 +03:00
parent f5434c89a5
commit f01ac70526
7 changed files with 14 additions and 14 deletions

View File

@ -51,7 +51,7 @@
<Column field="category" header="Category" :sortable="true"></Column>
<Column field="rating" header="Reviews" :sortable="true">
<template #body="slotProps">
<Rating :value="slotProps.data.rating" :readonly="true" :cancel="false" />
<Rating :modelValue="slotProps.data.rating" :readonly="true" :cancel="false" />
</template>
</Column>
<Column field="inventoryStatus" header="Status" :sortable="true">
@ -188,7 +188,7 @@
&lt;Column field="category" header="Category" :sortable="true"&gt;&lt;/Column&gt;
&lt;Column field="rating" header="Reviews" :sortable="true"&gt;
&lt;template #body="slotProps"&gt;
&lt;Rating :value="slotProps.data.rating" :readonly="true" :cancel="false" /&gt;
&lt;Rating :modelValue="slotProps.data.rating" :readonly="true" :cancel="false" /&gt;
&lt;/template&gt;
&lt;/Column&gt;
&lt;Column field="inventoryStatus" header="Status" :sortable="true"&gt;

View File

@ -32,7 +32,7 @@
<Column field="category" header="Category" sortable></Column>
<Column field="rating" header="Reviews" sortable>
<template #body="slotProps">
<Rating :value="slotProps.data.rating" :readonly="true" :cancel="false" />
<Rating :modelValue="slotProps.data.rating" :readonly="true" :cancel="false" />
</template>
</Column>
<Column field="inventoryStatus" header="Status" sortable>
@ -97,7 +97,7 @@
&lt;Column field="category" header="Category" sortable&gt;&lt;/Column&gt;
&lt;Column field="rating" header="Reviews" sortable&gt;
&lt;template #body="slotProps"&gt;
&lt;Rating :value="slotProps.data.rating" :readonly="true" :cancel="false" /&gt;
&lt;Rating :modelValue="slotProps.data.rating" :readonly="true" :cancel="false" /&gt;
&lt;/template&gt;
&lt;/Column&gt;
&lt;Column field="inventoryStatus" header="Status" sortable&gt;

View File

@ -30,7 +30,7 @@
<Column field="category" header="Category"></Column>
<Column field="rating" header="Reviews">
<template #body="slotProps">
<Rating :value="slotProps.data.rating" :readonly="true" :cancel="false" />
<Rating :modelValue="slotProps.data.rating" :readonly="true" :cancel="false" />
</template>
</Column>
<Column header="Status">
@ -71,7 +71,7 @@
&lt;Column field="category" header="Category"&gt;&lt;/Column&gt;
&lt;Column field="rating" header="Reviews"&gt;
&lt;template #body="slotProps"&gt;
&lt;Rating :value="slotProps.data.rating" :readonly="true" :cancel="false" /&gt;
&lt;Rating :modelValue="slotProps.data.rating" :readonly="true" :cancel="false" /&gt;
&lt;/template&gt;
&lt;/Column&gt;
&lt;Column header="Status"&gt;

View File

@ -28,7 +28,7 @@
<div class="product-list-detail">
<div class="product-name">{{slotProps.data.name}}</div>
<div class="product-description">{{slotProps.data.description}}</div>
<Rating :value="slotProps.data.rating" :readonly="true" :cancel="false"></Rating>
<Rating :modelValue="slotProps.data.rating" :readonly="true" :cancel="false"></Rating>
<i class="pi pi-tag product-category-icon"></i><span class="product-category">{{slotProps.data.category}}</span>
</div>
<div class="product-list-action">
@ -54,7 +54,7 @@
<img :src="'demo/images/product/' + slotProps.data.image" :alt="slotProps.data.name"/>
<div class="product-name">{{slotProps.data.name}}</div>
<div class="product-description">{{slotProps.data.description}}</div>
<Rating :value="slotProps.data.rating" :readonly="true" :cancel="false"></Rating>
<Rating :modelValue="slotProps.data.rating" :readonly="true" :cancel="false"></Rating>
</div>
<div class="product-grid-item-bottom">
<span class="product-price">${{slotProps.data.price}}</span>

View File

@ -440,7 +440,7 @@ export default {
&lt;div class="product-list-detail"&gt;
&lt;div class="product-name"&gt;{{slotProps.data.name}}&lt;/div&gt;
&lt;div class="product-description"&gt;{{slotProps.data.description}}&lt;/div&gt;
&lt;Rating :value="slotProps.data.rating" :readonly="true" :cancel="false"&gt;&lt;/Rating&gt;
&lt;Rating :modelValue="slotProps.data.rating" :readonly="true" :cancel="false"&gt;&lt;/Rating&gt;
&lt;i class="pi pi-tag product-category-icon"&gt;&lt;/i&gt;&lt;span class="product-category"&gt;{{slotProps.data.category}}&lt;/span&gt;
&lt;/div&gt;
&lt;div class="product-list-action"&gt;
@ -466,7 +466,7 @@ export default {
&lt;img :src="'demo/images/product/' + slotProps.data.image" :alt="slotProps.data.name"/&gt;
&lt;div class="product-name"&gt;{{slotProps.data.name}}&lt;/div&gt;
&lt;div class="product-description"&gt;{{slotProps.data.description}}&lt;/div&gt;
&lt;Rating :value="slotProps.data.rating" :readonly="true" :cancel="false"&gt;&lt;/Rating&gt;
&lt;Rating :modelValue="slotProps.data.rating" :readonly="true" :cancel="false"&gt;&lt;/Rating&gt;
&lt;/div&gt;
&lt;div class="product-grid-item-bottom"&gt;
&lt;span class="product-price"&gt;${{slotProps.data.price}}&lt;/span&gt;

View File

@ -16,10 +16,10 @@
<Rating v-model="val2" :cancel="false" />
<h5>ReadOnly</h5>
<Rating :value="5" :readonly="true" :stars="10" :cancel="false" />
<Rating :modelValue="5" :readonly="true" :stars="10" :cancel="false" />
<h5>Disabled</h5>
<Rating :value="8" :disabled="true" :stars="10" />
<Rating :modelValue="8" :disabled="true" :stars="10" />
</div>
</div>

View File

@ -149,10 +149,10 @@ import Rating from 'primevue/rating';
&lt;Rating v-model="val2" :cancel="false" /&gt;
&lt;h3&gt;ReadOnly&lt;/h3&gt;
&lt;Rating :value="5" :readonly="true" :stars="10" :cancel="false" /&gt;
&lt;Rating :modelValue="5" :readonly="true" :stars="10" :cancel="false" /&gt;
&lt;h3&gt;Disabled&lt;/h3&gt;
&lt;Rating :value="8" :disabled="true" :stars="10" /&gt;
&lt;Rating :modelValue="8" :disabled="true" :stars="10" /&gt;
</template>
</code></pre>