Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
admin-yweb
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yfront
admin-yweb
Commits
e2152f75
Commit
e2152f75
authored
Aug 29, 2018
by
gyy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tag修改
parent
d7ed5cba
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
2 deletions
+32
-2
layouts/default.vue
+32
-2
No files found.
layouts/default.vue
View file @
e2152f75
...
...
@@ -31,12 +31,18 @@
<!-- 侧边栏结束 -->
<div
class=
"main_right"
>
<div
class=
"crumbs"
>
<div
class=
"y_flex_start"
>
<div
class=
"y_flex_start"
>
<div
@
click=
"toleft"
><
</
div
>
<div
style=
"width: 100%; overflow: hidden;"
>
<div
class=
"y_flex_start crumbs_text"
>
<div
class=
"crumbs_list"
v-for=
"(item, index) in Array.from(visitedViews)"
:class=
"isActive(item)?'crumbs_active':''"
@
contextmenu
.
prevent=
"openMenu(item,$event)"
>
<router-link
:to=
"item.path"
>
{{item.name}}
</router-link>
<span
class=
"crumbs_close"
@
click=
"closeSelectedTag(item)"
>
×
</span>
</div>
</div>
</div>
<div
@
click=
"toright"
>
>
</div>
</div>
<ul
v-show=
"visible"
:style=
"{left:left+'px'}"
class=
"contextmenu"
>
<li>
刷新
</li>
<li
@
click=
"closeSelectedTag(selectedTag)"
>
关闭
</li>
...
...
@@ -72,7 +78,9 @@ export default {
left
:
0
,
selectedTag
:
{},
leftMenuList
:
[],
isRoute
:
true
isRoute
:
true
,
moveLength
:
130
,
moveNum
:
0
}
},
computed
:
{
...
...
@@ -186,6 +194,8 @@ export default {
this
.
selectedTag
=
tag
let
clientWidth
=
document
.
documentElement
.
clientWidth
*
0.1
this
.
left
=
e
.
clientX
-
clientWidth
+
40
// 15: margin right
console
.
log
(
e
.
clientX
)
console
.
log
(
clientWidth
)
},
// 关闭其他
closeOthersTags
()
{
...
...
@@ -280,6 +290,18 @@ export default {
// clientHeight = (document.body.clientHeight > document.documentElement.clientHeight) ? document.body.clientHeight : document.documentElement.clientHeight
// }
this
.
clientHeight
=
document
.
documentElement
.
clientHeight
-
76
},
toleft
()
{
if
(
this
.
moveNum
!==
0
)
{
this
.
moveNum
++
let
root
=
document
.
getElementsByClassName
(
'crumbs_text'
)[
0
]
root
.
style
.
cssText
=
'transform: translateX('
+
this
.
moveLength
*
this
.
moveNum
+
'px);'
}
},
toright
()
{
this
.
moveNum
--
let
root
=
document
.
getElementsByClassName
(
'crumbs_text'
)[
0
]
root
.
style
.
cssText
=
'transform: translateX('
+
this
.
moveLength
*
this
.
moveNum
+
'px);'
}
},
mounted
()
{
...
...
@@ -389,6 +411,9 @@ export default {
padding
:
5px
23px
;
box-sizing
:
border-box
;
}
.crumbs_text
{
transition
:
all
.2s
;
}
.crumbs_list
{
background
:
#FFFFFF
;
border
:
1px
solid
#d8dce5
;
...
...
@@ -398,6 +423,10 @@ export default {
line-height
:
21px
;
padding
:
0
8px
;
margin-right
:
15px
;
width
:
130px
;
}
.crumbs_list
a
{
white-space
:
nowrap
;
}
.crumbs_active
{
border
:
1px
solid
#DBE1EC
;
...
...
@@ -408,6 +437,7 @@ export default {
}
.crumbs_close
{
margin-left
:
10px
;
cursor
:
pointer
;
}
.crumbs_active
.crumbs_close
{
color
:
#FFFFFF
;
...
...
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