When Vue calculates the default value of the attribute, it is correct to choose the question. When it is not selected, it returns 0, but he returns NAN.

computed: {

cartPrice() {
   let tmp = 0
   let tmpArr =[]
  if (this.goodsList.length) {
    tmpArr = this.goodsList.map(value => value.isChecked==true && value)
    tmpArr.forEach(value => (tmp += value.count * value.PRESENT_PRICE))
  }

  return tmp;
}

}

Jun.07,2022

actually return tmp | | 0 that's it < del > ~ < / del > < del > ~ < / del > I'm a pig--


  

conditional judgment statement is not accurate
false & & item returns false
replace map with filter

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