完善账单页面,抽取公共页面组件

This commit is contained in:
2025-04-11 17:34:42 +08:00
parent 7238166a95
commit e0c75f9506
26 changed files with 542 additions and 84 deletions

View File

@@ -23,6 +23,7 @@ import {
} from '@/components/ui/alert-dialog'
import {Pagination} from '@/components/ui/pagination'
import {Checkbox} from '@/components/ui/checkbox'
import Page from '@/components/page'
const schema = z.object({
host: z.string().min(1, {message: 'IP地址不能为空'}),
@@ -187,7 +188,7 @@ export default function WhitelistPage(props: WhitelistPageProps) {
// 添加白名单
const resp = await createWhitelist(value)
if (resp && resp.success) {
await refresh(data.page, data.size)
await refresh(1, data.size)
toggleDialog(false)
toast.success('添加成功')
}
@@ -203,7 +204,7 @@ export default function WhitelistPage(props: WhitelistPageProps) {
}
const resp = await updateWhitelist({...value, id: dialogData.id})
if (resp && resp.success) {
await refresh(data.page, data.size)
await refresh(1, data.size)
toggleDialog(false)
toast.success('编辑成功')
}
@@ -234,7 +235,7 @@ export default function WhitelistPage(props: WhitelistPageProps) {
}
return (
<main className={`flex-auto bg-white rounded-tl-lg p-4 flex flex-col gap-4`}>
<Page>
{/* 全局操作 */}
<section>
@@ -376,7 +377,7 @@ export default function WhitelistPage(props: WhitelistPageProps) {
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</main>
</Page>
)
// endregion