diff --git a/packages/amis-core/src/SchemaRenderer.tsx b/packages/amis-core/src/SchemaRenderer.tsx index 557a99b6a..67994cff1 100644 --- a/packages/amis-core/src/SchemaRenderer.tsx +++ b/packages/amis-core/src/SchemaRenderer.tsx @@ -23,6 +23,7 @@ import {isAlive} from 'mobx-state-tree'; import {reaction} from 'mobx'; import {resolveVariableAndFilter} from './utils/tpl-builtin'; import {buildStyle} from './utils/style'; +import {isExpression} from './utils/formula'; import {StatusScopedProps} from './StatusScoped'; import {evalExpression, filter} from './utils/tpl'; @@ -491,7 +492,7 @@ export class SchemaRenderer extends React.Component { // 自动解析变量模式,主要是方便直接引入第三方组件库,无需为了支持变量封装一层 if (renderer.autoVar) { for (const key of Object.keys(schema)) { - if (typeof props[key] === 'string') { + if (typeof props[key] === 'string' && isExpression(props[key])) { props[key] = resolveVariableAndFilter( props[key], props.data,