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

update: 优化滚动

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