mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 17:02:38 +00:00
Refactor #5066
This commit is contained in:
parent
1d106ea054
commit
1a8ffe6f0a
1 changed files with 1 additions and 1 deletions
|
@ -62,7 +62,7 @@ export default {
|
||||||
percent(meter) {
|
percent(meter) {
|
||||||
const percentOfItem = ((meter - this.min) / (this.max - this.min)) * 100;
|
const percentOfItem = ((meter - this.min) / (this.max - this.min)) * 100;
|
||||||
|
|
||||||
return Math.max(0, Math.min(100, percentOfItem));
|
return Math.round(Math.max(0, Math.min(100, percentOfItem)));
|
||||||
},
|
},
|
||||||
percentValue(meter) {
|
percentValue(meter) {
|
||||||
return this.percent(meter) + '%';
|
return this.percent(meter) + '%';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue