Skip to content

Let's use AI to Earn!

钱包界面配置

bulaienaofutuojiesenzhangfc52518b88e7
diff --git a/src/app/[lng]/wallet/page.tsx b/src/app/[lng]/wallet/page.tsx
index da30f0e9..d0fb4ff6 100644
--- a/src/app/[lng]/wallet/page.tsx
+++ b/src/app/[lng]/wallet/page.tsx
@@ -33,22 +33,82 @@ export default function WalletPage() {
const columns = useMemo(
() => [
- { title: t("columns.userName"), dataIndex: "userName", key: "userName" },
- { title: t("columns.mail"), dataIndex: "mail", key: "mail" },
- { title: t("columns.account"), dataIndex: "account", key: "account" },
- { title: t("columns.type"), dataIndex: "type", key: "type", render: (v: string) => (v === "ZFB" ? t("types.ZFB") : t("types.WX_PAY")) },
- { title: t("columns.phone"), dataIndex: "phone", key: "phone" },
- { title: t("columns.cardNum"), dataIndex: "cardNum", key: "cardNum" },
+ {
+ title: t("columns.userName"),
+ dataIndex: "userName",
+ key: "userName",
+ width: 100,
+ ellipsis: true
+ },
+ {
+ title: t("columns.mail"),
+ dataIndex: "mail",
+ key: "mail",
+ width: 150,
+ ellipsis: true,
+ responsive: ['md'] as any
+ },
+ {
+ title: t("columns.account"),
+ dataIndex: "account",
+ key: "account",
+ width: 120,
+ ellipsis: true
+ },
+ {
+ title: t("columns.type"),
+ dataIndex: "type",
+ key: "type",
+ width: 80,
+ render: (v: string) => (v === "ZFB" ? t("types.ZFB") : t("types.WX_PAY"))
+ },
+ {
+ title: t("columns.phone"),
+ dataIndex: "phone",
+ key: "phone",
+ width: 120,
+ ellipsis: true,
+ responsive: ['lg'] as any
+ },
+ {
+ title: t("columns.cardNum"),
+ dataIndex: "cardNum",
+ key: "cardNum",
+ width: 120,
+ ellipsis: true,
+ responsive: ['lg'] as any
+ },
{
title: t("columns.actions"),
key: "actions",
+ width: 120,
+ fixed: 'right' as any,
render: (_: any, record: UserWalletAccount) => (
- <>
- <Button size="small" type="link" onClick={() => onEdit(record)}>{t("actions.edit")}</Button>
- <Popconfirm title={t("actions.deleteConfirm")} onConfirm={() => onDelete(record)}>
- <Button size="small" type="link" danger>{t("actions.delete")}</Button>
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '4px' }}>
+ <Button
+ size="small"
+ type="link"
+ onClick={() => onEdit(record)}
+ style={{ padding: '2px 4px', fontSize: '11px' }}
+ >
+ {t("actions.edit")}
+ </Button>
+ <Popconfirm
+ title={t("actions.deleteConfirm")}
+ onConfirm={() => onDelete(record)}
+ okText={t("actions.confirm" as any)}
+ cancelText={t("actions.cancel" as any)}
+ >
+ <Button
+ size="small"
+ type="link"
+ danger
+ style={{ padding: '2px 4px', fontSize: '11px' }}
+ >
+ {t("actions.delete")}
+ </Button>
</Popconfirm>
- </>
+ </div>
)
}
],
@@ -120,19 +180,55 @@ export default function WalletPage() {
}
return (
- <div style={{ padding: 16 }}>
- <Card title={t("title")} extra={<Button type="primary" onClick={openCreate}>{t("actions.create")}</Button>}>
+ <div style={{
+ padding: '16px',
+ minHeight: '100vh',
+ backgroundColor: '#f5f5f5'
+ }}>
+ <Card
+ title={t("title")}
+ extra={
+ <Button
+ type="primary"
+ onClick={openCreate}
+ size="small"
+ style={{
+ fontSize: '12px',
+ height: '32px',
+ padding: '4px 12px'
+ }}
+ >
+ {t("actions.create")}
+ </Button>
+ }
+ style={{
+ margin: '0 auto',
+ maxWidth: '100%',
+ boxShadow: '0 2px 8px rgba(0,0,0,0.1)'
+ }}
+ >
<Table
rowKey="_id"
columns={columns as any}
dataSource={list}
loading={loading}
+ scroll={{ x: 800 }}
+ size="small"
pagination={{
current: pagination.current,
pageSize: pagination.pageSize,
total: pagination.total,
- showSizeChanger: true,
+ showSizeChanger: false,
+ showQuickJumper: false,
+ showTotal: (total, range) =>
+ `${range[0]}-${range[1]} / ${total}`,
onChange: (p, s) => fetchList(p, s || 10),
+ simple: true,
+ pageSizeOptions: ['5', '10', '20'],
+ responsive: true
+ }}
+ style={{
+ fontSize: '12px'
}}
/>
</Card>
@@ -144,6 +240,17 @@ export default function WalletPage() {
onOk={onSubmit}
confirmLoading={submitting}
destroyOnClose
+ width="90%"
+ style={{
+ maxWidth: '500px',
+ top: '20px'
+ }}
+ bodyStyle={{
+ maxHeight: '70vh',
+ overflowY: 'auto',
+ padding: '16px'
+ }}
+ centered
>
<Form form={form} layout="vertical" preserve={false}>
<Form.Item name="userId" label={t("form.userId")} rules={[{ required: true, message: t("form.required") }]}>