Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
VueElementTemplate
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄瑜
VueElementTemplate
Commits
0d47e345
Commit
0d47e345
authored
Jan 23, 2018
by
Pan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf[treeTable]
parent
3253a91a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
46 additions
and
29 deletions
+46
-29
README.md
README.md
+1
-0
README.zh-CN.md
README.zh-CN.md
+1
-0
index.vue
src/components/TreeTable/index.vue
+1
-1
readme.md
src/components/TreeTable/readme.md
+3
-3
zh.js
src/lang/zh.js
+1
-1
customTreeTable.vue
src/views/example/table/treeTable/customTreeTable.vue
+30
-23
treeTable.vue
src/views/example/table/treeTable/treeTable.vue
+9
-1
No files found.
README.md
View file @
0d47e345
...
@@ -78,6 +78,7 @@ You need to install [node](http://nodejs.org/) and [git](https://git-scm.com/) l
...
@@ -78,6 +78,7 @@ You need to install [node](http://nodejs.org/) and [git](https://git-scm.com/) l
- Export excel
- Export excel
- Export zip
- Export zip
- Front-end visualization excel
- Front-end visualization excel
- Tree Table
- Table example
- Table example
- Dynamictable example
- Dynamictable example
- Drag and drop table example
- Drag and drop table example
...
...
README.zh-CN.md
View file @
0d47e345
...
@@ -91,6 +91,7 @@
...
@@ -91,6 +91,7 @@
- 导出excel
- 导出excel
- 导出zip
- 导出zip
- 前端可视化excel
- 前端可视化excel
- 树形table
- Table example
- Table example
- 动态table example
- 动态table example
- 拖拽table example
- 拖拽table example
...
...
src/components/TreeTable/index.vue
View file @
0d47e345
<
template
>
<
template
>
<el-table
:data=
"formatData"
:row-style=
"showRow"
>
<el-table
:data=
"formatData"
:row-style=
"showRow"
v-bind=
"$attrs"
>
<el-table-column
v-if=
"columns.length===0"
width=
"150"
>
<el-table-column
v-if=
"columns.length===0"
width=
"150"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span
v-for=
"space in scope.row._level"
class=
"ms-tree-space"
:key=
"space"
></span>
<span
v-for=
"space in scope.row._level"
class=
"ms-tree-space"
:key=
"space"
></span>
...
...
src/components/TreeTable/readme.md
View file @
0d47e345
## 写在前面
## 写在前面
此组件仅提供一个创建TreeTable的解决方案
此组件仅提供一个创建TreeTable的解决方案
##prop说明
##
prop说明
###data
###
data
**必填**
**必填**
原始数据,要求是一个数组或者对象
原始数据,要求是一个数组或者对象
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
}
}
```
```
###columns
###
columns
列属性,要求是一个数组
列属性,要求是一个数组
1.
text: 显示在表头
1.
text: 显示在表头
...
...
src/lang/zh.js
View file @
0d47e345
...
@@ -28,7 +28,7 @@ export default {
...
@@ -28,7 +28,7 @@ export default {
dragTable
:
'拖拽table'
,
dragTable
:
'拖拽table'
,
inlineEditTable
:
'table内编辑'
,
inlineEditTable
:
'table内编辑'
,
complexTable
:
'综合table'
,
complexTable
:
'综合table'
,
treeTable
:
'树
表
'
,
treeTable
:
'树
形表格
'
,
customTreeTable
:
'自定义树表'
,
customTreeTable
:
'自定义树表'
,
tab
:
'Tab'
,
tab
:
'Tab'
,
form
:
'表单'
,
form
:
'表单'
,
...
...
src/views/example/table/treeTable/customTreeTable.vue
View file @
0d47e345
<
template
>
<
template
>
<tree-table
:data=
"data"
:evalFunc=
"func"
:evalArgs=
"args"
>
<div
class=
"app-container"
>
<el-table-column
label=
"事件"
>
<template
slot-scope=
"scope"
>
<el-tag
style=
"margin-bottom:20px;"
>
<span
style=
"color:sandybrown"
>
{{
scope
.
row
.
event
}}
</span>
<a
href=
"https://github.com/PanJiaChen/vue-element-admin/tree/master/src/components/TreeTable"
target=
"_blank"
>
Documentation
</a>
<el-tag>
{{
scope
.
row
.
timeLine
+
'ms'
}}
</el-tag>
</el-tag>
</
template
>
</el-table-column>
<tree-table
:data=
"data"
:evalFunc=
"func"
:evalArgs=
"args"
border
>
<el-table-column
label=
"时间线"
>
<el-table-column
label=
"事件"
>
<
template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-tooltip
effect=
"dark"
:content=
"scope.row.timeLine+'ms'"
placement=
"left"
>
<span
style=
"color:sandybrown"
>
{{
scope
.
row
.
event
}}
</span>
<div
class=
"processContainer"
>
<el-tag>
{{
scope
.
row
.
timeLine
+
'ms'
}}
</el-tag>
<div
class=
"process"
:style=
"
{ width:scope.row._width * 500+'px',
</
template
>
</el-table-column>
<el-table-column
label=
"时间线"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
effect=
"dark"
:content=
"scope.row.timeLine+'ms'"
placement=
"left"
>
<div
class=
"processContainer"
>
<div
class=
"process"
:style=
"
{ width:scope.row._width * 500+'px',
background:scope.row._width>0.5?'rgba(233,0,0,.5)':'rgba(0,0,233,0.5)',
background:scope.row._width>0.5?'rgba(233,0,0,.5)':'rgba(0,0,233,0.5)',
marginLeft:scope.row._marginLeft * 500+'px' }">
marginLeft:scope.row._marginLeft * 500+'px' }">
<span
style=
"display:inline-block"
></span>
<span
style=
"display:inline-block"
></span>
</div>
</div>
</div>
</
div
>
</
el-tooltip
>
</
el-tooltip
>
</
template
>
</
template
>
</
el-table-column
>
</el-table-column
>
<el-table-column
label=
"操作"
width=
"200"
>
<el-table-column
label=
"操作"
width=
"200
"
>
<
template
slot-scope=
"scope
"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"message(scope.row)"
>
点击
</el-button
>
<
el-button
type=
"text"
@
click=
"message(scope.row)"
>
点击
</el-button
>
<
/
template
>
</
template
>
</
el-table-column
>
</
el-table-column
>
</
tree-table
>
</
tree-table
>
</
div
>
</template>
</template>
<
script
>
<
script
>
...
...
src/views/example/table/treeTable/treeTable.vue
View file @
0d47e345
<
template
>
<
template
>
<tree-table
:data=
"data"
:columns=
"columns"
></tree-table>
<div
class=
"app-container"
>
<el-tag
style=
"margin-bottom:20px;"
>
<a
href=
"https://github.com/PanJiaChen/vue-element-admin/tree/master/src/components/TreeTable"
target=
"_blank"
>
Documentation
</a>
</el-tag>
<tree-table
:data=
"data"
:columns=
"columns"
border
></tree-table>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
...
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