提交 4dbc80e3 authored 作者: lihuihui's avatar lihuihui

update: 优化滚动

上级 3eb3ec30
......@@ -77,6 +77,7 @@
<script>
import action from '@action'
import Bus from '@/components/common/bus.js'
import _ from 'lodash'
export default {
components: {
},
......@@ -146,7 +147,7 @@ export default {
})
},
// 选项选择
changeOptions(type, pId, cId, optId) {
changeOptions: _.debounce(function(type, pId, cId, optId) {
if (parseInt(type) !== 2) {
this.questionParams.answerRecord[pId]
? this.questionParams.answerRecord[pId][cId]
......@@ -183,10 +184,9 @@ export default {
}
}
}
console.log(this.countQuetion)
Bus.$emit('monitoringChanges')
this.$forceUpdate()
},
}, 100),
setCache() {
const param = {
answer: JSON.stringify(this.questionParams.answerRecord)
......
......@@ -128,14 +128,14 @@ export default {
}
const wrapper = this.$refs.wrapper
new BScroll(wrapper, { click: true })
this.initBscroll(200)
this.initBscroll(1000)
},
methods: {
// 初始化bscroll插件
initBscroll(s = 1000) {
initBscroll(s = 200) {
setTimeout(() => {
const wrapper2 = this.$refs.wrapper2
new BScroll(wrapper2, { click: true, bounce: false, startY: 0 })
new BScroll(wrapper2, { click: true, bounce: false, startY: 0, momentum: false })
}, s)
},
sendExamInfo(status) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论