Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
admin-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pleroma
admin-fe
Commits
3cb1e321
Commit
3cb1e321
authored
7 years ago
by
Pan
Browse files
Options
Downloads
Patches
Plain Diff
refactor:change tabs-view to tags-view
parent
f2fcdee8
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/views/layout/Layout.vue
+3
-3
3 additions, 3 deletions
src/views/layout/Layout.vue
src/views/layout/components/TagsView.vue
+11
-11
11 additions, 11 deletions
src/views/layout/components/TagsView.vue
src/views/layout/components/index.js
+1
-1
1 addition, 1 deletion
src/views/layout/components/index.js
with
15 additions
and
15 deletions
src/views/layout/Layout.vue
+
3
−
3
View file @
3cb1e321
...
@@ -3,14 +3,14 @@
...
@@ -3,14 +3,14 @@
<sidebar
class=
"sidebar-container"
></sidebar>
<sidebar
class=
"sidebar-container"
></sidebar>
<div
class=
"main-container"
>
<div
class=
"main-container"
>
<navbar></navbar>
<navbar></navbar>
<ta
b
s-view></ta
b
s-view>
<ta
g
s-view></ta
g
s-view>
<app-main></app-main>
<app-main></app-main>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
Navbar
,
Sidebar
,
AppMain
,
Ta
b
sView
}
from
'
views/layout/components
'
import
{
Navbar
,
Sidebar
,
AppMain
,
Ta
g
sView
}
from
'
views/layout/components
'
export
default
{
export
default
{
name
:
'
layout
'
,
name
:
'
layout
'
,
...
@@ -18,7 +18,7 @@ export default {
...
@@ -18,7 +18,7 @@ export default {
Navbar
,
Navbar
,
Sidebar
,
Sidebar
,
AppMain
,
AppMain
,
Ta
b
sView
Ta
g
sView
},
},
computed
:
{
computed
:
{
sidebar
()
{
sidebar
()
{
...
...
This diff is collapsed.
Click to expand it.
src/views/layout/components/Ta
b
sView.vue
→
src/views/layout/components/Ta
g
sView.vue
+
11
−
11
View file @
3cb1e321
<
template
>
<
template
>
<scroll-pane
class=
'ta
b
s-view-container'
>
<scroll-pane
class=
'ta
g
s-view-container'
>
<router-link
class=
"ta
b
s-view-item"
:class=
"isActive(tag)?'active':''"
v-for=
"tag in Array.from(visitedViews)"
:to=
"tag.path"
:key=
"tag.path"
>
<router-link
class=
"ta
g
s-view-item"
:class=
"isActive(tag)?'active':''"
v-for=
"tag in Array.from(visitedViews)"
:to=
"tag.path"
:key=
"tag.path"
>
{{
$t
(
'
route.
'
+
tag
.
title
)
}}
{{
$t
(
'
route.
'
+
tag
.
title
)
}}
<span
class=
'el-icon-close'
@
click=
'closeViewTa
b
s(tag,$event)'
></span>
<span
class=
'el-icon-close'
@
click=
'closeViewTa
g
s(tag,$event)'
></span>
</router-link>
</router-link>
</scroll-pane>
</scroll-pane>
</
template
>
</
template
>
...
@@ -18,10 +18,10 @@ export default {
...
@@ -18,10 +18,10 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
addViewTa
b
s
()
this
.
addViewTa
g
s
()
},
},
methods
:
{
methods
:
{
closeViewTa
b
s
(
view
,
$event
)
{
closeViewTa
g
s
(
view
,
$event
)
{
this
.
$store
.
dispatch
(
'
delVisitedViews
'
,
view
).
then
((
views
)
=>
{
this
.
$store
.
dispatch
(
'
delVisitedViews
'
,
view
).
then
((
views
)
=>
{
if
(
this
.
isActive
(
view
.
path
))
{
if
(
this
.
isActive
(
view
.
path
))
{
const
latestView
=
views
.
slice
(
-
1
)[
0
]
const
latestView
=
views
.
slice
(
-
1
)[
0
]
...
@@ -40,7 +40,7 @@ export default {
...
@@ -40,7 +40,7 @@ export default {
}
}
return
false
return
false
},
},
addViewTa
b
s
()
{
addViewTa
g
s
()
{
const
route
=
this
.
generateRoute
()
const
route
=
this
.
generateRoute
()
if
(
!
route
)
{
if
(
!
route
)
{
return
false
return
false
...
@@ -54,19 +54,19 @@ export default {
...
@@ -54,19 +54,19 @@ export default {
},
},
watch
:
{
watch
:
{
$route
()
{
$route
()
{
this
.
addViewTa
b
s
()
this
.
addViewTa
g
s
()
}
}
}
}
}
}
</
script
>
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
.ta
b
s-view-container
{
.ta
g
s-view-container
{
background
:
#fff
;
background
:
#fff
;
height
:
34px
;
height
:
34px
;
border-bottom
:
1px
solid
#d8dce5
;
border-bottom
:
1px
solid
#d8dce5
;
box-shadow
:
0
1px
3px
0
rgba
(
0
,
0
,
0
,
.12
)
,
0
0
3px
0
rgba
(
0
,
0
,
0
,
.04
);
box-shadow
:
0
1px
3px
0
rgba
(
0
,
0
,
0
,
.12
)
,
0
0
3px
0
rgba
(
0
,
0
,
0
,
.04
);
.ta
b
s-view-item
{
.ta
g
s-view-item
{
display
:
inline-block
;
display
:
inline-block
;
position
:
relative
;
position
:
relative
;
height
:
26px
;
height
:
26px
;
...
@@ -105,8 +105,8 @@ export default {
...
@@ -105,8 +105,8 @@ export default {
</
style
>
</
style
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
>
.ta
b
s-view-container
{
.ta
g
s-view-container
{
.ta
b
s-view-item
{
.ta
g
s-view-item
{
.el-icon-close
{
.el-icon-close
{
width
:
16px
;
width
:
16px
;
height
:
16px
;
height
:
16px
;
...
...
This diff is collapsed.
Click to expand it.
src/views/layout/components/index.js
+
1
−
1
View file @
3cb1e321
export
{
default
as
Navbar
}
from
'
./Navbar
'
export
{
default
as
Navbar
}
from
'
./Navbar
'
export
{
default
as
Sidebar
}
from
'
./Sidebar/index.vue
'
export
{
default
as
Sidebar
}
from
'
./Sidebar/index.vue
'
export
{
default
as
Ta
b
sView
}
from
'
./Ta
b
sView
'
export
{
default
as
Ta
g
sView
}
from
'
./Ta
g
sView
'
export
{
default
as
AppMain
}
from
'
./AppMain
'
export
{
default
as
AppMain
}
from
'
./AppMain
'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment