Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
VueElementTemplate
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
黄瑜
VueElementTemplate
Commits
d5683167
Commit
d5683167
authored
Oct 31, 2017
by
Pan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style:refine tabsview css
parent
2c868f47
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
79 additions
and
16 deletions
+79
-16
index.vue
src/components/GithubCorner/index.vue
+1
-1
index.vue
src/components/ScrollPane/index.vue
+51
-0
index.scss
src/styles/index.scss
+6
-0
index.vue
src/views/dashboard/admin/index.vue
+2
-2
TabsView.vue
src/views/layout/components/TabsView.vue
+19
-13
No files found.
src/components/GithubCorner/index.vue
View file @
d5683167
<
template
>
<
template
>
<a
href=
"https://github.com/PanJiaChen/vue-element-admin"
target=
"_blank"
class=
"github-corner"
aria-label=
"View source on Github"
>
<a
href=
"https://github.com/PanJiaChen/vue-element-admin"
target=
"_blank"
class=
"github-corner"
aria-label=
"View source on Github"
>
<svg
width=
"80"
height=
"80"
viewBox=
"0 0 250 250"
style=
"fill:#4AB7BD; color:#fff; position: absolute; top:
50
px; border: 0; right: 0;"
<svg
width=
"80"
height=
"80"
viewBox=
"0 0 250 250"
style=
"fill:#4AB7BD; color:#fff; position: absolute; top:
84
px; border: 0; right: 0;"
aria-hidden=
"true"
>
aria-hidden=
"true"
>
<path
d=
"M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"
></path>
<path
d=
"M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"
></path>
<path
d=
"M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
<path
d=
"M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
...
...
src/components/ScrollPane/index.vue
0 → 100644
View file @
d5683167
<
template
>
<div
class=
'scroll-container'
ref=
'scrollContainer'
@
mousewheel=
"handleScroll"
>
<div
class=
'scroll-wrapper'
ref=
'scrollWrapper'
:style=
"
{left: left + 'px'}">
<slot></slot>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
'scrollPane'
,
data
()
{
return
{
left
:
0
}
},
methods
:
{
handleScroll
(
e
)
{
e
.
preventDefault
()
const
$container
=
this
.
$refs
.
scrollContainer
const
$containerWidth
=
$container
.
offsetWidth
const
$wrapper
=
this
.
$refs
.
scrollWrapper
const
$wrapperWidth
=
$wrapper
.
offsetWidth
console
.
log
(
$containerWidth
,
$wrapperWidth
)
if
(
e
.
wheelDelta
>
0
)
{
this
.
left
=
Math
.
min
(
0
,
this
.
left
+
e
.
wheelDelta
)
}
else
{
if
(
$containerWidth
-
100
<
$wrapperWidth
)
{
if
(
this
.
left
<
-
(
$wrapperWidth
-
$containerWidth
+
100
))
{
this
.
left
=
this
.
left
}
else
{
this
.
left
=
Math
.
max
(
this
.
left
+
e
.
wheelDelta
,
$containerWidth
-
$wrapperWidth
-
100
)
}
}
else
{
this
.
left
=
0
}
}
}
}
}
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
.scroll-container
{
white-space
:
nowrap
;
position
:
relative
;
.scroll-wrapper
{
position
:
absolute
;
}
}
</
style
>
src/styles/index.scss
View file @
d5683167
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
@import
'./sidebar.scss'
;
@import
'./sidebar.scss'
;
body
{
body
{
height
:
100%
;
-moz-osx-font-smoothing
:
grayscale
;
-moz-osx-font-smoothing
:
grayscale
;
-webkit-font-smoothing
:
antialiased
;
-webkit-font-smoothing
:
antialiased
;
text-rendering
:
optimizeLegibility
;
text-rendering
:
optimizeLegibility
;
...
@@ -15,9 +16,14 @@ label {
...
@@ -15,9 +16,14 @@ label {
}
}
html
{
html
{
height
:
100%
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
#app
{
height
:
100%
;
}
*,
*,
*
:before
,
*
:before
,
*
:after
{
*
:after
{
...
...
src/views/dashboard/admin/index.vue
View file @
d5683167
...
@@ -12,10 +12,10 @@
...
@@ -12,10 +12,10 @@
<router-link
class=
"pan-btn pink-btn"
to=
"/excel/download"
>
Excel
</router-link>
<router-link
class=
"pan-btn pink-btn"
to=
"/excel/download"
>
Excel
</router-link>
</el-col>
</el-col>
<el-col
:span=
"4"
class=
'text-center'
>
<el-col
:span=
"4"
class=
'text-center'
>
<router-link
class=
"pan-btn green-btn"
to=
"/example/table/table"
>
Table
</router-link>
<router-link
class=
"pan-btn green-btn"
to=
"/example/table/
complex-
table"
>
Table
</router-link>
</el-col>
</el-col>
<el-col
:span=
"4"
class=
'text-center'
>
<el-col
:span=
"4"
class=
'text-center'
>
<router-link
class=
"pan-btn tiffany-btn"
to=
"/
example/form/edit
"
>
Form
</router-link>
<router-link
class=
"pan-btn tiffany-btn"
to=
"/
form/edit-form
"
>
Form
</router-link>
</el-col>
</el-col>
<el-col
:span=
"4"
class=
'text-center'
>
<el-col
:span=
"4"
class=
'text-center'
>
<router-link
class=
"pan-btn yellow-btn"
to=
"/theme/index"
>
Theme
</router-link>
<router-link
class=
"pan-btn yellow-btn"
to=
"/theme/index"
>
Theme
</router-link>
...
...
src/views/layout/components/TabsView.vue
View file @
d5683167
<
template
>
<
template
>
<div
class=
'tabs-view-container'
>
<scroll-pane
class=
'tabs-view-container'
>
<router-link
class=
"tabs-view-item"
:class=
"isActive(tag.path)?'active':''"
v-for=
"tag in Array.from(visitedViews)"
:to=
"tag.path"
:key=
"tag.path"
>
<router-link
class=
"tabs-view-item"
:class=
"isActive(tag.path)?'active':''"
v-for=
"tag in Array.from(visitedViews)"
:to=
"tag.path"
:key=
"tag.path"
>
{{
tag
.
name
}}
{{
tag
.
name
}}
<span
class=
'el-icon-close'
@
click=
'closeViewTabs(tag,$event)'
></span>
<span
class=
'el-icon-close'
@
click=
'closeViewTabs(tag,$event)'
></span>
</router-link>
</router-link>
</
div
>
</
scroll-pane
>
</
template
>
</
template
>
<
script
>
<
script
>
import
ScrollPane
from
'@/components/ScrollPane'
export
default
{
export
default
{
components
:
{
ScrollPane
},
computed
:
{
computed
:
{
visitedViews
()
{
visitedViews
()
{
return
this
.
$store
.
state
.
app
.
visitedViews
return
this
.
$store
.
state
.
app
.
visitedViews
...
@@ -44,6 +49,7 @@ export default {
...
@@ -44,6 +49,7 @@ export default {
isActive
(
path
)
{
isActive
(
path
)
{
return
path
===
this
.
$route
.
path
return
path
===
this
.
$route
.
path
}
}
},
},
watch
:
{
watch
:
{
$route
()
{
$route
()
{
...
@@ -57,25 +63,25 @@ export default {
...
@@ -57,25 +63,25 @@ export default {
.tabs-view-container
{
.tabs-view-container
{
background
:
#fff
;
background
:
#fff
;
height
:
34px
;
height
:
34px
;
line-height
:
34px
;
border-bottom
:
1px
solid
#d8dce5
;
border-bottom
:
1px
solid
#d8dce5
;
box-shadow
:
0
2px
4px
0
rgba
(
0
,
0
,
0
,
.12
)
,
0
0
6
px
0
rgba
(
0
,
0
,
0
,
.04
);
box-shadow
:
0
1px
3px
0
rgba
(
0
,
0
,
0
,
.12
)
,
0
0
3
px
0
rgba
(
0
,
0
,
0
,
.04
);
.tabs-view-item
{
.tabs-view-item
{
display
:
inline-block
;
display
:
inline-block
;
position
:
relative
;
position
:
relative
;
height
:
32
px
;
height
:
26
px
;
line-height
:
32
px
;
line-height
:
26
px
;
border
:
1px
solid
#d8dce5
;
border
:
1px
solid
#d8dce5
;
color
:
#495060
;
color
:
#495060
;
background
:
#fff
;
background
:
#fff
;
padding
:
0
12
px
;
padding
:
0
8
px
;
font-size
:
12px
;
font-size
:
12px
;
margin-left
:
10px
;
margin-left
:
5px
;
margin-top
:
4px
;
&
:first-of-type
{
&
:first-of-type
{
margin-left
:
0
px
;
margin-left
:
15
px
;
}
}
&
.active
{
&
.active
{
b
order-bottom
:
0px
;
b
ackground-color
:
#eef1f6
;
&
:
:
before
{
&
:
:
before
{
content
:
''
;
content
:
''
;
background
:
#20a0ff
;
background
:
#20a0ff
;
...
...
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