mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-03 04:18:29 +08:00
feat:Remark组件支持自定义图标 (#5694)
* feat:Remark组件支持自定义图标 * 去掉多余内容 Co-authored-by: xujiahao01 <xujiahao01@baidu.com>
This commit is contained in:
parent
2daecf5d11
commit
9b6e75b6ff
@ -3,7 +3,7 @@ import {Renderer, RendererProps} from 'amis-core';
|
||||
import {Api, SchemaNode, Schema, ActionObject} from 'amis-core';
|
||||
import cx from 'classnames';
|
||||
import {TooltipWrapper} from 'amis-ui';
|
||||
import {filter} from 'amis-core';
|
||||
import {filter, generateIcon} from 'amis-core';
|
||||
import {ClassNamesFn, themeable} from 'amis-core';
|
||||
import {hasIcon, Icon} from 'amis-ui';
|
||||
import {BaseSchema, SchemaClassName, SchemaIcon, SchemaTpl} from '../Schema';
|
||||
@ -131,7 +131,9 @@ class Remark extends React.Component<RemarkProps> {
|
||||
<>
|
||||
{finalLabel ? <span>{finalLabel}</span> : null}
|
||||
{finalIcon ? (
|
||||
hasIcon(finalIcon) ? (
|
||||
typeof finalIcon === 'object' ? (
|
||||
generateIcon(cx, finalIcon)
|
||||
) : hasIcon(finalIcon) ? (
|
||||
<span className={cx('Remark-icon', shapeClass)}>
|
||||
<Icon icon={finalIcon} />
|
||||
</span>
|
||||
|
Loading…
Reference in New Issue
Block a user