After binding the data input input box in v-modle, watch monitors the input data and automatically calculates the difference

< el-form-item label= "and value:" prop= "a" >

<el-input v-model="formData.a" placeholder=""></el-input>

< / el-form-item >
< el-form-item label= "value 1:" prop= "b" >

<el-input v-model="formData.b" placeholder=""></el-input>

< / el-form-item >
< el-form-item label= "value 2:" prop= "c" >

<el-input v-model="formData.c"  placeholder=""></el-input>

< / el-form-item >

add:
"formData.b" (val) {

to watch
    if (this.formData.a && this.formData.b) {
      this.formData.c = parseFloat(this.formData.a) - parseFloat(this.formData.b);
    }
  },
  "formData.c"(val) {
    if (this.formData.a && this.formData.c) {
      this.formData.b = parseFloat(this.formData.a) - parseFloat(this.formData.c);
    }
  },

when you enter a value of 0.4 for the sum of 6 ~ # b at run time, the value of b changes to 0.4000000000000000. as shown in the figure below, how to solve it?

Mar.05,2021
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-1ea4a1b-1ced.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-1ea4a1b-1ced.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?