From 512dbb2e092163e0c21bc82a62ee483354fd7bc5 Mon Sep 17 00:00:00 2001 From: xiamiao Date: Wed, 12 Jun 2024 14:26:49 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat(tree):=20=E6=96=B0=E5=A2=9E=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E9=85=8D=E7=BD=AE=E5=AD=97=E6=AE=B5=E5=88=AB=E5=90=8D?= =?UTF-8?q?(#2871)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui/tree/src/Tree.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/ui/tree/src/Tree.tsx b/packages/ui/tree/src/Tree.tsx index f3cc97652..aa20b3c2c 100644 --- a/packages/ui/tree/src/Tree.tsx +++ b/packages/ui/tree/src/Tree.tsx @@ -453,10 +453,9 @@ export interface TreeProps { */ flattedData?: FlattedTreeNodeData[] /** - * 暂不对外暴露 - * @private + * 设置 data 中 id, title, disabled, children 对应的 key */ - fieldNames?: object + fieldNames?: Record /** * 是否点击节点时展开其子节点 */ From 08fe794f5592b08b10f5328e10ed2ed7ff008e64 Mon Sep 17 00:00:00 2001 From: xiamiao Date: Wed, 12 Jun 2024 14:28:49 +0800 Subject: [PATCH 2/4] =?UTF-8?q?chore:=20=E7=94=9F=E6=88=90=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E8=AE=B0=E5=BD=95=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/neat-mice-add.md | 5 +++++ .changeset/rich-socks-brake.md | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 .changeset/neat-mice-add.md create mode 100644 .changeset/rich-socks-brake.md diff --git a/.changeset/neat-mice-add.md b/.changeset/neat-mice-add.md new file mode 100644 index 000000000..c684d8dd8 --- /dev/null +++ b/.changeset/neat-mice-add.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/tree": minor +--- + +feat: 新增支持配置字段别名 diff --git a/.changeset/rich-socks-brake.md b/.changeset/rich-socks-brake.md new file mode 100644 index 000000000..40530ac54 --- /dev/null +++ b/.changeset/rich-socks-brake.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/hiui": patch +--- + +feat(tree): 新增支持配置字段别名 From 566fe0b1ff48df52bf116463107b2271005c984c Mon Sep 17 00:00:00 2001 From: xiamiao Date: Tue, 25 Jun 2024 11:39:55 +0800 Subject: [PATCH 3/4] =?UTF-8?q?feat(tree):=20=E4=BF=AE=E6=94=B9fieldNames?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui/tree/src/Tree.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ui/tree/src/Tree.tsx b/packages/ui/tree/src/Tree.tsx index aa20b3c2c..31fac6d26 100644 --- a/packages/ui/tree/src/Tree.tsx +++ b/packages/ui/tree/src/Tree.tsx @@ -1,5 +1,5 @@ import React, { forwardRef, useMemo, useRef, useImperativeHandle } from 'react' -import { HiBaseSizeEnum } from '@hi-ui/core' +import { HiBaseFieldNames, HiBaseSizeEnum } from '@hi-ui/core' import { cx, getPrefixCls } from '@hi-ui/classname' import { __DEV__ } from '@hi-ui/env' import { flattenTreeData } from './utils' @@ -455,7 +455,7 @@ export interface TreeProps { /** * 设置 data 中 id, title, disabled, children 对应的 key */ - fieldNames?: Record + fieldNames?: HiBaseFieldNames /** * 是否点击节点时展开其子节点 */ From b94f196a15951d3f0322cf4726fed3a19abfe0a6 Mon Sep 17 00:00:00 2001 From: xiamiao Date: Fri, 28 Jun 2024 11:02:43 +0800 Subject: [PATCH 4/4] =?UTF-8?q?chore(tree):=20=E5=88=A0=E9=99=A4=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E8=AE=B0=E5=BD=95=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/neat-mice-add.md | 5 ----- .changeset/rich-socks-brake.md | 5 ----- 2 files changed, 10 deletions(-) delete mode 100644 .changeset/neat-mice-add.md delete mode 100644 .changeset/rich-socks-brake.md diff --git a/.changeset/neat-mice-add.md b/.changeset/neat-mice-add.md deleted file mode 100644 index c684d8dd8..000000000 --- a/.changeset/neat-mice-add.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hi-ui/tree": minor ---- - -feat: 新增支持配置字段别名 diff --git a/.changeset/rich-socks-brake.md b/.changeset/rich-socks-brake.md deleted file mode 100644 index 40530ac54..000000000 --- a/.changeset/rich-socks-brake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hi-ui/hiui": patch ---- - -feat(tree): 新增支持配置字段别名