## 通用表格
<br />

#### 用于展示多条结构类似的数据，可对数据进行排序、筛选、对比或其他自定义操作。

### 基本用法

#### template（模版） 在这里属于一个固定用法：slot-scope="scope" 通过 Scoped slot 可以获取到 row, column, $index 的数据
:::demo
```html
<template>
	<div>
	        <ve-table :data="tableData" :tableRowClassName="tableRowClassName">
	            <el-table-column
	              type="index"
	              :index="function(index){return index+1}">
	            </el-table-column>
	            <ve-table-column
	              prop="date"
	              label="日期">
	            </ve-table-column>
	            <ve-table-column
	              prop="name"
	              label="姓名">
	            </ve-table-column>
	            <ve-table-column
	              min-width="100"
	              :showTip="true"
	              prop="address"
	              label="地址">
	            </ve-table-column>
	            <el-table-column
	              prop="address"
	              label="地址">
	            </el-table-column>
	            <ve-table-column
	                empty="我是占位字符"
	              prop="addres1s"
	              label="地址">
	            </ve-table-column>
	            <el-table-column
	              prop="address"
	              label="地址">
	            </el-table-column>
	            <el-table-column
	              label="操作"
	              width="150">
	              <template slot-scope="scope">
	                <el-link type="primary">查看</el-link>
	                <el-link type="warning">编辑</el-link>
	                <el-link type="danger">删除</el-link>
	                </template>
	            </el-table-column>
	        </ve-table>
	    </div>
</template>

<script>
  export default {
    data () {
		return {
			tableData: [{
			    date: '2016-05-02',
			    name: '王小虎',
			    province: '上海',
			    city: '普陀区',
			    address: '上海市普陀区金沙江路 1518 普陀区金沙江路 1518 弄',
			    zip: 200333,
			    tag: '家'
			},
			{
			    date: '2016-05-03',
			    name: '王小虎',
			    province: '上海',
			    city: '普陀区',
			    address: '上海市普陀区沙江路 1518 弄',
			    zip: 200333333,
			    tag: '家'
			},
			{
			    date: '2016-05-03',
			    name: '王小虎',
			    province: '上海',
			    city: '普陀区',
			    address: '上海市普陀区沙江路 1518 弄',
			    zip: 200333333,
			    tag: '家'
			},
			{
			    date: '2016-05-03',
			    name: '王小虎',
			    province: '上海',
			    city: '普陀区',
			    address: '上海市普陀区沙江路 1518 弄',
			    zip: 200333333,
			    tag: '家'
			},
			{
			    date: '2016-05-03',
			    name: '王小虎',
			    province: '上海',
			    city: '普陀区',
			    address: '上海市普陀区沙江路 1518 弄',
			    zip: 200333333,
			    tag: '家'
			},
			{
			    date: '2016-05-03',
			    name: '王小虎',
			    province: '上海',
			    city: '普陀区',
			    address: '上海市普陀区沙江路 1518 弄',
			    zip: 200333333,
			    tag: '家'
			}]
		}
	},
	methods:{
		tableRowClassName({ row, rowIndex }) {
		    if (rowIndex === 1) {
		        return 'danger-bg-color';
		    }
		    return '';
		}
	}
  }
</script>
```
:::

### Table Attributes

| 参数      | 说明          | 类型      | 可选值                           | 默认值  |
|---------- |-------------- |---------- |--------------------------------  |-------- |
| data     |  绑定数据           | Array | — | — |
| tableRowClassName     |  行的 className 的回调方法，也可以使用字符串为所有行设置一个固定的 className。           | Function({row, rowIndex})/String | — | — |

### Table-column Attributes
| 参数      | 说明          | 类型      | 可选值                           | 默认值  |
|---------- |-------------- |---------- |--------------------------------  |-------- |
| prop     |  列prop值           | string | — | — |
| label     |  列名           | string | — | — |
| dictCode     |  字典表编码           | string | — | — |
| empty     |   值为空时，显示的替换字符           | string | — | "-" |
| width     |   列宽           | number | — | — |
| min-width     |   最小列宽           | number | — | — |
| showTip     |   是否展示文字提示 默认            | boolean | — | false |



