mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 18:01:24 +08:00
14cfb0500f
- Finishing the documentation examples - Add APIs to the documentation - Fix some issue while updating the documentations
30 lines
657 B
Vue
30 lines
657 B
Vue
<template>
|
|
<el-table-v2
|
|
:columns="columns"
|
|
:data="[]"
|
|
:row-height="40"
|
|
:width="700"
|
|
:height="400"
|
|
:footer-height="50"
|
|
>
|
|
<template #empty>
|
|
<div class="flex items-center justify-center h-100%">
|
|
<el-empty />
|
|
</div>
|
|
</template>
|
|
</el-table-v2>
|
|
</template>
|
|
|
|
<script lang="tsx" setup>
|
|
const generateColumns = (length = 10, prefix = 'column-', props?: any) =>
|
|
Array.from({ length }).map((_, columnIndex) => ({
|
|
...props,
|
|
key: `${prefix}${columnIndex}`,
|
|
dataKey: `${prefix}${columnIndex}`,
|
|
title: `Column ${columnIndex}`,
|
|
width: 150,
|
|
}))
|
|
|
|
const columns = generateColumns(10)
|
|
</script>
|