From 1c6c7efbea7ceb23958c1bb7f0198a2b59427504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=9F=E8=B4=A4?= Date: Fri, 14 Oct 2022 10:53:05 +0800 Subject: [PATCH] fix(table): support tooltip=false, close ellipsis tooltip --- packages/utils/src/genCopyable/index.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/utils/src/genCopyable/index.tsx b/packages/utils/src/genCopyable/index.tsx index c02f16cf36ba..e64256e4e321 100644 --- a/packages/utils/src/genCopyable/index.tsx +++ b/packages/utils/src/genCopyable/index.tsx @@ -34,9 +34,16 @@ export const genCopyable = (dom: React.ReactNode, item: any, text: string) => { const ellipsis = item.ellipsis && text ? { - tooltip: needTranText ?
{dom}
: text, + tooltip: + // 支持一下 tooltip 的关闭 + item?.tooltip !== false && needTranText ? ( +
{dom}
+ ) : ( + text + ), } : false; + return (