mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 20:09:08 +08:00
fix: inputTree的icon显示修复 (#2641)
Co-authored-by: AegeanSeaBlue <2285105697@qq.com>
This commit is contained in:
parent
80f9de08d2
commit
4f0ef7f04f
@ -985,14 +985,17 @@ export default {
|
||||
type: 'input-tree',
|
||||
name: 'tree',
|
||||
label: '树',
|
||||
iconField: 'icon',
|
||||
options: [
|
||||
{
|
||||
label: 'Folder A',
|
||||
value: 1,
|
||||
icon: 'fa fa-bookmark',
|
||||
children: [
|
||||
{
|
||||
label: 'file A',
|
||||
value: 2
|
||||
value: 2,
|
||||
icon: 'fa fa-star'
|
||||
},
|
||||
{
|
||||
label: 'file B',
|
||||
|
@ -765,10 +765,12 @@ export class TreeSelector extends React.Component<
|
||||
: this.handleSelect(item))
|
||||
}
|
||||
>
|
||||
<Icon
|
||||
icon={childrenItems ? 'folder' : 'file'}
|
||||
className="icon"
|
||||
/>
|
||||
{item[iconField] ? null : (
|
||||
<Icon
|
||||
icon={childrenItems ? 'folder' : 'file'}
|
||||
className="icon"
|
||||
/>
|
||||
)}
|
||||
</i>
|
||||
) : null}
|
||||
|
||||
|
@ -147,6 +147,7 @@ export default class TreeControl extends React.Component<TreeProps> {
|
||||
rootCreatable,
|
||||
rootCreateTip,
|
||||
labelField,
|
||||
iconField,
|
||||
nodePath,
|
||||
deferLoad,
|
||||
expandTreeOptions,
|
||||
@ -163,6 +164,7 @@ export default class TreeControl extends React.Component<TreeProps> {
|
||||
classPrefix={ns}
|
||||
labelField={labelField}
|
||||
valueField={valueField}
|
||||
iconField={iconField}
|
||||
disabled={disabled}
|
||||
onChange={onChange}
|
||||
joinValues={joinValues}
|
||||
|
Loading…
Reference in New Issue
Block a user