feat(ui): 调整

This commit is contained in:
廖彦棋 2024-03-13 08:44:48 +08:00
parent 71f7a1b166
commit c920d8423d
4 changed files with 17 additions and 11 deletions

View File

@ -11,7 +11,7 @@ function useAsyncTable<T extends Record<string, unknown>>(
): TableReturn {
const paginationState = reactive({
current: 1,
pageSize: 10,
pageSize: 20,
total: 0,
});

View File

@ -37,7 +37,7 @@ const columns = [
const expandable = reactive({
title: "",
width: 80,
width: 50,
});
//

View File

@ -100,16 +100,18 @@ const handleRemove = async (id, reload) => {
/>
</template>
<template #actions="{ record, reload }">
<a-link @click="openFormModal(reload, record)">编辑</a-link>
<a-link @click="openResetPWDModal(reload, record)">修改密码</a-link>
<a-popconfirm
content="是否删除?"
position="left"
type="warning"
:on-before-ok="() => handleRemove(record.id, reload)"
>
<a-link status="danger">删除</a-link>
</a-popconfirm>
<template v-if="record.id !== 1">
<a-link @click="openFormModal(reload, record)">编辑</a-link>
<a-popconfirm
content="是否删除?"
position="left"
type="warning"
:on-before-ok="() => handleRemove(record.id, reload)"
>
<a-link status="danger">删除</a-link>
</a-popconfirm>
</template>
</template>
</SearchTable>
</template>

View File

@ -37,6 +37,7 @@ const columns: SearchTableColumns[] = [
{
title: "过期时间",
dataIndex: "expired_time",
width: 180,
render: ({ record }) => {
return dateFormat(record.expired_time);
},
@ -44,6 +45,7 @@ const columns: SearchTableColumns[] = [
{
title: "注册时间",
dataIndex: "created_at",
width: 180,
render: ({ record }) => {
return dateFormat(record.created_at);
},
@ -51,6 +53,8 @@ const columns: SearchTableColumns[] = [
{
title: "操作",
slotName: "actions",
width: 180,
fixed: "right",
},
];