Skip to content

Commit 5a2cd86

Browse files
author
hikki
committed
效果调整
1 parent 8902c63 commit 5a2cd86

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

resources/assets/component.css

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@
118118
margin-bottom: 3px;
119119
position: relative;
120120
}
121+
.dot-cascade-stack>.dlp-label-silence{
122+
opacity: 0.5;
123+
transition: .2s ease-in-out;
124+
}
125+
.dot-cascade-stack>.dlp-label-active{
126+
animation: dlpLabelActive ease-in-out 1s forwards;
127+
}
121128
.dlp-label>i{
122129
position: absolute!important;
123130
right: 4px!important;
@@ -127,11 +134,6 @@
127134
left: 0!important;
128135
right: unset!important;
129136
}
130-
.dot-cascade-stack>.dlp-label-silence{
131-
opacity: 0.5;
132-
transition: .2s ease-in-out;
133-
}
134-
135137
.dlp-input{
136138
vertical-align: middle;
137139
display: inline-block;
@@ -223,4 +225,9 @@
223225
@keyframes dlpFadeIn {
224226
0% {opacity: 0;}
225227
100% {opacity: 1;}
228+
}
229+
230+
@keyframes dlpLabelActive{
231+
0% {background: #d6d6d6;}
232+
100% {background: #ffffff;}
226233
}

resources/assets/component.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,14 +460,18 @@ class ComponentCascadeDot {
460460
currentStackDocuments.forEach((D, index) => {
461461
let data = this.dimensional_data[stack][index];
462462
let parents = data.parentNodes;
463+
D.classList.remove('dlp-label-active');
463464
if (checked === true || checked === undefined) {
464465
if (parents.length > 0 && (parents[stack - 1] !== parentNode)) {
465466
D.classList.add('dlp-label-silence');
466467
} else if (parents.length === 0 && parseInt(D.getAttribute('data-id')) !== node) {
467468
D.classList.add('dlp-label-silence');
468469
} else {
469470
D.classList.remove('dlp-label-silence');
470-
if (to_first_index === null && parseInt(D.getAttribute('data-id')) === node) to_first_index = index;
471+
if (to_first_index === null && parseInt(D.getAttribute('data-id')) === node){
472+
to_first_index = index;
473+
D.classList.add('dlp-label-active');
474+
}
471475
}
472476
}
473477
if (checked === true && node === data.key && data.mark !== true) {

0 commit comments

Comments
 (0)