完善账单页面,抽取公共页面组件
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user