mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 21:58:03 +00:00
fix: bugs
fix: bugs
This commit is contained in:
parent
1444bbefa2
commit
70d1de0e0f
62 changed files with 368 additions and 284 deletions
|
|
@ -1,8 +1,9 @@
|
|||
import useLyric from '@/hooks/useLyric'
|
||||
import { player } from '@/store'
|
||||
import useLyric from '@/renderer/hooks/useLyric'
|
||||
import { player } from '@/renderer/store'
|
||||
import { motion, useMotionValue } from 'framer-motion'
|
||||
import { lyricParser } from '@/utils/lyric'
|
||||
import { lyricParser } from '@/renderer/utils/lyric'
|
||||
import { useWindowSize } from 'react-use'
|
||||
import { useLayoutEffect } from 'react'
|
||||
|
||||
const Lyric = ({ className }: { className?: string }) => {
|
||||
// const ease = [0.5, 0.2, 0.2, 0.8]
|
||||
|
|
@ -29,7 +30,7 @@ const Lyric = ({ className }: { className?: string }) => {
|
|||
const y = useMotionValue(1000)
|
||||
const { height: windowHight } = useWindowSize()
|
||||
|
||||
useEffect(() => {
|
||||
useLayoutEffect(() => {
|
||||
const top = (
|
||||
document.getElementById('lyrics')?.children?.[currentIndex] as any
|
||||
)?.offsetTop
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue