Skip to content

Commit b734129

Browse files
authored
feat(tree-menu): [tree-menu] updata tree-menu xdesign (#2095)
1 parent 2bf9e90 commit b734129

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

packages/theme/src/tree-menu/index.less

+12-1
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,22 @@
127127
.@{input-prefix-cls} {
128128
.@{input-prefix-cls}__inner {
129129
border: none;
130-
border-bottom: 1px solid var(--ti-tree-menu-border-color);
131130
}
132131
}
133132

134133
.@{tree-prefix-cls} {
134+
padding-top: var(--ti-tree-menu-padding-top);
135+
position: relative;
136+
137+
&:after {
138+
content: '';
139+
position: absolute;
140+
left: 20px;
141+
right: 20px;
142+
top: 0;
143+
bottom: 0;
144+
border-top: 1px solid var(--ti-tree-menu-border-top-color);
145+
}
135146
.@{tree-node-prefix-cls} {
136147
&.is-disabled {
137148
& > .@{tree-node-prefix-cls}__content a {

packages/theme/src/tree-menu/smb-theme.js

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ export const tinyTreeMenuSmbTheme = {
44
'ti-tree-menu-node-current-text-color': 'var(--ti-common-color-text-primary)',
55
'ti-tree-menu-square-left-border-color': 'var(--ti-common-color-icon-active)',
66
'ti-tree-menu-node-number-font-size': 'var(--ti-common-font-size-0)',
7+
'ti-tree-menu-padding-top': 'var(--ti-common-size-2x)',
78
'ti-tree-menu-border-color': 'var(--ti-common-color-light)',
9+
'ti-tree-menu-collapse-icon-margin-right': 'var(--ti-common-size-5x)',
10+
'ti-common-color-light': 'var(--ti-common-color-line-dividing)',
811
'ti-tree-menu-node-number-color': 'var(--ti-common-color-text-weaken)'
912
}

packages/theme/src/tree-menu/vars.less

+4
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,14 @@
3737
--ti-tree-menu-collapse-icon-hover-color: var(--ti-common-bg-color-focus, #0067d1);
3838
// 折叠图标右边距
3939
--ti-tree-menu-collapse-icon-margin-right: var(--ti-common-size-2x, 8px);
40+
// 输入框下面的线
41+
--ti-tree-menu-border-top-color: var(--ti-common-color-light, #fff);
4042
// 节点序号字号
4143
--ti-tree-menu-node-number-font-size: var(--ti-common-font-size-base, 12px);
4244
// 活跃节点竖线与文本的间距
4345
--ti-tree-menu-node-vertical-line-margin-right: var(--ti-common-size-4x, 16px);
46+
// 输入框与文本的间距
47+
--ti-tree-menu-padding-top: var(--ti-common-size-4x, 16px);
4448
// 前缀图标右边距
4549
--ti-tree-menu-prefix-icon-margin-right: var(--ti-common-size-2x, 8px);
4650
// 禁用文本色

0 commit comments

Comments
 (0)