From b568d4ca99283dc0d74cb8e097fdfdaecee35f9a Mon Sep 17 00:00:00 2001 From: xingyu Date: Wed, 29 Mar 2023 23:57:37 +0800 Subject: [PATCH] feat: render --- src/components/Table/src/hooks/useRender.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/Table/src/hooks/useRender.ts b/src/components/Table/src/hooks/useRender.ts index b9f46d61..85d04903 100644 --- a/src/components/Table/src/hooks/useRender.ts +++ b/src/components/Table/src/hooks/useRender.ts @@ -13,10 +13,13 @@ export const useRender = { width: 80 }) } + return '' }, renderText: (text, val) => { if (text) { return text + ' ' + val + } else { + return '' } }, renderTag: (text, color?) => { @@ -34,8 +37,12 @@ export const useRender = { }) ]) } + return '' }, renderDate: (text, format?) => { + if (!text) { + return '' + } if (!format) { return dayjs(text).format('YYYY-MM-DD HH:mm:ss') } else { @@ -50,5 +57,6 @@ export const useRender = { dictType: dictType || 'number' }) } + return '' } }