提交 25c30fd1 编写于 作者: guangjun.yang's avatar guangjun.yang

滚动到第二屏幕时出现的“置顶”按钮层级有问题

上级 d184b188
...@@ -287,9 +287,7 @@ export default { ...@@ -287,9 +287,7 @@ export default {
subIndex = 0, subIndex = 0,
firstSub = [], firstSub = [],
secondSub = []; secondSub = [];
// flag = false;
outloop: for (let i = 0; i < list.length; i++) { outloop: for (let i = 0; i < list.length; i++) {
// if(flag) break;
firstSub = list[i].firstSubjectModelList; firstSub = list[i].firstSubjectModelList;
for (let j = 0; j < firstSub.length; j++) { for (let j = 0; j < firstSub.length; j++) {
secondSub = firstSub[j].secondSubjectModelList; secondSub = firstSub[j].secondSubjectModelList;
...@@ -298,7 +296,6 @@ export default { ...@@ -298,7 +296,6 @@ export default {
parentIndex = i; parentIndex = i;
fIndex = j; fIndex = j;
subIndex = k; subIndex = k;
// flag = true;
break outloop; break outloop;
} }
} }
...@@ -306,7 +303,6 @@ export default { ...@@ -306,7 +303,6 @@ export default {
} }
this.currentModelIndex = parentIndex; this.currentModelIndex = parentIndex;
this.listData = this.titleTestModelList[parentIndex].firstSubjectModelList || []; this.listData = this.titleTestModelList[parentIndex].firstSubjectModelList || [];
console.log('查找对应的职称与专业', this.currentModelIndex, this.listData);
this.$forceUpdate(); this.$forceUpdate();
this.resetProjectPosition(fIndex, subIndex); this.resetProjectPosition(fIndex, subIndex);
}, },
...@@ -315,9 +311,7 @@ export default { ...@@ -315,9 +311,7 @@ export default {
resetProjectPosition(fIndex, subIndex) { resetProjectPosition(fIndex, subIndex) {
this.$nextTick(() => { this.$nextTick(() => {
setTimeout(() => { setTimeout(() => {
// let scrollTop = this.$refs['subject_' + subIndex].offsetTop;
let scrollTop = document.getElementById(`subject_${fIndex}_${subIndex}`).offsetTop; let scrollTop = document.getElementById(`subject_${fIndex}_${subIndex}`).offsetTop;
console.log('in resetProjectPosition', scrollTop);
window.scrollTo(0, scrollTop - 74); window.scrollTo(0, scrollTop - 74);
}, 100); }, 100);
}); });
...@@ -522,6 +516,7 @@ export default { ...@@ -522,6 +516,7 @@ export default {
} }
.back-up-icon { .back-up-icon {
position: fixed; position: fixed;
z-index: 10;
bottom: px2rem(50px); bottom: px2rem(50px);
right: px2rem(15px); right: px2rem(15px);
img { img {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册