Commit 2b24cf40 by chenwq

tab样式

1 parent e04410d3
<template>
<div class="gl-tab">
<el-tabs ref="tab" v-bind="$attrs" v-on="$listeners">
<el-tab-pane v-for="(item, index) in tabPaneList" :key="index" v-bind="item.attrs" v-on="item.listeners"></el-tab-pane>
<el-tab-pane v-for="(item, index) in tabPaneList" :key="index" v-bind="item.attrs" v-on="item.listeners">
<span slot="label" style="padding: 0 10px">{{ item.attrs.label }}</span>
</el-tab-pane>
</el-tabs>
</div>
</template>
......@@ -44,26 +46,33 @@ export default {
<style lang="scss">
.gl-tab {
background: #ffffff;
.el-tabs__nav {
display: flex;
flex-wrap: nowrap;
overflow: scroll;
}
.el-tabs__active-bar {
width: 0 !important;
}
.el-tabs__item {
flex: 0 0 auto;
font-size: 16px;
color: #666666;
letter-spacing: 0.8px;
padding: 14px 24px;
cursor: pointer;
&.is-active {
background: #f0f1f7;
color: #5850ff;
font-weight: bold;
// position: relative;
/deep/.el-tabs {
&__nav-wrap {
&::after {
height: 1px;
// width: calc(100% - #{$left});
}
}
&__header {
margin: 4px 0 1px;
}
&__item {
height: 42px !important;
// line-height: 10px !important;
&.is-active,
&:hover {
color: $color-primary;
font-weight: 600;
}
font-weight: 400;
font-size: 16px;
color: #717171;
height: 36px;
line-height: 36px;
}
&__active-bar {
background-color: $color-primary;
}
}
}
......
......@@ -26,6 +26,8 @@ import 'element-ui/lib/theme-chalk/dropdown-menu.css'
import 'element-ui/lib/theme-chalk/dialog.css'
import 'element-ui/lib/theme-chalk/message.css'
import 'element-ui/lib/theme-chalk/message-box.css'
import 'element-ui/lib/theme-chalk/tabs.css'
import 'element-ui/lib/theme-chalk/tab-pane.css'
// 解决 ElTable 自动宽度高度导致的「ResizeObserver loop limit exceeded」问题
const fixElTableErr = table => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!