From 03a22ec6f9ad7303d10b4c65bb5bc6fa5cbd448a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 22 十月 2022 23:21:42 +0800 Subject: [PATCH] 2022-10-22 --- src/tabviews/custom/components/table/edit-table/index.jsx | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/src/tabviews/custom/components/table/edit-table/index.jsx b/src/tabviews/custom/components/table/edit-table/index.jsx index 631fd32..51a6a06 100644 --- a/src/tabviews/custom/components/table/edit-table/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/index.jsx @@ -228,6 +228,15 @@ item.$Index = start + index + '' item.$type = 'upt' item.$origin = true + + if (config.absFields) { + config.absFields.forEach(f => { + if (!isNaN(item[f])) { + item[f] = Math.abs(item[f]) + } + }) + } + return item }) @@ -287,6 +296,14 @@ _data.$type = 'upt' _data.$origin = true + if (config.absFields) { + config.absFields.forEach(f => { + if (!isNaN(_data[f])) { + _data[f] = Math.abs(_data[f]) + } + }) + } + try { data = data.map(item => { if (item.$$uuid === _data.$$uuid) { -- Gitblit v1.8.0