Commit 2b24cf40 by chenwq

tab样式

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