From 53f754ff4cb8944e9321301a84b98742eb048154 Mon Sep 17 00:00:00 2001 From: "qixian.cs" Date: Wed, 18 Dec 2024 10:38:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9B=BE=E8=A1=A8=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E7=A6=81=E7=94=A8=E5=86=85=E5=AE=B9=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=B9=B6=E5=A2=9E=E5=8A=A0=E7=94=A8=E6=88=B7=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MarkdownEditor/editor/elements/chart.tsx | 24 ++++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/MarkdownEditor/editor/elements/chart.tsx b/src/MarkdownEditor/editor/elements/chart.tsx index 9423842..44e515d 100644 --- a/src/MarkdownEditor/editor/elements/chart.tsx +++ b/src/MarkdownEditor/editor/elements/chart.tsx @@ -679,7 +679,9 @@ export const Chart: React.FC = (props) => { display: 'flex', flexWrap: 'wrap', gap: 8, + userSelect: 'none', }} + contentEditable={false} onClick={(e) => { e.stopPropagation(); }} @@ -717,12 +719,8 @@ export const Chart: React.FC = (props) => { style={{ margin: 12, borderRadius: 16, - border: - // 只有一个图表时不显示边框,用消息框自己的 - config.length < 2 && - store?.editor?.children?.length < 2 - ? 'none' - : '1px solid #eee', + overflow: 'auto', + border: '1px solid #eee', }} > @@ -800,9 +798,16 @@ export const Chart: React.FC = (props) => { margin: 'auto', minWidth: 300, flex: 1, + userSelect: 'none', }} + contentEditable={false} > -
+
= (props) => { return (
= (props) => { }} >
{ e.stopPropagation();