情形:后端传来属性值,数据类型为string。然后我需要把属性值转化为数字再相加
let _this = this
equipmentRes.data.forEach(function (elem, index) {
let str = elem.value - 0
_this.all.equipment += str
})
情形:后端传来属性值,数据类型为string。然后我需要把属性值转化为数字再相加
let _this = this
equipmentRes.data.forEach(function (elem, index) {
let str = elem.value - 0
_this.all.equipment += str
})