perf(tangPopup): 优化滚动定位逻辑

- 移除了 setTimeout 包裹,直接执行滚动定位逻辑
- 保留了原有的滚动定位功能,没有引入新功能
This commit is contained in:
xingyy 2025-02-08 17:10:23 +08:00
parent ad19345db6
commit f1bd2b183f

View File

@ -33,8 +33,6 @@ const props = defineProps({
})
const scrollToCurrentItem = () => {
if (!itemList.value?.length) return
setTimeout(() => {
const currentIndex = itemList.value.findIndex(
item => auctionData.value.artwork.index === item?.index
)
@ -51,7 +49,6 @@ const scrollToCurrentItem = () => {
})
}
}
}, 100)
}
const emit = defineEmits(['update:show'])
const showDetailInfo=ref(null)