File tree Expand file tree Collapse file tree 1 file changed +24
-15
lines changed Expand file tree Collapse file tree 1 file changed +24
-15
lines changed Original file line number Diff line number Diff line change @@ -14,16 +14,31 @@ import { stopPropagation } from '../utils/dom';
14
14
const StyledTree = styled ( Tree ) `
15
15
margin-top: 0.5rem;
16
16
17
- .arco-tree-node-title:hover .arco-tree-node-drag-icon {
18
- opacity: 0;
19
- }
17
+ .arco-tree-node {
18
+ .arco-tree-node-title:hover .arco-tree-node-drag-icon {
19
+ opacity: 0;
20
+ }
20
21
21
- .arco-tree-node-title {
22
- padding: 0;
23
- padding-right: 4px;
22
+ .arco-tree-node-title {
23
+ padding: 0;
24
+ padding-right: 4px;
25
+
26
+ & .arco-tree-node-title-text > div {
27
+ padding: 5px 0 5px 4px;
28
+ }
29
+ }
24
30
25
- & .arco-tree-node-title-text > div {
26
- padding: 5px 0 5px 4px;
31
+ .add-icon {
32
+ position: absolute;
33
+ right: 8px;
34
+ font-size: 12px;
35
+ top: 10px;
36
+ color: rgb(100, 100, 100);
37
+ opacity: 0;
38
+ }
39
+
40
+ &:hover .add-icon {
41
+ opacity: 1;
27
42
}
28
43
}
29
44
` as unknown as typeof Tree ;
@@ -105,13 +120,7 @@ export const SideTree: React.FC = React.memo(() => {
105
120
renderExtra = { ( node ) => {
106
121
return (
107
122
< IconPlus
108
- style = { {
109
- position : 'absolute' ,
110
- right : 8 ,
111
- fontSize : 12 ,
112
- top : 10 ,
113
- color : '#3370ff' ,
114
- } }
123
+ className = "add-icon"
115
124
onClick = { ( ) => {
116
125
if ( ! node . dataRef ) {
117
126
return ;
You can’t perform that action at this time.
0 commit comments