mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 11:58:10 +08:00
inputTree的icon显示修复;并补充文档 (#2849)
Co-authored-by: zhyc <zhyc@hzsuoyi.com>
This commit is contained in:
parent
f32c6b7605
commit
a9446ed34c
@ -746,6 +746,7 @@ true false true [{label: 'A/B/C', value: 'a/b/c'},{label: 'A
|
||||
| delimeter | `string` | `false` | [拼接符](./options#%E6%8B%BC%E6%8E%A5%E7%AC%A6-delimiter) |
|
||||
| labelField | `string` | `"label"` | [选项标签字段](./options#%E9%80%89%E9%A1%B9%E6%A0%87%E7%AD%BE%E5%AD%97%E6%AE%B5-labelfield) |
|
||||
| valueField | `string` | `"value"` | [选项值字段](./options#%E9%80%89%E9%A1%B9%E5%80%BC%E5%AD%97%E6%AE%B5-valuefield) |
|
||||
| iconField | `string` | `"icon"` | 图标值字段 |
|
||||
| joinValues | `boolean` | `true` | [拼接值](./options#%E6%8B%BC%E6%8E%A5%E5%80%BC-joinvalues) |
|
||||
| extractValue | `boolean` | `false` | [提取值](./options#%E6%8F%90%E5%8F%96%E5%A4%9A%E9%80%89%E5%80%BC-extractvalue) |
|
||||
| creatable | `boolean` | `false` | [新增选项](./options#%E5%89%8D%E7%AB%AF%E6%96%B0%E5%A2%9E-creatable) |
|
||||
|
@ -765,12 +765,10 @@ export class TreeSelector extends React.Component<
|
||||
: this.handleSelect(item))
|
||||
}
|
||||
>
|
||||
{item[iconField] ? null : (
|
||||
<Icon
|
||||
icon={childrenItems ? 'folder' : 'file'}
|
||||
className="icon"
|
||||
/>
|
||||
)}
|
||||
<Icon
|
||||
icon={item[iconField] || (childrenItems ? 'folder' : 'file')}
|
||||
className="icon"
|
||||
/>
|
||||
</i>
|
||||
) : null}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user