resolver-egretimp-plus 0.1.55 → 0.1.56

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resolver-egretimp-plus",
3
- "version": "0.1.55",
3
+ "version": "0.1.56",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -346,9 +346,17 @@ export default {
346
346
  })
347
347
  const defaultTotalFn = (total, val, row) => {
348
348
  if (val === undefined || val === null) {
349
- val = !isNaN(Number(val)) ? 0 : ''
349
+ val = 0
350
+ if (val === undefined) {
351
+ val = ''
352
+ }
350
353
  } else {
351
- val = val.toString().replace(/[^\d\.]/g, '')
354
+ const strVal = val.toString()
355
+ const negativeFlag = /^-/.test(strVal)
356
+ val = strVal.replace(/[^\d\.]/g, '')
357
+ if (negativeFlag) {
358
+ val = `-${val}`
359
+ }
352
360
  }
353
361
  const numFlag = !isNaN(Number(val))
354
362
  if (total === null || total === undefined) {