From 2647fff196a8b8c1ad3c12e0518b993d2aa1f7c6 Mon Sep 17 00:00:00 2001 From: RUNZE LU <36724300+lurunze1226@users.noreply.github.com> Date: Mon, 27 Feb 2023 14:37:17 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20schema=E7=9A=84style=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E8=B5=8B=E5=80=BC=E9=97=AE=E9=A2=98=20(#6226?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis-core/src/SchemaRenderer.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/amis-core/src/SchemaRenderer.tsx b/packages/amis-core/src/SchemaRenderer.tsx index ccfb86680..568728d28 100644 --- a/packages/amis-core/src/SchemaRenderer.tsx +++ b/packages/amis-core/src/SchemaRenderer.tsx @@ -404,7 +404,8 @@ export class SchemaRenderer extends React.Component { // style 支持公式 if (schema.style) { - schema.style = buildStyle(schema.style, detectData); + // schema.style是readonly属性 + schema = {...schema, style: buildStyle(schema.style, detectData)}; } const isClassComponent = Component.prototype?.isReactComponent;