From 8518b48ca4ae71d3a58f33c9d2ad847de2f3c419 Mon Sep 17 00:00:00 2001 From: zhangwenshuai Date: Tue, 25 Aug 2020 20:27:27 +0800 Subject: [PATCH] update input detail format --- components/apolloTable/component/base/_utils/getFormatter.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/apolloTable/component/base/_utils/getFormatter.tsx b/components/apolloTable/component/base/_utils/getFormatter.tsx index 6cc3545..084bdc0 100644 --- a/components/apolloTable/component/base/_utils/getFormatter.tsx +++ b/components/apolloTable/component/base/_utils/getFormatter.tsx @@ -14,7 +14,7 @@ const initValue = (val) => { export const GetFormatter = { INPUT: (val) => { const newValue = initValue(val); - return newValue ? newValue[0].value : undefined; + return newValue ? newValue[0].text || newValue[0].value : undefined; }, SEARCH: (val) => { const newValue = initValue(val); @@ -101,7 +101,7 @@ export const GetFormatter = { if (unit && unit.code === 'wan') { let formateVal = Number((newValue[0] || {}).value); formateVal = formateVal ? formateVal / 10000 : formateVal; - newValue = [{ value: formateVal, text: formateVal }] + newValue = [{ value: formateVal, text: formateVal }]; } if (precision >= 0 && isNumber(newValue[0].value)) { return Number(newValue[0].value).toFixed(precision); -- 2.21.0