From 7760cd0891aa20e46fda3ef7c2c7b0f870726ab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=87=91=E6=98=B6?= Date: Sun, 5 Jun 2022 09:01:27 +0800 Subject: [PATCH] fix: markdown component (#469) --- .../src/schema-component/antd/input/ReadPretty.tsx | 9 ++++----- .../src/schema-component/antd/markdown/Markdown.tsx | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/core/client/src/schema-component/antd/input/ReadPretty.tsx b/packages/core/client/src/schema-component/antd/input/ReadPretty.tsx index 2e1814d4b3..3e0d532a16 100644 --- a/packages/core/client/src/schema-component/antd/input/ReadPretty.tsx +++ b/packages/core/client/src/schema-component/antd/input/ReadPretty.tsx @@ -44,11 +44,10 @@ ReadPretty.TextArea = (props) => { /> ); console.log('value', value); - const content = ( - - {ellipsis ? text || value : html} - - ); + const content = ellipsis ? + ( + {text} + ) : value || html; return (
{props.addonBefore} diff --git a/packages/core/client/src/schema-component/antd/markdown/Markdown.tsx b/packages/core/client/src/schema-component/antd/markdown/Markdown.tsx index 9d210081f5..436484f81e 100644 --- a/packages/core/client/src/schema-component/antd/markdown/Markdown.tsx +++ b/packages/core/client/src/schema-component/antd/markdown/Markdown.tsx @@ -20,8 +20,8 @@ export const Markdown: any = connect( }), mapReadPretty((props) => { let text = convertToText(props.value); - let value =
; - return ; + let value =
; + return ; }), );