提交 1cb6b5cc authored 作者: lihuihui's avatar lihuihui

update: 优化滚动

上级 4dbc80e3
......@@ -114,7 +114,8 @@ export default {
// 当前题的下标
questionIndex: 0,
// 所有题 和题的信息
question: {}
question: {},
domBScroll: null
}
}
},
......@@ -132,11 +133,11 @@ export default {
},
methods: {
// 初始化bscroll插件
initBscroll(s = 200) {
initBscroll() {
setTimeout(() => {
const wrapper2 = this.$refs.wrapper2
new BScroll(wrapper2, { click: true, bounce: false, startY: 0, momentum: false })
}, s)
this.domBScroll = new BScroll(wrapper2, { click: true })
}, 1000)
},
sendExamInfo(status) {
const param = {
......@@ -300,7 +301,9 @@ export default {
this.questionParams.questionIndex + 1 !== this.questionParams.question.total_question_count &&
this.questionParams.questionIndex++
}
this.initBscroll()
this.domBScroll.refresh()
this.domBScroll.scrollTo(0, -10, 0)
// this.initBscroll()
},
getTopic() {
action.Exam.getTopic(this.$route.params.examId)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论