Skip to content
Snippets Groups Projects
Commit dfd7ce8d authored by Pan's avatar Pan
Browse files

refine table example

parent bc2955bb
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ for (let i = 0; i < count; i++) {
id: '@increment',
timestamp: +Mock.Random.date('T'),
author: '@cname',
auditor: '@cname',
title: '@ctitle(10, 20)',
forecast: '@float(0, 100, 2, 2)',
importance: '@integer(1, 3)',
......
......@@ -17,9 +17,10 @@
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" style="margin-left: 10px;" @click="handleCreate" type="primary" icon="edit">添加</el-button>
<el-button class="filter-item" type="primary" icon="document" @click="handleDownload">导出</el-button>
<el-checkbox class="filter-item" @change='tableKey=tableKey+1' v-model="showAuditor">显示审核人</el-checkbox>
</div>
<el-table :data="list" v-loading.body="listLoading" border fit highlight-current-row style="width: 100%">
<el-table :key='tableKey' :data="list" v-loading.body="listLoading" border fit highlight-current-row style="width: 100%">
<el-table-column align="center" label="序号" width="65">
<template scope="scope">
......@@ -46,6 +47,12 @@
</template>
</el-table-column>
<el-table-column width="110px" v-if='showAuditor' align="center" label="审核人">
<template scope="scope">
<span style='color:red;'>{{scope.row.auditor}}</span>
</template>
</el-table-column>
<el-table-column width="80px" label="重要性">
<template scope="scope">
......@@ -188,7 +195,9 @@
create: '创建'
},
dialogPvVisible: false,
pvData: []
pvData: [],
showAuditor: false,
tableKey: 0
}
},
created() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment