项目:elementPlus + Vue3 + Ts
在使用table表格的时候,想实现一个序号的功能,查看官网之后,显示的是使用type=index即可,可是我这边没成功就改用了插槽的方式。记录一下,以防自己忘记。
<el-table-column label="序号">
<template #default="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>