From 1681484bcef0ae8a7fb5d54e6cefcc45d6020f8e Mon Sep 17 00:00:00 2001 From: wumail <1059037014@qq.com> Date: Tue, 31 Oct 2023 14:56:02 +0800 Subject: [PATCH] fix(core): rename textInput --- packages/core/index.html | 2 +- packages/core/src/constant/DefaultTheme.ts | 2 +- packages/core/src/tool/TextEditTool.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/core/index.html b/packages/core/index.html index 8350237c0..aa92844c0 100644 --- a/packages/core/index.html +++ b/packages/core/index.html @@ -504,7 +504,7 @@ edgeTextDraggable: true, edgeType: 'bezier', style: { - textInput: { + inputText: { background: 'black', } }, diff --git a/packages/core/src/constant/DefaultTheme.ts b/packages/core/src/constant/DefaultTheme.ts index fd130c285..4f7f52e01 100644 --- a/packages/core/src/constant/DefaultTheme.ts +++ b/packages/core/src/constant/DefaultTheme.ts @@ -282,7 +282,7 @@ export type Theme = { * 节点旋转控制点样式 */ rotateControl?: CommonTheme, - textInput?: CommonTheme, + inputText?: CommonTheme, }; export const defaultTheme: Theme = { diff --git a/packages/core/src/tool/TextEditTool.tsx b/packages/core/src/tool/TextEditTool.tsx index c0d65ff9d..2ea56b729 100644 --- a/packages/core/src/tool/TextEditTool.tsx +++ b/packages/core/src/tool/TextEditTool.tsx @@ -47,7 +47,7 @@ export default class TextEdit extends Component { static getDerivedStateFromProps(props) { const { graphModel } = props; const { transformModel, theme } = graphModel; - const { textInput } = theme; + const { inputText } = theme; let { textEditElement } = graphModel; let autoStyle; if (textEditElement) { @@ -107,7 +107,7 @@ export default class TextEdit extends Component { left, top, ...autoStyle, - ...textInput, + ...inputText, }, }; }