Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dyingstraw
vue-element-admin
提交
3cb1e321
V
vue-element-admin
项目概览
dyingstraw
/
vue-element-admin
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue-element-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3cb1e321
编写于
11月 22, 2017
作者:
P
Pan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor:change tabs-view to tags-view
上级
f2fcdee8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
15 deletion
+15
-15
src/views/layout/Layout.vue
src/views/layout/Layout.vue
+3
-3
src/views/layout/components/TagsView.vue
src/views/layout/components/TagsView.vue
+11
-11
src/views/layout/components/index.js
src/views/layout/components/index.js
+1
-1
未找到文件。
src/views/layout/Layout.vue
浏览文件 @
3cb1e321
...
...
@@ -3,14 +3,14 @@
<sidebar
class=
"sidebar-container"
></sidebar>
<div
class=
"main-container"
>
<navbar></navbar>
<ta
bs-view></tab
s-view>
<ta
gs-view></tag
s-view>
<app-main></app-main>
</div>
</div>
</
template
>
<
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
{
name
:
'
layout
'
,
...
...
@@ -18,7 +18,7 @@ export default {
Navbar
,
Sidebar
,
AppMain
,
Ta
b
sView
Ta
g
sView
},
computed
:
{
sidebar
()
{
...
...
src/views/layout/components/Ta
b
sView.vue
→
src/views/layout/components/Ta
g
sView.vue
浏览文件 @
3cb1e321
<
template
>
<scroll-pane
class=
'ta
b
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"
>
<scroll-pane
class=
'ta
g
s-view-container'
>
<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
)
}}
<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>
</scroll-pane>
</
template
>
...
...
@@ -18,10 +18,10 @@ export default {
}
},
mounted
()
{
this
.
addViewTa
b
s
()
this
.
addViewTa
g
s
()
},
methods
:
{
closeViewTa
b
s
(
view
,
$event
)
{
closeViewTa
g
s
(
view
,
$event
)
{
this
.
$store
.
dispatch
(
'
delVisitedViews
'
,
view
).
then
((
views
)
=>
{
if
(
this
.
isActive
(
view
.
path
))
{
const
latestView
=
views
.
slice
(
-
1
)[
0
]
...
...
@@ -40,7 +40,7 @@ export default {
}
return
false
},
addViewTa
b
s
()
{
addViewTa
g
s
()
{
const
route
=
this
.
generateRoute
()
if
(
!
route
)
{
return
false
...
...
@@ -54,19 +54,19 @@ export default {
},
watch
:
{
$route
()
{
this
.
addViewTa
b
s
()
this
.
addViewTa
g
s
()
}
}
}
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
.ta
b
s-view-container
{
.ta
g
s-view-container
{
background
:
#fff
;
height
:
34px
;
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
);
.ta
b
s-view-item
{
.ta
g
s-view-item
{
display
:
inline-block
;
position
:
relative
;
height
:
26px
;
...
...
@@ -105,8 +105,8 @@ export default {
</
style
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
>
.ta
b
s-view-container
{
.ta
b
s-view-item
{
.ta
g
s-view-container
{
.ta
g
s-view-item
{
.el-icon-close
{
width
:
16px
;
height
:
16px
;
...
...
src/views/layout/components/index.js
浏览文件 @
3cb1e321
export
{
default
as
Navbar
}
from
'
./Navbar
'
export
{
default
as
Sidebar
}
from
'
./Sidebar/index.vue
'
export
{
default
as
Ta
bsView
}
from
'
./Tab
sView
'
export
{
default
as
Ta
gsView
}
from
'
./Tag
sView
'
export
{
default
as
AppMain
}
from
'
./AppMain
'
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录