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

固定的时候也可以左右滑动

上级 c4665e61
<!-- Tabs组件 --> <!-- Tabs组件 -->
<template> <template>
<div class="common-tabs-wrapper" :class="{'fixed': needFixed}"> <div class="common-tabs-wrapper" >
<div class="sub-wrapper" :class="{'fixed': needFixed}">
<ul class="common-tabs"> <ul class="common-tabs">
<li <li
v-show="(item === '总体概况' v-show="(item === '总体概况'
...@@ -17,6 +18,7 @@ ...@@ -17,6 +18,7 @@
<span class="over"></span> <span class="over"></span>
<span class="border"></span> <span class="border"></span>
</div> </div>
</div>
</template> </template>
<script> <script>
export default { export default {
...@@ -53,19 +55,35 @@ export default { ...@@ -53,19 +55,35 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.common-tabs-wrapper { .common-tabs-wrapper {
.sub-wrapper {
display: flex;
position: relative;
width: 100%;
top: 0;
left: 0;
z-index: 1;
font-size: 13px;
width: 100%;
white-space: nowrap;
&.fixed { &.fixed {
position: fixed; position: fixed;
top: 70px; top: 70px;
width: 100%;
z-index: 10000000; z-index: 10000000;
background: #fff; background: #fff;
white-space: nowrap;
overflow-x: auto;
}
} }
display: flex; display: flex;
position: relative; position: relative;
width: 100%;
top: 0; top: 0;
left: 0; left: 0;
z-index: 1; z-index: 1;
font-size: 13px; font-size: 13px;
.common-tabs { .common-tabs {
width: 100%;
white-space: nowrap; white-space: nowrap;
overflow-x: auto; overflow-x: auto;
padding: 9px 0; padding: 9px 0;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册