el-table-column prop
时间: 2023-09-08 09:15:21 浏览: 331
The el-table-column prop is a configuration option for a column in the Element UI table component. It allows you to specify various settings for a particular column, such as the header label, data field, width, alignment, and render function.
Here are some common props for el-table-column:
- label: The header label for the column.
- prop: The data field name for the column.
- width: The width of the column.
- align: The text alignment for the column.
- sortable: Whether the column is sortable or not.
- formatter: A function to format the cell values.
- scopedSlots: A slot to customize the column content.
Example usage:
```
<el-table :data="tableData">
<el-table-column prop="date" label="Date"></el-table-column>
<el-table-column prop="name" label="Name"></el-table-column>
<el-table-column prop="address" label="Address"></el-table-column>
</el-table>
```
In this example, we define three columns with the `prop` and `label` props. The `prop` corresponds to the data field in the `tableData` array, and the `label` is the header label for the column.
阅读全文
相关推荐



















