Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
Support
提交反馈
为 GitLab 提交贡献
登录
切换导航
兵
兵役_吉林工业
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
麦嘉得
兵役_吉林工业
提交
37b6253e
提交
37b6253e
编写于
11月 24, 2017
作者:
Pan
提交者:
花裤衩
11月 29, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:add tree demo
上级
86867377
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
94 行增加
和
15 行删除
+94
-15
index.vue
src/components/Breadcrumb/index.vue
+1
-1
tree.svg
src/icons/svg/tree.svg
+1
-0
index.js
src/router/index.js
+21
-14
index.vue
src/views/form/index.vue
+0
-0
index.vue
src/views/tree/index.vue
+71
-0
未找到文件。
src/components/Breadcrumb/index.vue
浏览文件 @
37b6253e
...
...
@@ -24,7 +24,7 @@ export default {
let
matched
=
this
.
$route
.
matched
.
filter
(
item
=>
item
.
name
)
const
first
=
matched
[
0
]
if
(
first
&&
first
.
name
!==
'
dashboard
'
)
{
matched
=
[{
path
:
'
/dashboard
'
,
meta
:
{
title
:
'
d
ashboard
'
}}].
concat
(
matched
)
matched
=
[{
path
:
'
/dashboard
'
,
meta
:
{
title
:
'
D
ashboard
'
}}].
concat
(
matched
)
}
this
.
levelList
=
matched
}
...
...
src/icons/svg/tree.svg
0 → 100644
浏览文件 @
37b6253e
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
t=
"1511512690058"
class=
"icon"
style=
""
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"3507"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"64"
height=
"64"
><defs><style
type=
"text/css"
></style></defs><path
d=
"M1013.703 693.345c6.865 6.865 10.297 14.874 10.297 24.027l0 205.944c0 9.916-3.432 18.115-10.297 24.599-6.865 6.483-15.255 9.725-25.171 9.725L782.588 957.64c-9.153 0-17.162-3.242-24.027-9.725-6.865-6.483-10.297-14.683-10.297-24.599L748.264 717.372c0-6.102 1.526-11.823 4.577-17.162s7.246-9.534 12.586-12.586 11.06-4.577 17.162-4.577l77.801 0L860.39 546.896c0-4.577-1.144-8.772-3.432-12.586s-5.339-6.865-9.153-9.153-8.009-3.432-12.585-3.432L543.464 521.725l0 161.323 77.801 0c9.153 0 17.162 3.432 24.027 10.297s10.297 14.874 10.297 24.027l0 205.944c0 6.102-1.526 11.823-4.577 17.162s-7.246 9.534-12.585 12.585-11.06 4.577-17.162 4.577L415.321 957.64c-6.102 0-11.823-1.526-17.162-4.577s-9.725-7.246-13.158-12.585-5.149-11.06-5.149-17.162L379.852 717.372c0-9.153 3.432-17.162 10.297-24.027s15.255-10.297 25.171-10.297l76.657 0L491.977 521.725 188.782 521.725c-7.628 0-13.92 2.479-18.878 7.437-4.958 4.958-7.437 10.869-7.437 17.734l0 136.152 77.801 0c9.916 0 18.115 3.432 24.599 10.297s9.725 14.874 9.725 24.027l0 205.944c0 9.916-3.242 18.115-9.725 24.599-6.483 6.483-14.683 9.725-24.599 9.725L34.324 957.64c-3.814 0-7.437-0.572-10.869-1.716-3.432-1.144-6.483-2.67-9.153-4.577-2.67-1.907-5.149-4.386-7.437-7.437-2.288-3.051-4.004-6.293-5.149-9.725C0.572 930.753 0 927.13 0 923.316L0 717.372c0-3.051 0.381-6.102 1.144-9.153s1.907-5.721 3.432-8.009 3.432-4.577 5.721-6.865 4.577-4.195 6.865-5.721 4.958-2.67 8.009-3.432 6.102-1.144 9.153-1.144l77.801 0L112.125 495.41c0-6.865 2.479-12.776 7.437-17.734s10.869-7.437 17.734-7.437l354.682 0L491.978 342.096l-76.657 0c-9.916 0-18.306-3.432-25.171-10.297s-10.297-14.874-10.297-24.027L379.853 101.828c0-9.916 3.432-18.306 10.297-25.171s15.255-10.297 25.171-10.297l205.944 0c6.102 0 11.823 1.716 17.162 5.149 5.339 3.432 9.534 7.818 12.585 13.158 3.051 5.339 4.577 11.06 4.577 17.162l0 205.944c0 9.153-3.432 17.162-10.297 24.027s-14.874 10.297-24.027 10.297l-77.801 0 0 128.143L885.56 470.24c7.628 0 13.92 2.479 18.878 7.437s7.437 10.869 7.437 17.734l0 187.638 76.657 0C998.448 683.048 1006.838 686.48 1013.703 693.345z"
p-id=
"3508"
></path></svg>
\ No newline at end of file
src/router/index.js
浏览文件 @
37b6253e
...
...
@@ -21,6 +21,7 @@ import Layout from '../views/layout/Layout'
export
const
constantRouterMap
=
[
{
path
:
'
/login
'
,
component
:
_import
(
'
login/index
'
),
hidden
:
true
},
{
path
:
'
/404
'
,
component
:
_import
(
'
404
'
),
hidden
:
true
},
{
path
:
'
/
'
,
component
:
Layout
,
...
...
@@ -29,36 +30,42 @@ export const constantRouterMap = [
hidden
:
true
,
children
:
[{
path
:
'
dashboard
'
,
component
:
_import
(
'
dashboard/index
'
),
meta
:
{
title
:
'
dashboard
'
,
icon
:
'
dashboard
'
}
component
:
_import
(
'
dashboard/index
'
)
}]
},
{
path
:
'
/example
'
,
component
:
Layout
,
redirect
:
'
noredirect
'
,
redirect
:
'
/example/table
'
,
name
:
'
Example
'
,
meta
:
{
title
:
'
Example
'
,
icon
:
'
example
'
},
children
:
[
{
path
:
'
index
'
,
name
:
'
Form
'
,
component
:
_import
(
'
page/form
'
),
meta
:
{
title
:
'
Form
'
,
icon
:
'
form
'
}
path
:
'
table
'
,
name
:
'
Table
'
,
component
:
_import
(
'
table/index
'
),
meta
:
{
title
:
'
Table
'
,
icon
:
'
table
'
}
},
{
path
:
'
tree
'
,
name
:
'
Tree
'
,
component
:
_import
(
'
tree/index
'
),
meta
:
{
title
:
'
Tree
'
,
icon
:
'
tree
'
}
}
]
},
{
path
:
'
/
table
'
,
path
:
'
/
form
'
,
component
:
Layout
,
redirect
:
'
/table/index
'
,
children
:
[{
path
:
'
index
'
,
name
:
'
Table
'
,
component
:
_import
(
'
table/index
'
),
meta
:
{
title
:
'
Table
'
,
icon
:
'
table
'
}}
children
:
[
{
path
:
'
index
'
,
name
:
'
Form
'
,
component
:
_import
(
'
form/index
'
),
meta
:
{
title
:
'
Form
'
,
icon
:
'
form
'
}
}
]
},
...
...
src/views/
page/form
.vue
→
src/views/
form/index
.vue
浏览文件 @
37b6253e
文件已移动
src/views/tree/index.vue
0 → 100644
浏览文件 @
37b6253e
<
template
>
<div
class=
"app-container"
>
<el-input
placeholder=
"Filter keyword"
v-model=
"filterText"
style=
"margin-bottom:30px;"
></el-input>
<el-tree
class=
"filter-tree"
:data=
"data2"
:props=
"defaultProps"
default-expand-all
:filter-node-method=
"filterNode"
ref=
"tree2"
></el-tree>
</div>
</
template
>
<
script
>
export
default
{
watch
:
{
filterText
(
val
)
{
this
.
$refs
.
tree2
.
filter
(
val
)
}
},
methods
:
{
filterNode
(
value
,
data
)
{
if
(
!
value
)
return
true
return
data
.
label
.
indexOf
(
value
)
!==
-
1
}
},
data
()
{
return
{
filterText
:
''
,
data2
:
[{
id
:
1
,
label
:
'
Level one 1
'
,
children
:
[{
id
:
4
,
label
:
'
Level two 1-1
'
,
children
:
[{
id
:
9
,
label
:
'
Level three 1-1-1
'
},
{
id
:
10
,
label
:
'
Level three 1-1-2
'
}]
}]
},
{
id
:
2
,
label
:
'
Level one 2
'
,
children
:
[{
id
:
5
,
label
:
'
Level two 2-1
'
},
{
id
:
6
,
label
:
'
Level two 2-2
'
}]
},
{
id
:
3
,
label
:
'
Level one 3
'
,
children
:
[{
id
:
7
,
label
:
'
Level two 3-1
'
},
{
id
:
8
,
label
:
'
Level two 3-2
'
}]
}],
defaultProps
:
{
children
:
'
children
'
,
label
:
'
label
'
}
}
}
}
</
script
>
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录