mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
Merge commit 'c1b63af5f5408d5ce9c1d45560480a6fd4bd52a9' into pro
This commit is contained in:
commit
170473fb2d
@ -633,10 +633,7 @@ export default {
|
||||
|
||||
getVoteProgress(msgData, id) {
|
||||
const num = msgData.votes.filter(h => (h.votes || '').indexOf(id) != -1).length
|
||||
let progress = '0.00';
|
||||
if(num){
|
||||
progress = (msgData.votes.length / num * 100).toFixed(2)
|
||||
}
|
||||
const progress = !num ? '0.00' : (num / msgData.votes.length * 100).toFixed(2);
|
||||
return { num, progress };
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user