Skip to content

Commit

Permalink
fix: 修复图标可能是组件的情况 (#11280)
Browse files Browse the repository at this point in the history
  • Loading branch information
qkiroc authored Nov 28, 2024
1 parent 0ab0fce commit ad360a3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/amis/src/renderers/Action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -789,8 +789,14 @@ export class Action extends React.Component<ActionProps, ActionState> {
}) as string;
disabled = true;
}
const icon = filter(this.props.icon, data);
const rightIcon = filter(this.props.rightIcon, data);
let icon = this.props.icon;
let rightIcon = this.props.rightIcon;
if (typeof icon === 'string') {
icon = filter(this.props.icon, data);
}
if (typeof rightIcon === 'string') {
rightIcon = filter(this.props.rightIcon, data);
}

const iconElement = (
<Icon
Expand Down

0 comments on commit ad360a3

Please sign in to comment.