From a9446ed34c5a02f1b94565165f6669ad58945a2f Mon Sep 17 00:00:00 2001 From: decarp Date: Thu, 4 Nov 2021 11:24:52 +0800 Subject: [PATCH] =?UTF-8?q?inputTree=E7=9A=84icon=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D;=E5=B9=B6=E8=A1=A5=E5=85=85=E6=96=87?= =?UTF-8?q?=E6=A1=A3=20(#2849)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: zhyc --- docs/zh-CN/components/form/input-tree.md | 1 + src/components/Tree.tsx | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/zh-CN/components/form/input-tree.md b/docs/zh-CN/components/form/input-tree.md index 9a86a1457..5e8240bfe 100755 --- a/docs/zh-CN/components/form/input-tree.md +++ b/docs/zh-CN/components/form/input-tree.md @@ -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) | diff --git a/src/components/Tree.tsx b/src/components/Tree.tsx index 49d132a44..61316611e 100644 --- a/src/components/Tree.tsx +++ b/src/components/Tree.tsx @@ -765,12 +765,10 @@ export class TreeSelector extends React.Component< : this.handleSelect(item)) } > - {item[iconField] ? null : ( - - )} + ) : null}