feat: 基础表格

This commit is contained in:
wang_fan_w 2024-05-28 00:15:43 +08:00
parent 847b805f86
commit 1d18f4fb8a

View File

@ -2,14 +2,22 @@
<div class="dc-page"> <div class="dc-page">
<a-table <a-table
row-key="key" row-key="key"
size="small"
:bordered="{
cell: true
}"
:columns="columns" :columns="columns"
:data="data" :data="data"
:row-selection="rowSelection" :row-selection="rowSelection"
v-model:selectedKeys="selectedKeys" v-model:selectedKeys="selectedKeys"
:pagination="pagination" :pagination="pagination"
> >
<template #optional="{ record }"> <template #optional>
<a-button>{{ record.name }}</a-button> <a-space>
<a-button type="primary">编辑</a-button>
<a-button>删除</a-button>
<a-button type="primary" status="danger">修改</a-button>
</a-space>
</template> </template>
</a-table> </a-table>
</div> </div>
@ -48,7 +56,8 @@ const columns = [
}, },
{ {
title: "用户状态", title: "用户状态",
dataIndex: "status" dataIndex: "status",
align: "center"
}, },
{ {
title: "创建时间", title: "创建时间",
@ -56,7 +65,8 @@ const columns = [
}, },
{ {
title: "操作", title: "操作",
slotName: "optional" slotName: "optional",
align: "center"
} }
]; ];
const data = reactive([ const data = reactive([