This commit is contained in:
2026-07-03 10:57:14 +08:00
parent 4992191da9
commit 61d74fcc04
4 changed files with 33 additions and 9 deletions
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react';
import {
Button, Card, Space, Table, Tag, Typography, message, Modal, Form, Input, Select, InputNumber,
Button, Card, Space, Table, Tag, Tooltip, Typography, message, Modal, Form, Input, Select, InputNumber,
} from 'antd';
import {
MenuOutlined, ReloadOutlined, PlusOutlined, EyeOutlined, EditOutlined, DeleteOutlined,
@@ -143,8 +143,16 @@ const AdminOauthAppList: React.FC = () => {
{ title: '应用ID', dataIndex: 'app_id',
render: (v: string) => <Typography.Text>{v}</Typography.Text>,
},
{ title: '应用密钥', dataIndex: 'secret',
render: (v: string) => <Typography.Text>{v}</Typography.Text>,
{ title: '应用密钥', dataIndex: 'secret', width: 180,
render: (v: string) => {
if (!v) return '-';
const short = v.length > 12 ? `${v.slice(0, 6)}...${v.slice(-4)}` : v;
return (
<Tooltip title={v} placement="topLeft">
<Typography.Text style={{ fontSize: 12 }}>{short}</Typography.Text>
</Tooltip>
);
},
},
{ title: '开户方式', dataIndex: 'open_type',
render: (v: number) => {
@@ -164,8 +172,15 @@ const AdminOauthAppList: React.FC = () => {
{ title: '状态', dataIndex: 'status',
render: (v: number) => <Tag color={v === 1 ? 'green' : 'red'}>{v === 1 ? '正常' : '禁用'}</Tag>,
},
{ title: '授权URL', dataIndex: 'auth_url',
render: (v: string) => <Typography.Text>{v}</Typography.Text>,
{ title: '授权URL', dataIndex: 'auth_url', width: 220,
render: (v: string) => {
if (!v) return '-';
return (
<Tooltip title={v} placement="topLeft">
<Typography.Text style={{ fontSize: 12 }} ellipsis>{v.length > 30 ? `${v.slice(0, 27)}...` : v}</Typography.Text>
</Tooltip>
);
},
},
{ title: '创建人', dataIndex: 'create_by',
render: (v: string) => <Typography.Text>{v}</Typography.Text>,
@@ -225,7 +240,7 @@ const AdminOauthAppList: React.FC = () => {
showTotal: (t) => `${t} 条记录`,
onChange: (p) => { setPage(p); load(p); },
}}
scroll={{ x: 800 }}
scroll={{ x: 1400 }}
/>
</Card>