mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
tree\nav支持svg icon
This commit is contained in:
parent
a5dcdf7aac
commit
c9096c19c3
@ -230,6 +230,9 @@
|
||||
svg {
|
||||
float: left;
|
||||
}
|
||||
svg {
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&-item-icon {
|
||||
|
@ -1242,15 +1242,7 @@ export class TreeSelector extends React.Component<
|
||||
: this.handleSelect(item))
|
||||
}
|
||||
>
|
||||
{iconValue ? (
|
||||
getIcon(iconValue) ? (
|
||||
<Icon icon={iconValue} className="icon" />
|
||||
) : React.isValidElement(iconValue) ? (
|
||||
iconValue
|
||||
) : (
|
||||
<i className={iconValue}></i>
|
||||
)
|
||||
) : null}
|
||||
{iconValue ? <Icon icon={iconValue} className="icon" /> : null}
|
||||
</i>
|
||||
) : null}
|
||||
|
||||
|
@ -655,7 +655,7 @@ export class Navigation extends React.Component<
|
||||
<Icon
|
||||
key={`icon-${i}`}
|
||||
cx={cx}
|
||||
icon={item['icon']}
|
||||
icon={item['icon'] || item}
|
||||
className={isCollapsedNode ? '' : isAfter ? 'ml-2' : 'mr-2'}
|
||||
/>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user