-
{{ currentTrack.title }}
-
{{ currentTrack.artist }}
+
+
+
+ {{ currentTrack.title }}
+ {{ currentTrack.artist }}
+
-
-
@@ -78,7 +80,6 @@ function onVolumeChange(e) {
left: 0;
right: 0;
display: flex;
- /*flex-direction: column;*/
align-items: center;
gap: var(--size-3);
padding: var(--size-4);
@@ -87,9 +88,15 @@ function onVolumeChange(e) {
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}
+.player-left {
+ display: flex;
+ flex-direction: row;
+}
+
.player-info {
display: flex;
justify-content: center;
+ min-width: 150px;
}
.track-info {
@@ -101,14 +108,23 @@ function onVolumeChange(e) {
font-weight: 600;
font-size: var(--font-size-1);
color: var(--stone-9);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ max-width: 150px;
}
.track-artist {
font-size: var(--font-size-0);
color: var(--stone-7);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ max-width: 150px;
}
.player-controls {
+ flex-grow: 1;
display: flex;
justify-content: center;
align-items: center;
@@ -150,6 +166,8 @@ function onVolumeChange(e) {
display: flex;
align-items: center;
gap: var(--size-3);
+ flex: 1;
+ min-width: 200px;
}
.time {
@@ -212,4 +230,80 @@ function onVolumeChange(e) {
border-radius: 50%;
cursor: pointer;
}
+
+/* 移动端响应式 */
+@media (max-width: 768px) {
+ .player {
+ flex-wrap: wrap;
+ padding: var(--size-2) var(--size-3);
+ gap: var(--size-2);
+ }
+
+ .player-left {
+ flex: 1;
+ width: 100%;
+ }
+
+ .player-info {
+ width: 100%;
+ order: 1;
+ min-width: auto;
+ flex: 1;
+ }
+
+ .track-info {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ gap: var(--size-2);
+ text-align: unset;
+ }
+
+ .track-title,
+ .track-artist {
+ max-width: none;
+ }
+
+ .player-controls {
+ flex-grow: 0;
+ order: 2;
+ gap: var(--size-4);
+ }
+
+ .control-btn {
+ padding: var(--size-1);
+ width: var(--size-8);
+ height: var(--size-8);
+ }
+
+ .play-btn {
+ width: var(--size-8);
+ height: var(--size-8);
+ }
+
+ .player-progress {
+ order: 3;
+ width: 100%;
+ min-width: auto;
+ gap: var(--size-2);
+ }
+
+ .time {
+ font-size: 10px;
+ min-width: 30px;
+ }
+
+ .progress-bar {
+ height: 6px;
+ }
+
+ .progress-bar::-webkit-slider-thumb {
+ width: 16px;
+ height: 16px;
+ }
+
+ .player-volume {
+ display: none;
+ }
+}