gcs-ui-lib 1.2.17 → 1.2.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -115,12 +115,12 @@ export default {
115
115
  //笔|条 数
116
116
  return coins.length
117
117
  }
118
-
119
- return coins.reduce((amount, item) => {
120
- const o1 = new Decimal(`${amount}`)
121
- const o2 = new Decimal(`${item[c.key]}`)
122
- return amountFormat(o1.plus(o2))
123
- }, 0)
118
+ const total = coins.reduce((amount, item) => {
119
+ const o1 = new Decimal(`${amount || 0}`)
120
+ const o2 = new Decimal(`${item[c.key] || 0}`)
121
+ return o1.plus(o2)
122
+ }, new Decimal(0))
123
+ return amountFormat(total, 2)
124
124
  })()
125
125
  }))
126
126
  }