力量预制部分 滚动条自动滚动
This commit is contained in:
parent
83c414932a
commit
e1a6f8be3e
@ -102,6 +102,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="station-list">
|
<div class="station-list">
|
||||||
|
<div class="station-list-inner">
|
||||||
<div
|
<div
|
||||||
v-for="station in forcePreset.stations"
|
v-for="station in forcePreset.stations"
|
||||||
:key="station.id"
|
:key="station.id"
|
||||||
@ -123,6 +124,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@ -352,10 +354,10 @@ const vClickOutside = {
|
|||||||
font-size: fs(14);
|
font-size: fs(14);
|
||||||
font-family: SourceHanSansCN-Medium, sans-serif;
|
font-family: SourceHanSansCN-Medium, sans-serif;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
width:70px;
|
width: 70px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flexBox{
|
.flexBox {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
@ -394,10 +396,26 @@ const vClickOutside = {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: vh(8);
|
gap: vh(8);
|
||||||
|
position: relative;
|
||||||
max-height: vw(120);
|
max-height: vw(120);
|
||||||
overflow-y: auto;
|
overflow-y: hidden;
|
||||||
|
margin: vh(5) 0;
|
||||||
|
|
||||||
|
&-inner {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: vh(8);
|
||||||
|
animation: scroll 40s linear infinite;
|
||||||
|
will-change: transform;
|
||||||
|
padding-right: vw(4); // 保留滚动条空间
|
||||||
|
|
||||||
|
// 鼠标悬停暂停滚动
|
||||||
|
&:hover {
|
||||||
|
animation-play-state: paused;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 滚动条
|
|
||||||
&::-webkit-scrollbar {
|
&::-webkit-scrollbar {
|
||||||
width: vw(4);
|
width: vw(4);
|
||||||
}
|
}
|
||||||
@ -406,18 +424,25 @@ const vClickOutside = {
|
|||||||
background: rgba(20, 53, 118, 0.5);
|
background: rgba(20, 53, 118, 0.5);
|
||||||
border-radius: vw(2);
|
border-radius: vw(2);
|
||||||
}
|
}
|
||||||
|
@keyframes scroll {
|
||||||
|
0% {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: translateY(calc(-100% + vw(120)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.station-item {
|
.station-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: vw(12);
|
gap: vw(12);
|
||||||
padding: vh(0) vw(12);
|
padding: vh(0) vw(12);
|
||||||
// background: rgba(20, 53, 118, 0.3);
|
|
||||||
background: url("../../assets/images/文本线条框.png") no-repeat center
|
background: url("../../assets/images/文本线条框.png") no-repeat center
|
||||||
center;
|
center;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
border-radius: vw(6);
|
border-radius: vw(6);
|
||||||
|
flex-shrink: 0;
|
||||||
.station-icon {
|
.station-icon {
|
||||||
width: vw(32);
|
width: vw(32);
|
||||||
height: vh(32);
|
height: vh(32);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user