|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="table_item">
|
|
|
- <s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code">
|
|
|
+ <s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code" bordered>
|
|
|
<template #operator>
|
|
|
<!-- 搜索区域 -->
|
|
|
<div class="table-search">
|
|
@@ -35,7 +35,9 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <template #bodyCell="{ column, record }">
|
|
|
+ <template #bodyCell="{ column, record, index }">
|
|
|
+ <!-- 序号 -->
|
|
|
+ <template v-if="column.dataIndex === 'index'">{{ index + 1 }} </template>
|
|
|
<template v-if="column.dataIndex === 'action'">
|
|
|
<a-button type="link" size="small">编辑</a-button>
|
|
|
<a-popconfirm title="确定要删除吗?" @confirm="deleteData(record)">
|
|
@@ -55,6 +57,12 @@
|
|
|
const searchFormState = ref({})
|
|
|
const tableRef = ref()
|
|
|
const columns = [
|
|
|
+ {
|
|
|
+ title: '序号',
|
|
|
+ dataIndex: 'index',
|
|
|
+ align: 'center',
|
|
|
+ width: 50
|
|
|
+ },
|
|
|
{
|
|
|
title: '名称',
|
|
|
dataIndex: 'name',
|