perf(tangPopup): 优化滚动定位逻辑
- 移除了 setTimeout 包裹,直接执行滚动定位逻辑 - 保留了原有的滚动定位功能,没有引入新功能
This commit is contained in:
parent
ad19345db6
commit
f1bd2b183f
@ -33,8 +33,6 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
const scrollToCurrentItem = () => {
|
const scrollToCurrentItem = () => {
|
||||||
if (!itemList.value?.length) return
|
if (!itemList.value?.length) return
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
const currentIndex = itemList.value.findIndex(
|
const currentIndex = itemList.value.findIndex(
|
||||||
item => auctionData.value.artwork.index === item?.index
|
item => auctionData.value.artwork.index === item?.index
|
||||||
)
|
)
|
||||||
@ -51,7 +49,6 @@ const scrollToCurrentItem = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 100)
|
|
||||||
}
|
}
|
||||||
const emit = defineEmits(['update:show'])
|
const emit = defineEmits(['update:show'])
|
||||||
const showDetailInfo=ref(null)
|
const showDetailInfo=ref(null)
|
||||||
|
Loading…
Reference in New Issue
Block a user