Skip to content

Commit

Permalink
Merge pull request #11439 from 2betop/fix-tag-label
Browse files Browse the repository at this point in the history
fix: 修复 tag 渲染对象报错
  • Loading branch information
z418577198 authored Jan 9, 2025
2 parents df34821 + 62af04f commit 5eb130d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/amis/src/renderers/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
* @file Tag
*/
import React from 'react';
import {autobind, createObject, Renderer, RendererProps} from 'amis-core';
import {
autobind,
createObject,
labelToString,
Renderer,
RendererProps
} from 'amis-core';
import {BaseSchema, SchemaClassName, SchemaIcon} from '../Schema';
import {getPropValue} from 'amis-core';
import {isPureVariable, resolveVariableAndFilter} from 'amis-core';
Expand Down Expand Up @@ -137,7 +143,7 @@ export class TagField extends React.Component<TagProps, object> {
style = {}
} = this.props;

const label = this.resolveLabel();
const label = labelToString(this.resolveLabel());

if (isPureVariable(icon)) {
icon = resolveVariableAndFilter(icon, data);
Expand Down

0 comments on commit 5eb130d

Please sign in to comment.