Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-admin-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
najiu-frontend
najiu-admin-template
Commits
6e400511
Commit
6e400511
authored
Oct 24, 2020
by
vben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: tabs optimization
parent
c7cfeb54
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
19 deletions
+13
-19
index.less
src/layouts/default/multitabs/index.less
+12
-19
index.tsx
src/layouts/default/multitabs/index.tsx
+1
-0
No files found.
src/layouts/default/multitabs/index.less
View file @
6e400511
...
...
@@ -7,19 +7,6 @@
height: @multiple-height;
}
// .ant-tabs:not(.ant-tabs-card) {
// .ant-tabs-nav-container {
// height: @multiple-height;
// background: @white;
// }
// .ant-tabs-tab {
// font-size: 14px;
// line-height: 1.5515;
// background: @white;
// }
// }
.ant-tabs.ant-tabs-card {
.ant-tabs-card-bar {
height: @multiple-height;
...
...
@@ -39,14 +26,21 @@
line-height: calc(@multiple-height - 2px);
color: @text-color-call-out;
background: @white;
border: 1px solid
@border-color-shallow-dark
;
border-radius:
4px 4
px 0 0;
border: 1px solid
darken(@border-color-light, 6%)
;
border-radius:
2px 2
px 0 0;
transition: none;
.ant-tabs-close-x {
// display: none;
color: inherit;
}
&:hover {
.ant-tabs-close-x {
display: block;
}
}
> div {
display: flex;
justify-content: center;
...
...
@@ -72,7 +66,7 @@
&:hover::before {
transform: scaleX(1);
transition: transform 0.
4
s ease;
transition: transform 0.
3
s ease;
transform-origin: bottom left;
}
}
...
...
@@ -80,14 +74,13 @@
.ant-tabs-tab-active {
height: calc(@multiple-height - 3px);
color: @white;
// background: @primary-color;
background: linear-gradient(
118deg,
rgba(@primary-color, 0.
8
),
rgba(@primary-color, 0.
7
),
rgba(@primary-color, 1)
) !important;
border: 0;
box-shadow: 0 0 6px 1px rgba(@primary-color, 0.
4
);
box-shadow: 0 0 6px 1px rgba(@primary-color, 0.
7
);
&::before {
display: none;
...
...
src/layouts/default/multitabs/index.tsx
View file @
6e400511
...
...
@@ -148,6 +148,7 @@ export default defineComponent({
<
Tabs
type=
"editable-card"
size=
"small"
animated=
{
false
}
hideAdd=
{
true
}
tabBarGutter=
{
2
}
activeKey=
{
unref
(
activeKeyRef
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment