acud 1.1.13 → 1.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acud.css +123 -34
- package/dist/acud.css.map +1 -1
- package/dist/acud.js +13029 -7326
- package/dist/acud.js.map +1 -1
- package/dist/acud.min.css +1 -1
- package/dist/acud.min.css.map +1 -1
- package/dist/acud.min.js +3 -3
- package/dist/acud.min.js.map +1 -1
- package/es/form/style/index.css +1 -1
- package/es/form/style/index.less +2 -1
- package/es/input/Input.d.ts +1 -0
- package/es/input/Input.js +8 -2
- package/es/input/Label.d.ts +3 -1
- package/es/input/Label.js +12 -1
- package/es/input/TextArea.d.ts +1 -0
- package/es/input/TextArea.js +8 -2
- package/es/input/style/index.css +24 -23
- package/es/input/style/index.less +2 -1
- package/es/toast/base.js +1 -1
- package/es/toast/index.js +13 -8
- package/es/toast/style/index.css +9 -9
- package/es/toast/style/index.less +215 -206
- package/es/tree/style/index.css +44 -0
- package/es/tree/style/mixin.less +64 -0
- package/es/tree/tree.d.ts +5 -2
- package/es/tree/tree.js +3 -1
- package/es/tree/utils/iconHelper.d.ts +2 -2
- package/es/tree/utils/iconHelper.js +20 -5
- package/es/tree-select/index.js +1 -1
- package/es/tree-select/src/OptionList.js +35 -1
- package/es/tree-select/style/index.css +44 -0
- package/lib/form/style/index.css +1 -1
- package/lib/form/style/index.less +2 -1
- package/lib/input/Input.d.ts +1 -0
- package/lib/input/Input.js +8 -2
- package/lib/input/Label.d.ts +3 -1
- package/lib/input/Label.js +12 -1
- package/lib/input/TextArea.d.ts +1 -0
- package/lib/input/TextArea.js +8 -2
- package/lib/input/style/index.css +24 -23
- package/lib/input/style/index.less +2 -1
- package/lib/toast/base.js +1 -1
- package/lib/toast/index.js +12 -7
- package/lib/toast/style/index.css +9 -9
- package/lib/toast/style/index.less +215 -206
- package/lib/tree/style/index.css +44 -0
- package/lib/tree/style/mixin.less +64 -0
- package/lib/tree/tree.d.ts +5 -2
- package/lib/tree/tree.js +3 -1
- package/lib/tree/utils/iconHelper.d.ts +2 -2
- package/lib/tree/utils/iconHelper.js +20 -5
- package/lib/tree-select/index.js +1 -1
- package/lib/tree-select/src/OptionList.js +35 -1
- package/lib/tree-select/style/index.css +44 -0
- package/package.json +24 -24
|
@@ -12,257 +12,266 @@
|
|
|
12
12
|
@toast-padding: @toast-padding-vertical @toast-padding-horizontal;
|
|
13
13
|
|
|
14
14
|
.@{notification-prefix-cls} {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&-topLeft,
|
|
26
|
-
&-bottomLeft {
|
|
27
|
-
margin-right: 0;
|
|
28
|
-
margin-left: @toast-margin-edge;
|
|
29
|
-
|
|
30
|
-
.@{notification-prefix-cls}-fade-enter.@{notification-prefix-cls}-fade-enter-active,
|
|
31
|
-
.@{notification-prefix-cls}-fade-appear.@{notification-prefix-cls}-fade-appear-active {
|
|
32
|
-
animation-name: NotificationLeftFadeIn;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&-close-icon {
|
|
37
|
-
font-size: 4 * @P;
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&-hook-holder {
|
|
42
|
-
position: relative;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&-notice {
|
|
46
|
-
position: relative;
|
|
47
|
-
width: @toast-width;
|
|
48
|
-
max-width: ~'calc(100vw - @{toast-margin-edge} * 2)';
|
|
49
|
-
margin-bottom: @toast-margin-bottom;
|
|
50
|
-
margin-left: auto;
|
|
51
|
-
padding: @toast-padding;
|
|
52
|
-
overflow: hidden;
|
|
53
|
-
line-height: @line-height-base;
|
|
54
|
-
word-wrap: break-word;
|
|
55
|
-
background: @notification-bg;
|
|
56
|
-
border-radius: @R2;
|
|
57
|
-
box-shadow: @shadow-1;
|
|
58
|
-
|
|
59
|
-
.@{notification-prefix-cls}-topLeft &,
|
|
60
|
-
.@{notification-prefix-cls}-bottomLeft & {
|
|
61
|
-
margin-right: auto;
|
|
62
|
-
margin-left: 0;
|
|
15
|
+
.reset-component();
|
|
16
|
+
position: fixed;
|
|
17
|
+
z-index: @zindex-toast;
|
|
18
|
+
margin-right: @toast-margin-edge;
|
|
19
|
+
|
|
20
|
+
& > div {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column-reverse;
|
|
63
23
|
}
|
|
64
24
|
|
|
65
|
-
&-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
line-height: 6 * @P;
|
|
70
|
-
|
|
71
|
-
&-single-line-auto-margin {
|
|
72
|
-
display: block;
|
|
73
|
-
width: ~'calc(@{toast-width} - @{toast-padding-horizontal} * 2 - 24px - 48px - 100%)';
|
|
74
|
-
background-color: transparent;
|
|
75
|
-
pointer-events: none;
|
|
76
|
-
&::before {
|
|
77
|
-
display: block;
|
|
78
|
-
content: '';
|
|
79
|
-
}
|
|
80
|
-
}
|
|
25
|
+
&-topLeft,
|
|
26
|
+
&-bottomLeft {
|
|
27
|
+
margin-right: 0;
|
|
28
|
+
margin-left: @toast-margin-edge;
|
|
81
29
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
flex: 1;
|
|
86
|
-
font-size: @T3;
|
|
87
|
-
color: @G2;
|
|
88
|
-
font-weight: @font-weight-500;
|
|
89
|
-
}
|
|
90
|
-
&-right {
|
|
91
|
-
font-size: @T2;
|
|
92
|
-
color: @G6;
|
|
93
|
-
span {
|
|
94
|
-
font-size: @T2;
|
|
95
|
-
}
|
|
30
|
+
.@{notification-prefix-cls}-fade-enter.@{notification-prefix-cls}-fade-enter-active,
|
|
31
|
+
.@{notification-prefix-cls}-fade-appear.@{notification-prefix-cls}-fade-appear-active {
|
|
32
|
+
animation-name: NotificationLeftFadeIn;
|
|
96
33
|
}
|
|
97
|
-
&-no-description {
|
|
98
|
-
color: @G2;
|
|
99
|
-
font-size: @T2;
|
|
100
|
-
font-weight: @font-weight-400;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
34
|
}
|
|
104
35
|
|
|
105
|
-
&-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
margin: @P 0 0 0;
|
|
109
|
-
color: @G2;
|
|
110
|
-
font-size: @T2;
|
|
111
|
-
font-weight: @font-weight-400;
|
|
112
|
-
}
|
|
36
|
+
&-close-icon {
|
|
37
|
+
font-size: 4 * @P;
|
|
38
|
+
cursor: pointer;
|
|
113
39
|
}
|
|
114
40
|
|
|
115
|
-
&-
|
|
116
|
-
|
|
41
|
+
&-hook-holder {
|
|
42
|
+
position: relative;
|
|
117
43
|
}
|
|
118
44
|
|
|
119
|
-
&-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
45
|
+
&-notice {
|
|
46
|
+
position: relative;
|
|
47
|
+
width: @toast-width;
|
|
48
|
+
max-width: ~'calc(100vw - @{toast-margin-edge} * 2)';
|
|
49
|
+
margin-bottom: @toast-margin-bottom;
|
|
50
|
+
margin-left: auto;
|
|
51
|
+
padding: @toast-padding;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
line-height: @line-height-base;
|
|
54
|
+
word-wrap: break-word;
|
|
55
|
+
background: @notification-bg;
|
|
56
|
+
border-radius: @R2;
|
|
57
|
+
box-shadow: @shadow-1;
|
|
58
|
+
|
|
59
|
+
.@{notification-prefix-cls}-topLeft &,
|
|
60
|
+
.@{notification-prefix-cls}-bottomLeft & {
|
|
61
|
+
margin-right: auto;
|
|
62
|
+
margin-left: 0;
|
|
63
|
+
}
|
|
123
64
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
65
|
+
&-message {
|
|
66
|
+
margin-bottom: 2 * @P;
|
|
67
|
+
color: @G2;
|
|
68
|
+
font-size: @T3;
|
|
69
|
+
line-height: 6 * @P;
|
|
70
|
+
|
|
71
|
+
&-single-line-auto-margin {
|
|
72
|
+
display: block;
|
|
73
|
+
width: ~'calc(@{toast-width} - @{toast-padding-horizontal} * 2 - 24px - 48px - 100%)';
|
|
74
|
+
background-color: transparent;
|
|
75
|
+
pointer-events: none;
|
|
76
|
+
|
|
77
|
+
&::before {
|
|
78
|
+
display: block;
|
|
79
|
+
content: '';
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.@{notification-prefix-cls}-toast-wrap {
|
|
84
|
+
display: flex;
|
|
85
|
+
|
|
86
|
+
&-left {
|
|
87
|
+
flex: 1;
|
|
88
|
+
font-size: @T3;
|
|
89
|
+
color: @G2;
|
|
90
|
+
font-weight: @font-weight-500;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&-right {
|
|
94
|
+
font-size: @T2;
|
|
95
|
+
color: @G6;
|
|
96
|
+
|
|
97
|
+
span {
|
|
98
|
+
font-size: @T2;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&-no-description {
|
|
103
|
+
color: @G2;
|
|
104
|
+
font-size: @T2;
|
|
105
|
+
font-weight: @font-weight-400;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
128
109
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
font-size: 4 * @P;
|
|
132
|
-
line-height: 4 * @P;
|
|
133
|
-
top: 2 * @P
|
|
134
|
-
}
|
|
110
|
+
&-description {
|
|
111
|
+
font-size: @toast-font-size-base;
|
|
135
112
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
113
|
+
.description-wrap {
|
|
114
|
+
margin: @P 0 0 0;
|
|
115
|
+
color: @G2;
|
|
116
|
+
font-size: @T2;
|
|
117
|
+
font-weight: @font-weight-400;
|
|
118
|
+
}
|
|
140
119
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
120
|
+
|
|
121
|
+
&-with-icon &-message {
|
|
122
|
+
margin: 0 ~'calc(@{toast-title-margin} + @{P} * 4)' 0 ~'calc(@{toast-title-margin} + @{T5})';
|
|
123
|
+
font-size: @font-size-lg;
|
|
145
124
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
125
|
+
|
|
126
|
+
&-with-icon &-description {
|
|
127
|
+
margin: 0 ~'calc(@{toast-title-margin} + @{P} * 4)' 0 ~'calc(@{toast-title-margin} + @{T5})';
|
|
128
|
+
font-size: @toast-font-size-base;
|
|
150
129
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
130
|
+
|
|
131
|
+
&-icon {
|
|
132
|
+
position: absolute;
|
|
133
|
+
font-size: 4 * @P;
|
|
134
|
+
line-height: 4 * @P;
|
|
135
|
+
top: 2 * @P;
|
|
155
136
|
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
137
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
138
|
+
.@{notification-prefix-cls}-notice-icon {
|
|
139
|
+
&-success {
|
|
140
|
+
path {
|
|
141
|
+
fill: @S6;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&-info {
|
|
146
|
+
path {
|
|
147
|
+
fill: @B6;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&-warning {
|
|
152
|
+
path {
|
|
153
|
+
fill: @W6;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&-error {
|
|
158
|
+
path {
|
|
159
|
+
fill: @E6;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
174
162
|
}
|
|
175
|
-
|
|
176
|
-
|
|
163
|
+
|
|
164
|
+
&-close {
|
|
165
|
+
position: absolute;
|
|
166
|
+
top: 1 * @P;
|
|
167
|
+
right: 4 * @P;
|
|
168
|
+
outline: none;
|
|
169
|
+
color: @G5;
|
|
170
|
+
|
|
171
|
+
&:hover {
|
|
172
|
+
color: @G4;
|
|
173
|
+
// & when (@theme = dark) {
|
|
174
|
+
// color: #fff;
|
|
175
|
+
// }
|
|
176
|
+
// & when not (@theme = dark) {
|
|
177
|
+
// // color: shade('#ccc', 40%);
|
|
178
|
+
// color: #ccc;
|
|
179
|
+
// }
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
&:active {
|
|
183
|
+
color: @G3;
|
|
184
|
+
}
|
|
177
185
|
}
|
|
178
|
-
}
|
|
179
186
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
187
|
+
&-btn {
|
|
188
|
+
float: right;
|
|
189
|
+
margin-top: 16px;
|
|
190
|
+
}
|
|
183
191
|
}
|
|
184
|
-
}
|
|
185
192
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
+
&-has-description {
|
|
194
|
+
padding: 4 * @P @toast-padding-horizontal;
|
|
195
|
+
.@{notification-prefix-cls}-notice-icon {
|
|
196
|
+
top: 4.8 * @P;
|
|
197
|
+
}
|
|
198
|
+
.@{notification-prefix-cls}-notice-close {
|
|
199
|
+
top: 4 * @P;
|
|
200
|
+
}
|
|
193
201
|
}
|
|
194
202
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
animation-fill-mode: both;
|
|
201
|
-
}
|
|
203
|
+
.notification-fade-effect {
|
|
204
|
+
animation-duration: .24s;
|
|
205
|
+
animation-timing-function: @ease-in-out;
|
|
206
|
+
animation-fill-mode: both;
|
|
207
|
+
}
|
|
202
208
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
209
|
+
&-fade-enter,
|
|
210
|
+
&-fade-appear {
|
|
211
|
+
.notification-fade-effect();
|
|
206
212
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
213
|
+
opacity: 0;
|
|
214
|
+
animation-play-state: paused;
|
|
215
|
+
}
|
|
210
216
|
|
|
211
|
-
|
|
212
|
-
|
|
217
|
+
&-fade-leave {
|
|
218
|
+
.notification-fade-effect();
|
|
213
219
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
220
|
+
animation-duration: .4s;
|
|
221
|
+
animation-play-state: paused;
|
|
222
|
+
}
|
|
217
223
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
224
|
+
&-fade-enter&-fade-enter-active,
|
|
225
|
+
&-fade-appear&-fade-appear-active {
|
|
226
|
+
animation-name: NotificationFadeIn;
|
|
227
|
+
animation-play-state: running;
|
|
228
|
+
}
|
|
223
229
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
230
|
+
&-fade-leave&-fade-leave-active {
|
|
231
|
+
animation-name: NotificationFadeOut;
|
|
232
|
+
animation-play-state: running;
|
|
233
|
+
}
|
|
228
234
|
}
|
|
229
235
|
|
|
230
236
|
@keyframes NotificationFadeIn {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
237
|
+
0% {
|
|
238
|
+
left: @toast-width;
|
|
239
|
+
opacity: 0;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
100% {
|
|
243
|
+
left: 0;
|
|
244
|
+
opacity: 1;
|
|
245
|
+
}
|
|
239
246
|
}
|
|
240
247
|
|
|
241
248
|
@keyframes NotificationLeftFadeIn {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
249
|
+
0% {
|
|
250
|
+
right: @toast-width;
|
|
251
|
+
opacity: 0;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
100% {
|
|
255
|
+
right: 0;
|
|
256
|
+
opacity: 1;
|
|
257
|
+
}
|
|
250
258
|
}
|
|
251
259
|
|
|
252
260
|
@keyframes NotificationFadeOut {
|
|
253
|
-
// 0% {
|
|
254
|
-
// top: 0;
|
|
255
|
-
// opacity: 1;
|
|
256
|
-
// }
|
|
257
|
-
// 100% {
|
|
258
|
-
// top: -@toast-width;
|
|
259
|
-
// opacity: 0;
|
|
260
|
-
// }
|
|
261
|
+
// 0% {
|
|
262
|
+
// top: 0;
|
|
263
|
+
// opacity: 1;
|
|
264
|
+
// }
|
|
265
|
+
// 100% {
|
|
266
|
+
// top: -@toast-width;
|
|
267
|
+
// opacity: 0;
|
|
268
|
+
// }
|
|
261
269
|
|
|
262
270
|
0% {
|
|
263
271
|
right: 0;
|
|
264
272
|
opacity: 1;
|
|
265
273
|
}
|
|
274
|
+
|
|
266
275
|
100% {
|
|
267
276
|
right: -100 * @P;
|
|
268
277
|
opacity: 0;
|
package/lib/tree/style/index.css
CHANGED
|
@@ -385,6 +385,7 @@
|
|
|
385
385
|
}
|
|
386
386
|
.acud-tree-switcher .acud-tree-switcher-icon svg,
|
|
387
387
|
.acud-tree-switcher .acud-select-tree-switcher-icon svg {
|
|
388
|
+
width: 16px!important;
|
|
388
389
|
transition: transform 0.3s;
|
|
389
390
|
}
|
|
390
391
|
.acud-tree-switcher-noop {
|
|
@@ -393,6 +394,29 @@
|
|
|
393
394
|
.acud-tree-switcher_close .acud-tree-switcher-icon svg {
|
|
394
395
|
transform: rotate(-90deg);
|
|
395
396
|
}
|
|
397
|
+
.acud-tree-switcher-leaf-line {
|
|
398
|
+
position: relative;
|
|
399
|
+
z-index: 1;
|
|
400
|
+
display: inline-block;
|
|
401
|
+
width: 100%;
|
|
402
|
+
height: 100%;
|
|
403
|
+
}
|
|
404
|
+
.acud-tree-switcher-leaf-line::before {
|
|
405
|
+
position: absolute;
|
|
406
|
+
top: 0;
|
|
407
|
+
right: 8px;
|
|
408
|
+
bottom: -4px;
|
|
409
|
+
margin-left: -1px;
|
|
410
|
+
border-right: 1px solid #B8BABF;
|
|
411
|
+
content: ' ';
|
|
412
|
+
}
|
|
413
|
+
.acud-tree-switcher-leaf-line::after {
|
|
414
|
+
position: absolute;
|
|
415
|
+
width: 10px;
|
|
416
|
+
height: 14px;
|
|
417
|
+
border-bottom: 1px solid #B8BABF;
|
|
418
|
+
content: ' ';
|
|
419
|
+
}
|
|
396
420
|
.acud-tree .acud-tree-node-content-wrapper {
|
|
397
421
|
position: relative;
|
|
398
422
|
z-index: auto;
|
|
@@ -484,6 +508,26 @@
|
|
|
484
508
|
.acud-tree-treenode:hover .acud-tree-draggable-icon {
|
|
485
509
|
opacity: 0.45;
|
|
486
510
|
}
|
|
511
|
+
.acud-tree-show-line .acud-tree-indent-unit {
|
|
512
|
+
position: relative;
|
|
513
|
+
height: 100%;
|
|
514
|
+
}
|
|
515
|
+
.acud-tree-show-line .acud-tree-indent-unit::before {
|
|
516
|
+
position: absolute;
|
|
517
|
+
top: 0;
|
|
518
|
+
right: 16px;
|
|
519
|
+
bottom: -4px;
|
|
520
|
+
border-right: 1px solid #B8BABF;
|
|
521
|
+
content: '';
|
|
522
|
+
}
|
|
523
|
+
.acud-tree-show-line .acud-tree-indent-unit-end::before {
|
|
524
|
+
display: none;
|
|
525
|
+
}
|
|
526
|
+
.acud-tree .acud-tree-treenode-leaf-last .acud-tree-switcher-leaf-line::before {
|
|
527
|
+
top: auto !important;
|
|
528
|
+
bottom: auto !important;
|
|
529
|
+
height: 14px !important;
|
|
530
|
+
}
|
|
487
531
|
.acud-tree-checkbox {
|
|
488
532
|
margin: 2px 0 0 8px;
|
|
489
533
|
top: 0.1em;
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
line-height: 0;
|
|
13
13
|
vertical-align: -.24em;
|
|
14
14
|
svg {
|
|
15
|
+
// 宽度规范覆盖自定义图标
|
|
16
|
+
width: 16px!important;
|
|
15
17
|
transition: transform .3s;
|
|
16
18
|
}
|
|
17
19
|
}
|
|
@@ -143,6 +145,31 @@
|
|
|
143
145
|
}
|
|
144
146
|
}
|
|
145
147
|
}
|
|
148
|
+
|
|
149
|
+
&-leaf-line {
|
|
150
|
+
position: relative;
|
|
151
|
+
z-index: 1;
|
|
152
|
+
display: inline-block;
|
|
153
|
+
width: 100%;
|
|
154
|
+
height: 100%;
|
|
155
|
+
&::before {
|
|
156
|
+
position: absolute;
|
|
157
|
+
top: 0;
|
|
158
|
+
right: @P * 2;
|
|
159
|
+
bottom: -@tree-node-padding;
|
|
160
|
+
margin-left: -1px;
|
|
161
|
+
border-right: 1px solid @G6;
|
|
162
|
+
content: ' ';
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&::after {
|
|
166
|
+
position: absolute;
|
|
167
|
+
width: @tree-title-height - 14px;
|
|
168
|
+
height: @tree-title-height - 10px;
|
|
169
|
+
border-bottom: 1px solid @G6;
|
|
170
|
+
content: ' ';
|
|
171
|
+
}
|
|
172
|
+
}
|
|
146
173
|
}
|
|
147
174
|
|
|
148
175
|
// title
|
|
@@ -228,6 +255,43 @@
|
|
|
228
255
|
}
|
|
229
256
|
}
|
|
230
257
|
|
|
258
|
+
// show line
|
|
259
|
+
&-show-line {
|
|
260
|
+
.@{custom-tree-prefix-cls}-indent {
|
|
261
|
+
&-unit {
|
|
262
|
+
position: relative;
|
|
263
|
+
height: 100%;
|
|
264
|
+
|
|
265
|
+
&::before {
|
|
266
|
+
position: absolute;
|
|
267
|
+
top: 0;
|
|
268
|
+
right: (@tree-title-height / 3 * 2);
|
|
269
|
+
bottom: -@tree-node-padding;
|
|
270
|
+
border-right: 1px solid @G6;
|
|
271
|
+
content: '';
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
&-end {
|
|
275
|
+
&::before {
|
|
276
|
+
display: none;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.@{custom-tree-node-prefix-cls}-leaf-last {
|
|
284
|
+
.@{custom-tree-prefix-cls}-switcher {
|
|
285
|
+
&-leaf-line {
|
|
286
|
+
&::before {
|
|
287
|
+
top: auto !important;
|
|
288
|
+
bottom: auto !important;
|
|
289
|
+
height: @tree-title-height - 10px !important;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
231
295
|
// Checkbox
|
|
232
296
|
&-checkbox {
|
|
233
297
|
margin: 0.5 * @P 0 0 2 * @P;
|
package/lib/tree/tree.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import RcTree, { TreeNode, TreeProps as RcTreeProps } from 'rc-tree';
|
|
2
|
+
import RcTree, { TreeNode, TreeProps as RcTreeProps, TreeNodeProps } from 'rc-tree';
|
|
3
3
|
import { BaseInputProps } from '../input/Input';
|
|
4
4
|
import type { EventDataNode as RcEventDataNode, DataNode as RcDataNode, Key } from 'rc-tree/lib/interface';
|
|
5
5
|
export interface DataNode extends RcDataNode {
|
|
6
6
|
isEditable?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export type EventDataNode = RcEventDataNode<DataNode>;
|
|
9
|
+
export type TreeIcon = React.ReactNode | ((treeNode: TreeNodeProps) => React.ReactNode);
|
|
9
10
|
declare enum DataChangeType {
|
|
10
11
|
SAVE = "save",
|
|
11
12
|
EDITINPUTCHANGE = "editInputChange",
|
|
@@ -24,6 +25,7 @@ interface PopoverUtil {
|
|
|
24
25
|
}
|
|
25
26
|
export interface TreeProps extends Partial<RcTreeProps> {
|
|
26
27
|
treeData?: DataNode[];
|
|
28
|
+
showLine?: boolean;
|
|
27
29
|
className?: string;
|
|
28
30
|
multiple?: boolean;
|
|
29
31
|
checkable?: boolean;
|
|
@@ -36,7 +38,8 @@ export interface TreeProps extends Partial<RcTreeProps> {
|
|
|
36
38
|
showPopoverUtil?: boolean;
|
|
37
39
|
customPopoverUtil?: Array<PopoverUtil>;
|
|
38
40
|
showIcon?: boolean;
|
|
39
|
-
icon?:
|
|
41
|
+
icon?: TreeIcon;
|
|
42
|
+
switchIcon?: TreeIcon;
|
|
40
43
|
children?: React.ReactNode;
|
|
41
44
|
onDataChange?: (treeData: DataNode[], changingData: DataNode, changeType: DataChangeType) => void;
|
|
42
45
|
}
|
package/lib/tree/tree.js
CHANGED
|
@@ -106,6 +106,8 @@ var Tree = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
|
|
|
106
106
|
customPopoverUtil = _props$customPopoverU === void 0 ? DEFAULT_POPOVER_UTIL : _props$customPopoverU,
|
|
107
107
|
customizePrefixCls = props.prefixCls,
|
|
108
108
|
className = props.className,
|
|
109
|
+
showLine = props.showLine,
|
|
110
|
+
_switcherIcon = props.switcherIcon,
|
|
109
111
|
onDataChange = props.onDataChange,
|
|
110
112
|
treeDataOrigin = props.treeData;
|
|
111
113
|
var _useState = (0, _react.useState)([]),
|
|
@@ -381,7 +383,7 @@ var Tree = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
|
|
|
381
383
|
}) : checkable,
|
|
382
384
|
autoExpandParent: autoExpandParent,
|
|
383
385
|
switcherIcon: function switcherIcon(nodeProps) {
|
|
384
|
-
return (0, _iconHelper.renderSwitcherIcon)(prefixCls, nodeProps);
|
|
386
|
+
return (0, _iconHelper.renderSwitcherIcon)(prefixCls, _switcherIcon, showLine, nodeProps);
|
|
385
387
|
},
|
|
386
388
|
dropIndicatorRender: _dragHelper.dropIndicatorRender,
|
|
387
389
|
draggable: draggableConfig
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TreeNodeProps } from 'rc-tree';
|
|
3
|
-
|
|
2
|
+
import type { TreeIcon } from '../tree';
|
|
3
|
+
export declare function renderSwitcherIcon(prefixCls: string, switcherIcon: TreeIcon, showLine: boolean, nodeProps: TreeNodeProps): any;
|