Skip to content

Commit

Permalink
fix: automatically close lyrics program
Browse files Browse the repository at this point in the history
  • Loading branch information
Linkontoask committed Jan 24, 2021
1 parent eb30bbf commit b52232f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/pages/footer/view/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineComponent, ref, computed } from 'vue'
import { useRouter } from '@/hooks/index'
import { defineComponent, ref, computed, watch } from 'vue'
import { useRouter, useRoute } from '@/hooks/index'
import { MusicControl } from '../components/music-controller'
import { VolumeAndHistory } from '../components/volume-history/index'
import { useFooterModule, useLayoutModule, useMainModule } from '@/modules'
Expand All @@ -19,6 +19,7 @@ export const Footer = defineComponent({
setup() {
const visibleLyrice = ref(false)

const route = useRoute()
const router = useRouter()
const FooterModule = useFooterModule()
const MainModule = useMainModule()
Expand All @@ -43,6 +44,13 @@ export const Footer = defineComponent({
}
}

watch(
() => route.path,
() => {
unfoldLyrice()
}
)

const toArtist = (artist: Artists) => {
router.push({
path: '/artist/' + artist.id + '/album'
Expand Down

0 comments on commit b52232f

Please sign in to comment.