mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-05-23 22:37:41 +08:00
添加添加条件判断
This commit is contained in:
parent
5e15f20d67
commit
c1a930f961
@ -44,7 +44,7 @@ export default memo(() => {
|
|||||||
// const imgWidth = useMemo(() => layout.width * 0.75, [layout.width])
|
// const imgWidth = useMemo(() => layout.width * 0.75, [layout.width])
|
||||||
const handleScrollToActive = useCallback((index = lineRef.current) => {
|
const handleScrollToActive = useCallback((index = lineRef.current) => {
|
||||||
if (index < 0) return
|
if (index < 0) return
|
||||||
if (scrollViewRef.current) {
|
if (scrollViewRef.current && linesRef.current.length <= index + 1) {
|
||||||
try {
|
try {
|
||||||
scrollViewRef.current.scrollToIndex({
|
scrollViewRef.current.scrollToIndex({
|
||||||
index: index,
|
index: index,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user