element-plus/docs/examples/table/show-overflow-tooltip.vue
xx bb6033de40
docs: [table] add example with show overflow tooltip (#17098)
docs: ✏️ add table with show overflow tooltip

#17091
2024-06-07 20:18:47 +08:00

49 lines
1.2 KiB
Vue

<template>
<el-table :data="tableData" style="width: 100%">
<el-table-column type="selection" width="55" />
<el-table-column label="Date" width="120">
<template #default="scope">{{ scope.row.date }}</template>
</el-table-column>
<el-table-column property="name" label="Name" width="120" />
<el-table-column
property="address"
label="use show-overflow-tooltip"
width="240"
show-overflow-tooltip
/>
<el-table-column property="address" label="address" />
</el-table>
</template>
<script lang="ts" setup>
import { ElTable } from 'element-plus'
interface User {
date: string
name: string
address: string
}
const tableData: User[] = [
{
date: '2016-05-04',
name: 'Aleyna Kutzner',
address: 'Lohrbergstr. 86c, Süd Lilli, Saarland',
},
{
date: '2016-05-03',
name: 'Helen Jacobi',
address: '760 A Street, South Frankfield, Illinois',
},
{
date: '2016-05-02',
name: 'Brandon Deckert',
address: 'Arnold-Ohletz-Str. 41a, Alt Malinascheid, Thüringen',
},
{
date: '2016-05-01',
name: 'Margie Smith',
address: '23618 Windsor Drive, West Ricardoview, Idaho',
},
]
</script>