提交 fb24f60f authored 作者: lihuihui's avatar lihuihui

updata

上级 0c21d94f
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="topic-box" id="bottom-view" v-if="questionsData"> <div :class="classHide ? 'topic-box' : 'topic-box hide'" id="bottom-view" v-if="questionsData">
<swiper ref="mySwiper" :options="swiperOptions"> <swiper ref="mySwiper" :options="swiperOptions">
<template v-for="(item) in questionsData.questions"> <template v-for="(item) in questionsData.questions">
<template v-for="(dItem, dIndex) in item.question_list"> <template v-for="(dItem, dIndex) in item.question_list">
...@@ -137,6 +137,7 @@ export default { ...@@ -137,6 +137,7 @@ export default {
data () { data () {
const _this = this const _this = this
return { return {
classHide: true,
nextBtnShow: true, nextBtnShow: true,
isCard: false, isCard: false,
opaKey: ['A', 'B', 'C', 'D', 'E', 'F', 'G'], opaKey: ['A', 'B', 'C', 'D', 'E', 'F', 'G'],
...@@ -440,7 +441,9 @@ export default { ...@@ -440,7 +441,9 @@ export default {
// 显示隐藏解析 // 显示隐藏解析
analyShow() { analyShow() {
this.isAnalysis = !this.isAnalysis this.isAnalysis = !this.isAnalysis
setTimeout(() => {
this.scrollDom() this.scrollDom()
}, 500)
}, },
// 单选事件 判断题事件 // 单选事件 判断题事件
selectRadio(cData, checkId, index, oData) { selectRadio(cData, checkId, index, oData) {
...@@ -527,9 +530,14 @@ export default { ...@@ -527,9 +530,14 @@ export default {
const topViewH = document.getElementById('top-view').offsetHeight const topViewH = document.getElementById('top-view').offsetHeight
const clientHeight = document.documentElement.clientHeight const clientHeight = document.documentElement.clientHeight
const bottomView = document.getElementById('bottom-view') const bottomView = document.getElementById('bottom-view')
// const domH = this.swiper.slides[this.swiper.activeIndex].clientHeight const domH = this.swiper.slides[this.swiper.activeIndex].clientHeight
bottomView.style.height = (clientHeight - topViewH) + 'px' bottomView.style.height = (clientHeight - topViewH) + 'px'
// console.log(domH, (clientHeight - topViewH)) console.log(domH - 50, (clientHeight - topViewH))
if (domH - 50 >= (clientHeight - topViewH)) {
this.classHide = true
} else {
this.classHide = false
}
// if (domH > (clientHeight - topViewH)) { // if (domH > (clientHeight - topViewH)) {
// bottomView.style.height = (clientHeight - topViewH) + 'px' // bottomView.style.height = (clientHeight - topViewH) + 'px'
// } else { // } else {
...@@ -695,14 +703,7 @@ export default { ...@@ -695,14 +703,7 @@ export default {
margin: 0 auto; margin: 0 auto;
font-size: .3rem; font-size: .3rem;
color: #222; color: #222;
// padding-bottom: 1.2rem;
overflow-y: scroll; overflow-y: scroll;
// .swiper-wrapper{
// width:100%;
// }
// .swiper-slide{
// width:100%;
// }
.title{ .title{
padding: .4rem; padding: .4rem;
display: flex; display: flex;
...@@ -778,6 +779,9 @@ export default { ...@@ -778,6 +779,9 @@ export default {
} }
} }
} }
.topic-box.hide{
overflow: hidden;
}
.btn-box{ .btn-box{
position: fixed; position: fixed;
bottom: 0; bottom: 0;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论