Commit 9bf886b7 authored by Jenny's avatar Jenny

feat: 选项卡吸顶配置

parent e93ac0e3
......@@ -5,6 +5,7 @@
class="view-element"
v-if="!element.hide"
:key="element.id"
:class="[element.type == 'NormalTabs' && element.option.tabs.sticky && pageScrollTop > Number(element.top) ? 'el-fixed': '']"
:style="{
width: `${parseInt(element.width * scale)}px`,
height: `${parseInt(element.height * scale)}px`,
......@@ -60,7 +61,8 @@
data() {
return {
reportInfo: {},
timename: null
timename: null,
pageScrollTop: 0
}
},
computed: {
......@@ -226,7 +228,10 @@
},
onPullDownRefresh() {
this.getReportCharts()
}
},
onPageScroll(res) {
this.pageScrollTop = res.scrollTop
},
}
</script>
......@@ -245,4 +250,8 @@
user-select: none;
cursor: move;
}
.el-fixed {
position: sticky;
top: 0 !important;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment