Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
绝世唐门三哥
Vue Manage System
提交
c6a5a644
Vue Manage System
项目概览
绝世唐门三哥
/
Vue Manage System
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Vue Manage System
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c6a5a644
编写于
6月 01, 2018
作者:
L
lin-xin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
'关闭标签后销毁组件'
上级
36725219
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
29 addition
and
7 deletion
+29
-7
src/components/common/Home.vue
src/components/common/Home.vue
+12
-2
src/components/common/Tags.vue
src/components/common/Tags.vue
+8
-5
src/components/page/BaseCharts.vue
src/components/page/BaseCharts.vue
+1
-0
src/components/page/BaseForm.vue
src/components/page/BaseForm.vue
+1
-0
src/components/page/BaseTable.vue
src/components/page/BaseTable.vue
+1
-0
src/components/page/Dashboard.vue
src/components/page/Dashboard.vue
+1
-0
src/components/page/DragList.vue
src/components/page/DragList.vue
+1
-0
src/components/page/Markdown.vue
src/components/page/Markdown.vue
+1
-0
src/components/page/Tabs.vue
src/components/page/Tabs.vue
+1
-0
src/components/page/Upload.vue
src/components/page/Upload.vue
+1
-0
src/components/page/VueEditor.vue
src/components/page/VueEditor.vue
+1
-0
未找到文件。
src/components/common/Home.vue
浏览文件 @
c6a5a644
...
...
@@ -6,7 +6,7 @@
<v-tags></v-tags>
<div
class=
"content"
>
<transition
name=
"move"
mode=
"out-in"
>
<keep-alive>
<keep-alive
:include=
"tagsList"
>
<router-view></router-view>
</keep-alive>
</transition>
...
...
@@ -19,10 +19,11 @@
import
vHead
from
'
./Header.vue
'
;
import
vSidebar
from
'
./Sidebar.vue
'
;
import
vTags
from
'
./Tags.vue
'
;
import
bus
from
'
.
./common
/bus
'
;
import
bus
from
'
./bus
'
;
export
default
{
data
(){
return
{
tagsList
:
[],
collapse
:
false
}
},
...
...
@@ -33,6 +34,15 @@
bus
.
$on
(
'
collapse
'
,
msg
=>
{
this
.
collapse
=
msg
;
})
// 只有在标签页列表里的页面才使用keep-alive,即关闭标签之后就不保存到内存中了。
bus
.
$on
(
'
tags
'
,
msg
=>
{
let
arr
=
[];
for
(
let
i
=
0
,
len
=
msg
.
length
;
i
<
len
;
i
++
){
msg
[
i
].
name
&&
arr
.
push
(
msg
[
i
].
name
);
}
this
.
tagsList
=
arr
;
})
}
}
</
script
>
src/components/common/Tags.vue
浏览文件 @
c6a5a644
...
...
@@ -23,6 +23,7 @@
</
template
>
<
script
>
import
bus
from
'
./bus
'
;
export
default
{
data
()
{
return
{
...
...
@@ -31,14 +32,14 @@
},
methods
:
{
isActive
(
path
)
{
return
path
===
this
.
$route
.
p
ath
;
return
path
===
this
.
$route
.
fullP
ath
;
},
// 关闭单个标签
closeTags
(
index
)
{
const
delItem
=
this
.
tagsList
.
splice
(
index
,
1
)[
0
];
const
item
=
this
.
tagsList
[
index
]
?
this
.
tagsList
[
index
]
:
this
.
tagsList
[
index
-
1
];
if
(
item
)
{
delItem
.
path
===
this
.
$route
.
p
ath
&&
this
.
$router
.
push
(
item
.
path
);
delItem
.
path
===
this
.
$route
.
fullP
ath
&&
this
.
$router
.
push
(
item
.
path
);
}
else
{
this
.
$router
.
push
(
'
/
'
);
}
...
...
@@ -51,19 +52,21 @@
// 关闭其他标签
closeOther
(){
const
curItem
=
this
.
tagsList
.
filter
(
item
=>
{
return
item
.
path
===
this
.
$route
.
p
ath
;
return
item
.
path
===
this
.
$route
.
fullP
ath
;
})
this
.
tagsList
=
curItem
;
},
// 设置标签
setTags
(
route
){
const
isExist
=
this
.
tagsList
.
some
(
item
=>
{
return
item
.
path
===
route
.
p
ath
;
return
item
.
path
===
route
.
fullP
ath
;
})
!
isExist
&&
this
.
tagsList
.
push
({
title
:
route
.
meta
.
title
,
path
:
route
.
path
path
:
route
.
fullPath
,
name
:
route
.
matched
[
1
].
components
.
default
.
name
})
bus
.
$emit
(
'
tags
'
,
this
.
tagsList
);
},
handleTags
(
command
){
command
===
'
other
'
?
this
.
closeOther
()
:
this
.
closeAll
();
...
...
src/components/page/BaseCharts.vue
浏览文件 @
c6a5a644
...
...
@@ -34,6 +34,7 @@
<
script
>
import
Schart
from
'
vue-schart
'
;
export
default
{
name
:
'
basecharts
'
,
components
:
{
Schart
},
...
...
src/components/page/BaseForm.vue
浏览文件 @
c6a5a644
...
...
@@ -64,6 +64,7 @@
<
script
>
export
default
{
name
:
'
baseform
'
,
data
:
function
(){
return
{
options
:[
...
...
src/components/page/BaseTable.vue
浏览文件 @
c6a5a644
...
...
@@ -69,6 +69,7 @@
<
script
>
export
default
{
name
:
'
basetable
'
,
data
()
{
return
{
url
:
'
./static/vuetable.json
'
,
...
...
src/components/page/Dashboard.vue
浏览文件 @
c6a5a644
...
...
@@ -99,6 +99,7 @@
<
script
>
export
default
{
name
:
'
dashboard
'
,
data
()
{
return
{
name
:
localStorage
.
getItem
(
'
ms_username
'
),
...
...
src/components/page/DragList.vue
浏览文件 @
c6a5a644
...
...
@@ -49,6 +49,7 @@
<
script
>
import
draggable
from
'
vuedraggable
'
export
default
{
name
:
'
draglist
'
,
data
()
{
return
{
dragOptions
:{
...
...
src/components/page/Markdown.vue
浏览文件 @
c6a5a644
...
...
@@ -21,6 +21,7 @@
import
{
mavonEditor
}
from
'
mavon-editor
'
import
'
mavon-editor/dist/css/index.css
'
export
default
{
name
:
'
markdown
'
,
data
:
function
(){
return
{
content
:
''
,
...
...
src/components/page/Tabs.vue
浏览文件 @
c6a5a644
...
...
@@ -72,6 +72,7 @@
<
script
>
export
default
{
name
:
'
tabs
'
,
data
()
{
return
{
message
:
'
first
'
,
...
...
src/components/page/Upload.vue
浏览文件 @
c6a5a644
...
...
@@ -47,6 +47,7 @@
<
script
>
import
VueCropper
from
'
vue-cropperjs
'
;
export
default
{
name
:
'
upload
'
,
data
:
function
(){
return
{
defaultSrc
:
'
./static/img/img.jpg
'
,
...
...
src/components/page/VueEditor.vue
浏览文件 @
c6a5a644
...
...
@@ -23,6 +23,7 @@
import
'
quill/dist/quill.bubble.css
'
;
import
{
quillEditor
}
from
'
vue-quill-editor
'
;
export
default
{
name
:
'
editor
'
,
data
:
function
(){
return
{
content
:
''
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录