From 2aa16c6af9dfe6c577028d5c3e3aeadd1ed305b7 Mon Sep 17 00:00:00 2001
From: wuyiping0628 <1106773985@qq.com>
Date: Tue, 10 Sep 2024 19:37:09 -0700
Subject: [PATCH 1/9] feat(tree-menu): [tree-menu] updata tree-menu xdesign
---
packages/theme/src/tree-menu/index.less | 13 ++++++++++++-
packages/theme/src/tree-menu/smb-theme.js | 3 +++
packages/theme/src/tree-menu/vars.less | 4 ++++
3 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/packages/theme/src/tree-menu/index.less b/packages/theme/src/tree-menu/index.less
index b4f0813ab8..a6022bc6a6 100644
--- a/packages/theme/src/tree-menu/index.less
+++ b/packages/theme/src/tree-menu/index.less
@@ -127,11 +127,22 @@
.@{input-prefix-cls} {
.@{input-prefix-cls}__inner {
border: none;
- border-bottom: 1px solid var(--ti-tree-menu-border-color);
}
}
.@{tree-prefix-cls} {
+ padding-top: var(--ti-tree-menu-padding-top);
+ position: relative;
+
+ &:after {
+ content: '';
+ position: absolute;
+ left: 20px;
+ right: 20px;
+ top: 0;
+ bottom: 0;
+ border-top: 1px solid var(--ti-tree-menu-border-top-color);
+ }
.@{tree-node-prefix-cls} {
&.is-disabled {
& > .@{tree-node-prefix-cls}__content a {
diff --git a/packages/theme/src/tree-menu/smb-theme.js b/packages/theme/src/tree-menu/smb-theme.js
index 315aabe1bc..e88d733921 100644
--- a/packages/theme/src/tree-menu/smb-theme.js
+++ b/packages/theme/src/tree-menu/smb-theme.js
@@ -4,6 +4,9 @@ export const tinyTreeMenuSmbTheme = {
'ti-tree-menu-node-current-text-color': 'var(--ti-common-color-text-primary)',
'ti-tree-menu-square-left-border-color': 'var(--ti-common-color-icon-active)',
'ti-tree-menu-node-number-font-size': 'var(--ti-common-font-size-0)',
+ 'ti-tree-menu-padding-top': 'var(--ti-common-size-2x)',
'ti-tree-menu-border-color': 'var(--ti-common-color-light)',
+ 'ti-tree-menu-collapse-icon-margin-right': 'var(--ti-common-size-5x)',
+ 'ti-common-color-light': 'var(--ti-common-color-line-dividing)',
'ti-tree-menu-node-number-color': 'var(--ti-common-color-text-weaken)'
}
diff --git a/packages/theme/src/tree-menu/vars.less b/packages/theme/src/tree-menu/vars.less
index 76720a2ad3..8f43ed9ba8 100644
--- a/packages/theme/src/tree-menu/vars.less
+++ b/packages/theme/src/tree-menu/vars.less
@@ -37,10 +37,14 @@
--ti-tree-menu-collapse-icon-hover-color: var(--ti-common-bg-color-focus, #0067d1);
// 折叠图标右边距
--ti-tree-menu-collapse-icon-margin-right: var(--ti-common-size-2x, 8px);
+ // 输入框下面的线
+ --ti-tree-menu-border-top-color: var(--ti-common-color-light, #fff);
// 节点序号字号
--ti-tree-menu-node-number-font-size: var(--ti-common-font-size-base, 12px);
// 活跃节点竖线与文本的间距
--ti-tree-menu-node-vertical-line-margin-right: var(--ti-common-size-4x, 16px);
+ // 输入框与文本的间距
+ --ti-tree-menu-padding-top: var(--ti-common-size-4x, 16px);
// 前缀图标右边距
--ti-tree-menu-prefix-icon-margin-right: var(--ti-common-size-2x, 8px);
// 禁用文本色
From de5f0a29588e92d08981b511338af98aa68ed65e Mon Sep 17 00:00:00 2001
From: wuyiping0628 <1106773985@qq.com>
Date: Wed, 11 Sep 2024 02:43:00 -0700
Subject: [PATCH 2/9] feat(tree-menu): [tree-menu] updata tree-menu xdesign
---
packages/theme/src/tree-menu/index.less | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/packages/theme/src/tree-menu/index.less b/packages/theme/src/tree-menu/index.less
index a6022bc6a6..b4f0813ab8 100644
--- a/packages/theme/src/tree-menu/index.less
+++ b/packages/theme/src/tree-menu/index.less
@@ -127,22 +127,11 @@
.@{input-prefix-cls} {
.@{input-prefix-cls}__inner {
border: none;
+ border-bottom: 1px solid var(--ti-tree-menu-border-color);
}
}
.@{tree-prefix-cls} {
- padding-top: var(--ti-tree-menu-padding-top);
- position: relative;
-
- &:after {
- content: '';
- position: absolute;
- left: 20px;
- right: 20px;
- top: 0;
- bottom: 0;
- border-top: 1px solid var(--ti-tree-menu-border-top-color);
- }
.@{tree-node-prefix-cls} {
&.is-disabled {
& > .@{tree-node-prefix-cls}__content a {
From 98990925cf0bdd9114e7b685b53162e6d6fc9662 Mon Sep 17 00:00:00 2001
From: wuyiping0628 <1106773985@qq.com>
Date: Wed, 11 Sep 2024 02:45:28 -0700
Subject: [PATCH 3/9] fix(tree-menu): [tree-menu] fix tree-menu bug
---
packages/theme/src/tree-menu/index.less | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/packages/theme/src/tree-menu/index.less b/packages/theme/src/tree-menu/index.less
index a6022bc6a6..b4f0813ab8 100644
--- a/packages/theme/src/tree-menu/index.less
+++ b/packages/theme/src/tree-menu/index.less
@@ -127,22 +127,11 @@
.@{input-prefix-cls} {
.@{input-prefix-cls}__inner {
border: none;
+ border-bottom: 1px solid var(--ti-tree-menu-border-color);
}
}
.@{tree-prefix-cls} {
- padding-top: var(--ti-tree-menu-padding-top);
- position: relative;
-
- &:after {
- content: '';
- position: absolute;
- left: 20px;
- right: 20px;
- top: 0;
- bottom: 0;
- border-top: 1px solid var(--ti-tree-menu-border-top-color);
- }
.@{tree-node-prefix-cls} {
&.is-disabled {
& > .@{tree-node-prefix-cls}__content a {
From 4686dac4030f520ddc12b1a45d55789492d54bff Mon Sep 17 00:00:00 2001
From: wuyiping0628 <1106773985@qq.com>
Date: Thu, 12 Sep 2024 05:58:02 -0700
Subject: [PATCH 4/9] feat(tree-menu): [tree-menu] updata tree-menu xdesign
---
.../tree-menu/basic-usage-composition-api.vue | 2 +-
.../demos/pc/app/tree-menu/basic-usage.vue | 2 +-
.../demos/pc/app/tree-menu/clearable.spec.ts | 8 ++--
packages/theme/src/tree-menu/index.less | 44 +++++++++++++------
packages/theme/src/tree-menu/vars.less | 12 +++--
packages/vue-locale/src/lang/zh-CN.ts | 2 +-
6 files changed, 45 insertions(+), 25 deletions(-)
diff --git a/examples/sites/demos/pc/app/tree-menu/basic-usage-composition-api.vue b/examples/sites/demos/pc/app/tree-menu/basic-usage-composition-api.vue
index 295499adcd..d732580363 100644
--- a/examples/sites/demos/pc/app/tree-menu/basic-usage-composition-api.vue
+++ b/examples/sites/demos/pc/app/tree-menu/basic-usage-composition-api.vue
@@ -1,5 +1,5 @@
-
+
diff --git a/examples/sites/demos/pc/app/tree-menu/default-expand-all.vue b/examples/sites/demos/pc/app/tree-menu/default-expand-all.vue
index 460dad9ae6..3a82b52c85 100644
--- a/examples/sites/demos/pc/app/tree-menu/default-expand-all.vue
+++ b/examples/sites/demos/pc/app/tree-menu/default-expand-all.vue
@@ -1,5 +1,6 @@