mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-21 01:02:59 +08:00
d937918717
docs: [table] column width shows full
72 lines
1.7 KiB
Vue
72 lines
1.7 KiB
Vue
<template>
|
|
<el-table :data="tableData" style="width: 100%" height="250">
|
|
<el-table-column fixed prop="date" label="Date" width="150" />
|
|
<el-table-column prop="name" label="Name" width="120" />
|
|
<el-table-column prop="state" label="State" width="120" />
|
|
<el-table-column prop="city" label="City" width="320" />
|
|
<el-table-column prop="address" label="Address" width="600" />
|
|
<el-table-column prop="zip" label="Zip" />
|
|
</el-table>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
const tableData = [
|
|
{
|
|
date: '2016-05-03',
|
|
name: 'Tom',
|
|
state: 'California',
|
|
city: 'Los Angeles',
|
|
address: 'No. 189, Grove St, Los Angeles',
|
|
zip: 'CA 90036',
|
|
},
|
|
{
|
|
date: '2016-05-02',
|
|
name: 'Tom',
|
|
state: 'California',
|
|
city: 'Los Angeles',
|
|
address: 'No. 189, Grove St, Los Angeles',
|
|
zip: 'CA 90036',
|
|
},
|
|
{
|
|
date: '2016-05-04',
|
|
name: 'Tom',
|
|
state: 'California',
|
|
city: 'Los Angeles',
|
|
address: 'No. 189, Grove St, Los Angeles',
|
|
zip: 'CA 90036',
|
|
},
|
|
{
|
|
date: '2016-05-01',
|
|
name: 'Tom',
|
|
state: 'California',
|
|
city: 'Los Angeles',
|
|
address: 'No. 189, Grove St, Los Angeles',
|
|
zip: 'CA 90036',
|
|
},
|
|
{
|
|
date: '2016-05-08',
|
|
name: 'Tom',
|
|
state: 'California',
|
|
city: 'Los Angeles',
|
|
address: 'No. 189, Grove St, Los Angeles',
|
|
zip: 'CA 90036',
|
|
},
|
|
{
|
|
date: '2016-05-06',
|
|
name: 'Tom',
|
|
state: 'California',
|
|
city: 'Los Angeles',
|
|
address: 'No. 189, Grove St, Los Angeles',
|
|
zip: 'CA 90036',
|
|
},
|
|
{
|
|
date: '2016-05-07',
|
|
name: 'Tom',
|
|
state: 'California',
|
|
city: 'Los Angeles',
|
|
address: 'No. 189, Grove St, Los Angeles',
|
|
zip: 'CA 90036',
|
|
},
|
|
]
|
|
</script>
|