From 7cf873ecc074c03d59b0db4ca51569f703f07be3 Mon Sep 17 00:00:00 2001
From: wanchun <445436867@qq.com>
Date: Mon, 19 Jun 2023 12:54:55 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20Tree=E7=BB=84=E4=BB=B6=E8=8A=82?=
=?UTF-8?q?=E7=82=B9=E6=96=87=E6=9C=AC=E8=BF=87=E5=A4=9A=E7=9C=81=E7=95=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/tree/style/index.less | 2 ++
components/tree/style/index.ts | 2 --
components/tree/tree.tsx | 2 +-
components/tree/treeNode.tsx | 10 ++++++----
4 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/components/tree/style/index.less b/components/tree/style/index.less
index e12eb10f..12bcf065 100644
--- a/components/tree/style/index.less
+++ b/components/tree/style/index.less
@@ -78,6 +78,8 @@
flex-grow: 1;
align-items: center;
height: @data-input-height-base;
+ // 可阻止被子元素撑开宽度
+ min-width: 0;
&-prefix {
display: inline-flex;
margin-right: @padding-xs;
diff --git a/components/tree/style/index.ts b/components/tree/style/index.ts
index 7e2891f2..ed51d175 100644
--- a/components/tree/style/index.ts
+++ b/components/tree/style/index.ts
@@ -1,4 +1,2 @@
import '../../style';
-import '../../checkbox/style';
-import '../../virtual-list/style';
import './index.less';
diff --git a/components/tree/tree.tsx b/components/tree/tree.tsx
index 976f0d0f..68007768 100644
--- a/components/tree/tree.tsx
+++ b/components/tree/tree.tsx
@@ -2,7 +2,7 @@ import { defineComponent, provide, VNodeChild } from 'vue';
import { isFunction, isString } from 'lodash-es';
import getPrefixCls from '../_util/getPrefixCls';
import { useTheme } from '../_theme/useTheme';
-import VirtualList from '../virtual-list/virtualList';
+import VirtualList from '../virtual-list';
import TreeNode from './treeNode';
import { COMPONENT_NAME } from './const';
import useData from './useData';
diff --git a/components/tree/treeNode.tsx b/components/tree/treeNode.tsx
index 6c248282..a2a07b9d 100644
--- a/components/tree/treeNode.tsx
+++ b/components/tree/treeNode.tsx
@@ -10,7 +10,8 @@ import { isUndefined } from 'lodash-es';
import getPrefixCls from '../_util/getPrefixCls';
import CaretDownOutlined from '../icon/CaretDownOutlined';
import LoadingOutlined from '../icon/LoadingOutlined';
-import Checkbox from '../checkbox/checkbox.vue';
+import Checkbox from '../checkbox';
+import FEllipsis from '../ellipsis';
import { COMPONENT_NAME, INDENT } from './const';
import useTreeNode from './useTreeNode';
@@ -246,9 +247,10 @@ export default defineComponent({
onClick={handleClickContent}
>
{renderPrefix()}
-
- {props.label}
-
+
{renderSuffix()}