<el-scrollbar ref="scrollBar" :height="sc_height">
//通过回调计算位置
//点击答题卡跳转
const onClickTopic = (item) => {
let srollTopValue = 0
stemTypeRadio.value.forEach((e) => {
if (e.id < item.id) {
srollTopValue += e.options.length * 40 + 86
}
})
stemTypeCheckbox.value.forEach((e) => {
if (e.id < item.id) {
srollTopValue += e.options.length * 40 + 86
}
})
stemTypeJudgment.value.forEach((e) => {
if (e.id < item.id) {
srollTopValue += e.options.length * 40 + 86
}
})
scrollBar.value.setScrollTop(srollTopValue)
}
回到底部
//scrollBar下拉框的回调
scrollBar.value.setScrollTop(scrollBar.value.wrapRef.scrollHeight)