From 380e80478f13d3a20e28774a83763af1c9a199ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=97=AD=E9=A3=9E?= Date: Mon, 18 Mar 2024 16:01:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E6=92=AD=E6=94=BE=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=B8=AD=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=AE=9A=E4=BD=8D=E6=8C=89?= =?UTF-8?q?=E9=92=AE=EF=BC=8C=E6=96=B9=E4=BE=BF=E5=AE=9A=E4=BD=8D=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E6=AD=A3=E5=9C=A8=E6=92=AD=E6=94=BE=E7=9A=84=E9=9F=B3?= =?UTF-8?q?=E4=B9=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/components/layout/Icons.vue | 3 ++ src/renderer/views/List/MusicList/index.vue | 43 +++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/src/renderer/components/layout/Icons.vue b/src/renderer/components/layout/Icons.vue index 3ee78a98..74a5455e 100644 --- a/src/renderer/components/layout/Icons.vue +++ b/src/renderer/components/layout/Icons.vue @@ -220,6 +220,9 @@ + + + diff --git a/src/renderer/views/List/MusicList/index.vue b/src/renderer/views/List/MusicList/index.vue index c6c74f07..e812f6eb 100644 --- a/src/renderer/views/List/MusicList/index.vue +++ b/src/renderer/views/List/MusicList/index.vue @@ -82,6 +82,15 @@
{{ item.interval || '--/--' }}
+

@@ -287,6 +296,9 @@ export default { const scrollToTop = () => { listRef.value.scrollTo(0, true) } + const handleLocation = () => { + listRef.value.scrollToIndex(playerInfo.value.playIndex, 0, true) + } return { listItemHeight, @@ -338,6 +350,8 @@ export default { handleRestoreScroll, actionButtonsVisible, + + handleLocation, } }, } @@ -396,6 +410,7 @@ export default { display: flex; flex-flow: column nowrap; flex: auto; + position: relative; } .noItem { @@ -412,4 +427,32 @@ export default { } } +.location { + all: unset; + position: absolute; + right: 48px; + bottom: 48px; + width: 32px; + height: 32px; + color: var(--color-button-font); + cursor: pointer; + + svg { + transition: opacity @transition-fast; + opacity: .6; + filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.2)); + } + + &:hover { + svg { + opacity: .9; + } + } + + &:active { + svg { + opacity: 1; + } + } +}