From 86ecef340555c474281f1e67a4b5250cff24b8f6 Mon Sep 17 00:00:00 2001 From: Carl Chen Date: Sun, 23 Jun 2024 00:37:25 +0800 Subject: [PATCH] fix: typography fixContent is rendered by the render function --- components/typography/Base.tsx | 2 +- components/typography/util.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/typography/Base.tsx b/components/typography/Base.tsx index 03665a6f1d..22b09addd5 100644 --- a/components/typography/Base.tsx +++ b/components/typography/Base.tsx @@ -350,7 +350,7 @@ const Base = defineComponent({ findDOMNode(contentRef.value), { rows, suffix }, props.content, - renderOperations(true), + () => renderOperations(true), ELLIPSIS_STR, ); diff --git a/components/typography/util.tsx b/components/typography/util.tsx index d3a4866846..c6a171fa31 100644 --- a/components/typography/util.tsx +++ b/components/typography/util.tsx @@ -63,7 +63,7 @@ export default ( originElement: HTMLElement, option: Option, content: string, - fixedContent: VNodeTypes[], + fixedContentRender: () => VNodeTypes[], ellipsisStr: string, ): { content: VNodeTypes; @@ -91,7 +91,7 @@ export default ( {content} {suffix} - {fixedContent} + {fixedContentRender()} ); },