refactor: 部分 ID 列 => 序号列

This commit is contained in:
2024-02-13 22:09:36 +08:00
parent 65e564dc67
commit 678aa92457
2 changed files with 10 additions and 2 deletions

View File

@@ -534,7 +534,11 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<template #columns> <template #columns>
<a-table-column title="ID" data-index="id" /> <a-table-column title="序号">
<template #cell="{ rowIndex }">
{{ rowIndex + 1 + (queryParams.page - 1) * queryParams.size }}
</template>
</a-table-column>
<a-table-column title="名称" :width="130"> <a-table-column title="名称" :width="130">
<template #cell="{ record }"> <template #cell="{ record }">
<a-link @click="toDetail(record.id)">{{ record.name }}</a-link> <a-link @click="toDetail(record.id)">{{ record.name }}</a-link>

View File

@@ -601,7 +601,11 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<template #columns> <template #columns>
<a-table-column title="ID" data-index="id" /> <a-table-column title="序号">
<template #cell="{ rowIndex }">
{{ rowIndex + 1 + (queryParams.page - 1) * queryParams.size }}
</template>
</a-table-column>
<a-table-column title="用户名" :width="100" ellipsis tooltip> <a-table-column title="用户名" :width="100" ellipsis tooltip>
<template #cell="{ record }"> <template #cell="{ record }">
<a-link @click="toDetail(record.id)">{{ <a-link @click="toDetail(record.id)">{{