feat:【antd】【ele】【member 会员】level 迁移 ele

This commit is contained in:
YunaiV
2025-10-07 10:30:24 +08:00
parent 2f6e7ced5e
commit ba47b627c8
8 changed files with 68 additions and 19 deletions

View File

@@ -2,7 +2,7 @@
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MemberLevelApi } from '#/api/member/level';
import { Page, useVbenModal } from '@vben/common-ui';
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
import { ElLoading, ElMessage } from 'element-plus';
@@ -19,7 +19,7 @@ const [FormModal, formModalApi] = useVbenModal({
});
/** 刷新表格 */
function onRefresh() {
function handleRefresh() {
gridApi.query();
}
@@ -41,7 +41,7 @@ async function handleDelete(row: MemberLevelApi.Level) {
try {
await deleteLevel(row.id as number);
ElMessage.success($t('ui.actionMessage.deleteSuccess', [row.name]));
onRefresh();
handleRefresh();
} finally {
loadingInstance.close();
}
@@ -60,7 +60,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
},
proxyConfig: {
ajax: {
query: async (_params, formValues) => {
query: async (_, formValues) => {
return await getLevelList({
...formValues,
});
@@ -69,6 +69,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
},
rowConfig: {
keyField: 'id',
isHover: true,
},
toolbarConfig: {
refresh: true,
@@ -80,7 +81,12 @@ const [Grid, gridApi] = useVbenVxeGrid({
<template>
<Page auto-content-height>
<FormModal @success="onRefresh" />
<DocAlert
title="会员等级、积分、签到"
url="https://doc.iocoder.cn/member/level/"
/>
<FormModal @success="handleRefresh" />
<Grid table-title="等级列表">
<template #toolbar-tools>
<TableAction