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;