Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gyf5267218
vue-element-admin
提交
0d47e345
V
vue-element-admin
项目概览
gyf5267218
/
vue-element-admin
与 Fork 源项目一致
从无法访问的项目Fork
通知
4
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,发现更多精彩内容 >>
提交
0d47e345
编写于
1月 23, 2018
作者:
P
Pan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
perf[treeTable]
上级
3253a91a
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
46 addition
and
29 deletion
+46
-29
README.md
README.md
+1
-0
README.zh-CN.md
README.zh-CN.md
+1
-0
src/components/TreeTable/index.vue
src/components/TreeTable/index.vue
+1
-1
src/components/TreeTable/readme.md
src/components/TreeTable/readme.md
+3
-3
src/lang/zh.js
src/lang/zh.js
+1
-1
src/views/example/table/treeTable/customTreeTable.vue
src/views/example/table/treeTable/customTreeTable.vue
+30
-23
src/views/example/table/treeTable/treeTable.vue
src/views/example/table/treeTable/treeTable.vue
+9
-1
未找到文件。
README.md
浏览文件 @
0d47e345
...
...
@@ -78,6 +78,7 @@ You need to install [node](http://nodejs.org/) and [git](https://git-scm.com/) l
- Export excel
- Export zip
- Front-end visualization excel
- Tree Table
- Table example
- Dynamictable example
- Drag and drop table example
...
...
README.zh-CN.md
浏览文件 @
0d47e345
...
...
@@ -91,6 +91,7 @@
- 导出excel
- 导出zip
- 前端可视化excel
- 树形table
- Table example
- 动态table example
- 拖拽table example
...
...
src/components/TreeTable/index.vue
浏览文件 @
0d47e345
<
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"
>
<template
slot-scope=
"scope"
>
<span
v-for=
"space in scope.row._level"
class=
"ms-tree-space"
:key=
"space"
></span>
...
...
src/components/TreeTable/readme.md
浏览文件 @
0d47e345
## 写在前面
此组件仅提供一个创建TreeTable的解决方案
##prop说明
###data
##
prop说明
###
data
**必填**
原始数据,要求是一个数组或者对象
...
...
@@ -35,7 +35,7 @@
}
```
###columns
###
columns
列属性,要求是一个数组
1.
text: 显示在表头
...
...
src/lang/zh.js
浏览文件 @
0d47e345
...
...
@@ -28,7 +28,7 @@ export default {
dragTable
:
'
拖拽table
'
,
inlineEditTable
:
'
table内编辑
'
,
complexTable
:
'
综合table
'
,
treeTable
:
'
树
表
'
,
treeTable
:
'
树
形表格
'
,
customTreeTable
:
'
自定义树表
'
,
tab
:
'
Tab
'
,
form
:
'
表单
'
,
...
...
src/views/example/table/treeTable/customTreeTable.vue
浏览文件 @
0d47e345
<
template
>
<tree-table
:data=
"data"
:evalFunc=
"func"
:evalArgs=
"args"
>
<el-table-column
label=
"事件"
>
<template
slot-scope=
"scope"
>
<span
style=
"color:sandybrown"
>
{{
scope
.
row
.
event
}}
</span>
<el-tag>
{{
scope
.
row
.
timeLine
+
'
ms
'
}}
</el-tag>
</
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',
<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"
:evalFunc=
"func"
:evalArgs=
"args"
border
>
<el-table-column
label=
"事件"
>
<template
slot-scope=
"scope"
>
<span
style=
"color:sandybrown"
>
{{
scope
.
row
.
event
}}
</span>
<el-tag>
{{
scope
.
row
.
timeLine
+
'
ms
'
}}
</el-tag>
</
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)',
marginLeft:scope.row._marginLeft * 500+'px' }">
<span
style=
"display:inline-block"
></span>
<span
style=
"display:inline-block"
></span>
</div>
</div>
</
div
>
</
el-tooltip
>
</
template
>
</el-table-column
>
<el-table-column
label=
"操作"
width=
"200
"
>
<
template
slot-scope=
"scope"
>
<
el-button
type=
"text"
@
click=
"message(scope.row)"
>
点击
</el-button
>
</
template
>
</
el-table-column
>
</
tree-table
>
</
el-tooltip
>
</
template
>
</
el-table-column
>
<el-table-column
label=
"操作"
width=
"200"
>
<
template
slot-scope=
"scope
"
>
<el-button
type=
"text"
@
click=
"message(scope.row)"
>
点击
</el-button
>
<
/
template
>
</
el-table-column
>
</
tree-table
>
</
div
>
</template>
<
script
>
...
...
src/views/example/table/treeTable/treeTable.vue
浏览文件 @
0d47e345
<
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
>
<
script
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录