The problem behind the decimal point of the data number in Vue, unable to display a number similar to 1.00?

recently, using vue, to display data requires saving unified two decimal places, such as 1.11, but if you save 1.00, the Console.log will directly be 1 instead of 1.00. How to solve this problem

data () {

return {
    number1: 1.00,
    number2: 1.12
}

}

because to sort these of numeric types, calculate averages and so on, you need numeric types

Apr.08,2021

you can use Number.toFixed (2)
var a = 1;
a.toFixed (2) / / a = 1.00


  computed: {
    strNumber1: function () {
      // `this`  vm 
      return this.number1.toFixed(2)
    }
  }

ide/computed.html-sharp%E8%AE%A1%E7%AE%97%E5%B1%9E%E6%80%A7" rel=" nofollow noreferrer "> calculation properties

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-1b3d45f-2c384.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-1b3d45f-2c384.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?