Commit de1428a6 by 前端

GLTabs组件样式调整

1 parent ceab47a4
<template>
<div class="gl-tab">
<div :class="['gl-tab', 'gl-tab-' + type]">
<el-tabs ref="tab" v-bind="$attrs" v-on="$listeners">
<el-tab-pane v-for="(item, index) in tabPaneList" :key="index" v-bind="item" v-on="item.listeners">
<span slot="label" style="padding: 0 10px">{{ item.label }}</span>
......@@ -22,6 +22,10 @@ export default {
tabPaneList: {
type: Array,
default: () => [{}]
},
type: {
type: String,
default: ''
}
},
......@@ -35,9 +39,7 @@ export default {
this.activeName = this.$refs.tab
},
methods: {
}
methods: {}
}
</script>
......@@ -71,4 +73,75 @@ export default {
background-color: $color-primary;
}
}
.gl-tab-card /deep/ .el-tabs {
&__item {
&.is-active,
&:hover {
background: #ffffff;
}
height: 40px !important;
font-size: 14px;
color: #666666;
line-height: 40px;
background: #f8f8f8;
border-radius: 4px 4px 0 0;
margin-right: 1px;
max-width: 140px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
padding: 0 10px !important;
}
&__active-bar {
height: 0px;
background-color: transparent;
}
.el-tabs__nav-wrap::after {
content: '';
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 2px;
background-color: transparent;
z-index: 1;
}
}
.gl-tab-btn /deep/ .el-tabs {
.el-tabs__nav {
border-radius: 4px;
background: #F8F8F8;
}
&__item {
&.is-active,
&:hover {
background: #ffffff;
height: 32px !important;
margin: 2px;
border-radius: 3px;
line-height: 32px;
}
padding: 0 6px !important;
height: 36px !important;
font-size: 14px;
color: #666666;
line-height: 36px;
}
&__active-bar {
height: 0px;
background-color: transparent;
}
.el-tabs__nav-wrap::after {
content: '';
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 2px;
background-color: transparent;
z-index: 1;
}
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!