Vue calculation properties and methods

calculate the gap value by calculating properties and methods. If it is negative, the font is red, and the positive number is green

.
<div class="maintain_mon">
    <p class="tit">FYC

<ul v-for="item in numbs"> <li><i>{{item.checkValue}}</i>

</li> <li><i>{{item.currentValue}}</i>

</li> <li> <i>{{(item.currentValue - item.checkValue).toFixed(2)}}</i>

</li> </ul> </div> <div class="promote" v-for="module in arr"> <div class="maintain_mon" v-for="item in module.promote"> <p class="tit">{{item.tit}}

<ul v-for="item1 in item.assess"> <li><i>{{item1.checkValue}}</i>

</li> <li><i>{{item1.currentValue}}</i>

</li> <li> <i>{{item1.currentValue - item1.checkValue}.toFixed(2)}</i>

</li> </ul> </div> </div>

effect
clipboard.png

how to write judgment?

Mar.10,2022

js:

data () {
  return {
   
  }
},
methods: {
  diff: function (currentValue, checkValue) {
    return (currentValue - checkValue).toFixed(2)
  }
}

html:

 <li>
    <i :class='[diff(25, 5) > 0 ? "green-font" : "red-font"]'>{{diff(25, 5)}}</i>
    

</li>
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b370f8-2b7de.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b370f8-2b7de.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?