Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
npm
/
glsx-components
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2b24cf40
authored
Aug 09, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
tab样式
1 parent
e04410d3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
18 deletions
src/packages/GLTabs/src/index.vue
src/plugins/element.js
src/packages/GLTabs/src/index.vue
View file @
2b24cf4
<
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
;
}
}
}
}
}
}
...
...
src/plugins/element.js
View file @
2b24cf4
...
@@ -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
=>
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment