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

updata

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