mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 06:46:09 +08:00
修改表格样式
This commit is contained in:
parent
3b9a4f0834
commit
f865018cd6
|
@ -145,7 +145,6 @@
|
|||
"typescript": "4.8.4",
|
||||
"umi-request": "^1.4.0",
|
||||
"vh-check": "^2.0.5",
|
||||
"virtuallist-antd": "^0.7.6",
|
||||
"webpack": "^5.70.0",
|
||||
"yorkie": "^2.0.0"
|
||||
}
|
||||
|
|
|
@ -89,7 +89,6 @@ specifiers:
|
|||
umi-request: ^1.4.0
|
||||
uuid: ^8.3.2
|
||||
vh-check: ^2.0.5
|
||||
virtuallist-antd: ^0.7.6
|
||||
webpack: ^5.70.0
|
||||
winston: ^3.6.0
|
||||
yargs: ^17.3.1
|
||||
|
@ -188,7 +187,6 @@ devDependencies:
|
|||
typescript: 4.8.4
|
||||
umi-request: 1.4.0
|
||||
vh-check: 2.0.5
|
||||
virtuallist-antd: 0.7.6_antd@4.24.7+react@18.2.0
|
||||
webpack: 5.75.0
|
||||
yorkie: 2.0.0
|
||||
|
||||
|
@ -14837,22 +14835,6 @@ packages:
|
|||
resolution: {integrity: sha512-vHtIYWt9uLl2P2tLlatVpMwv9+ezuJCtMNjUVIpzd5Pa/dJXN8AtqkKmVRcNSlmXyCjkCkbMQX/Vs9axmdlfgg==}
|
||||
dev: true
|
||||
|
||||
/virtuallist-antd/0.7.6_antd@4.24.7+react@18.2.0:
|
||||
resolution: {integrity: sha512-mVlxseQBpdJ4o0KRu1UTIewKQlz44VWAJfN382sjG+OKB5nbCMuJO1U9kODgLVrjD03uxKcE6bUEAeTfdxjkXA==}
|
||||
engines: {node: '>=8', npm: '>=5'}
|
||||
peerDependencies:
|
||||
antd: ^4.1.0
|
||||
react: ^16.8.0 || ^17.0.0 || ^18.0.0 || 18
|
||||
peerDependenciesMeta:
|
||||
antd:
|
||||
optional: true
|
||||
react:
|
||||
optional: true
|
||||
dependencies:
|
||||
antd: 4.24.7_biqbaboplfbrettd7655fr4n2y
|
||||
react: 18.2.0
|
||||
dev: true
|
||||
|
||||
/vite/3.2.5_f2wittb4cajzb7wm3nryx4tf2e:
|
||||
resolution: {integrity: sha512-4mVEpXpSOgrssFZAOmGIr85wPHKvaDAcXqxVxVRZhljkJOMZi1ibLibzjLHzJvcok8BMguLc7g1W6W/GqZbLdQ==}
|
||||
engines: {node: ^14.18.0 || >=16.0.0}
|
||||
|
|
|
@ -377,3 +377,12 @@ pre {
|
|||
.ant-table-bordered .virtuallist > table > .ant-table-tbody > tr > td {
|
||||
border-right: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.ant-table-column-title {
|
||||
flex: unset;
|
||||
}
|
||||
|
||||
.ant-table-column-sorters,
|
||||
.ant-table-filter-column {
|
||||
justify-content: unset;
|
||||
}
|
||||
|
|
|
@ -107,7 +107,6 @@ const Crontab = () => {
|
|||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
width: 150,
|
||||
align: 'center' as const,
|
||||
render: (text: string, record: any) => (
|
||||
<>
|
||||
<a
|
||||
|
@ -163,14 +162,12 @@ const Crontab = () => {
|
|||
dataIndex: 'command',
|
||||
key: 'command',
|
||||
width: 300,
|
||||
align: 'center' as const,
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<Paragraph
|
||||
style={{
|
||||
wordBreak: 'break-all',
|
||||
marginBottom: 0,
|
||||
textAlign: 'left',
|
||||
}}
|
||||
ellipsis={{ tooltip: text, rows: 2 }}
|
||||
>
|
||||
|
@ -193,14 +190,12 @@ const Crontab = () => {
|
|||
dataIndex: 'schedule',
|
||||
key: 'schedule',
|
||||
width: 110,
|
||||
align: 'center' as const,
|
||||
sorter: {
|
||||
compare: (a, b) => a.schedule.localeCompare(b.schedule),
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '最后运行时间',
|
||||
align: 'center' as const,
|
||||
dataIndex: 'last_execution_time',
|
||||
key: 'last_execution_time',
|
||||
width: 150,
|
||||
|
@ -230,7 +225,6 @@ const Crontab = () => {
|
|||
},
|
||||
{
|
||||
title: '最后运行时长',
|
||||
align: 'center' as const,
|
||||
width: 120,
|
||||
dataIndex: 'last_running_time',
|
||||
key: 'last_running_time',
|
||||
|
@ -247,7 +241,6 @@ const Crontab = () => {
|
|||
},
|
||||
{
|
||||
title: '下次运行时间',
|
||||
align: 'center' as const,
|
||||
width: 150,
|
||||
sorter: {
|
||||
compare: (a: any, b: any) => {
|
||||
|
@ -267,7 +260,6 @@ const Crontab = () => {
|
|||
title: '状态',
|
||||
key: 'status',
|
||||
dataIndex: 'status',
|
||||
align: 'center' as const,
|
||||
width: 88,
|
||||
filters: [
|
||||
{
|
||||
|
@ -329,7 +321,6 @@ const Crontab = () => {
|
|||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
align: 'center' as const,
|
||||
width: 100,
|
||||
render: (text, record, index) => {
|
||||
const isPc = !isPhone;
|
||||
|
|
|
@ -80,23 +80,17 @@ const ViewManageModal = ({
|
|||
title: '名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center' as const,
|
||||
render: (text) => (
|
||||
<div style={{ textAlign: 'left', paddingLeft: 30 }}>{text}</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
dataIndex: 'type',
|
||||
key: 'type',
|
||||
align: 'center' as const,
|
||||
render: (v) => (v === 1 ? '系统' : '个人'),
|
||||
},
|
||||
{
|
||||
title: '显示',
|
||||
key: 'isDisabled',
|
||||
dataIndex: 'isDisabled',
|
||||
align: 'center' as const,
|
||||
width: 100,
|
||||
render: (text: string, record: any, index: number) => {
|
||||
return (
|
||||
|
@ -111,7 +105,6 @@ const ViewManageModal = ({
|
|||
title: '操作',
|
||||
key: 'action',
|
||||
width: 100,
|
||||
align: 'center' as const,
|
||||
render: (text: string, record: any, index: number) => {
|
||||
return record.type !== 1 ? (
|
||||
<Space size="middle">
|
||||
|
|
|
@ -32,7 +32,6 @@ import { useOutletContext } from '@umijs/max';
|
|||
import { SharedContext } from '@/layouts';
|
||||
import useTableScrollHeight from '@/hooks/useTableScrollHeight';
|
||||
|
||||
|
||||
const { Text } = Typography;
|
||||
const { Search } = Input;
|
||||
|
||||
|
@ -57,7 +56,6 @@ const Dependence = () => {
|
|||
const columns: any = [
|
||||
{
|
||||
title: '序号',
|
||||
align: 'center' as const,
|
||||
width: 50,
|
||||
render: (text: string, record: any, index: number) => {
|
||||
return <span style={{ cursor: 'text' }}>{index + 1} </span>;
|
||||
|
@ -67,13 +65,11 @@ const Dependence = () => {
|
|||
title: '名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center' as const,
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
key: 'status',
|
||||
dataIndex: 'status',
|
||||
align: 'center' as const,
|
||||
render: (text: string, record: any, index: number) => {
|
||||
return (
|
||||
<Space size="middle" style={{ cursor: 'text' }}>
|
||||
|
@ -91,13 +87,11 @@ const Dependence = () => {
|
|||
title: '备注',
|
||||
dataIndex: 'remark',
|
||||
key: 'remark',
|
||||
align: 'center' as const,
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
key: 'timestamp',
|
||||
dataIndex: 'timestamp',
|
||||
align: 'center' as const,
|
||||
render: (text: string, record: any) => {
|
||||
const language = navigator.language || navigator.languages[0];
|
||||
const time = record.createdAt || record.timestamp;
|
||||
|
@ -120,7 +114,6 @@ const Dependence = () => {
|
|||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
align: 'center' as const,
|
||||
render: (text: string, record: any, index: number) => {
|
||||
const isPc = !isPhone;
|
||||
return (
|
||||
|
@ -169,7 +162,7 @@ const Dependence = () => {
|
|||
const [isLogModalVisible, setIsLogModalVisible] = useState(false);
|
||||
const [type, setType] = useState('nodejs');
|
||||
const tableRef = useRef<any>();
|
||||
const tableScrollHeight = useTableScrollHeight(tableRef, 59)
|
||||
const tableScrollHeight = useTableScrollHeight(tableRef, 59);
|
||||
|
||||
const getDependencies = () => {
|
||||
setLoading(true);
|
||||
|
|
7
src/pages/env/index.tsx
vendored
7
src/pages/env/index.tsx
vendored
|
@ -71,7 +71,6 @@ const Env = () => {
|
|||
const columns: any = [
|
||||
{
|
||||
title: '序号',
|
||||
align: 'center' as const,
|
||||
width: 60,
|
||||
render: (text: string, record: any, index: number) => {
|
||||
return <span style={{ cursor: 'text' }}>{index + 1} </span>;
|
||||
|
@ -81,14 +80,12 @@ const Env = () => {
|
|||
title: '名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center' as const,
|
||||
sorter: (a: any, b: any) => a.name.localeCompare(b.name),
|
||||
},
|
||||
{
|
||||
title: '值',
|
||||
dataIndex: 'value',
|
||||
key: 'value',
|
||||
align: 'center' as const,
|
||||
width: '35%',
|
||||
render: (text: string, record: any) => {
|
||||
return (
|
||||
|
@ -105,7 +102,6 @@ const Env = () => {
|
|||
title: '备注',
|
||||
dataIndex: 'remarks',
|
||||
key: 'remarks',
|
||||
align: 'center' as const,
|
||||
render: (text: string, record: any) => {
|
||||
return (
|
||||
<Tooltip title={text} placement="topLeft">
|
||||
|
@ -118,7 +114,6 @@ const Env = () => {
|
|||
title: '更新时间',
|
||||
dataIndex: 'timestamp',
|
||||
key: 'timestamp',
|
||||
align: 'center' as const,
|
||||
width: 165,
|
||||
ellipsis: {
|
||||
showTitle: false,
|
||||
|
@ -153,7 +148,6 @@ const Env = () => {
|
|||
title: '状态',
|
||||
key: 'status',
|
||||
dataIndex: 'status',
|
||||
align: 'center' as const,
|
||||
width: 70,
|
||||
filters: [
|
||||
{
|
||||
|
@ -180,7 +174,6 @@ const Env = () => {
|
|||
title: '操作',
|
||||
key: 'action',
|
||||
width: 120,
|
||||
align: 'center' as const,
|
||||
render: (text: string, record: any, index: number) => {
|
||||
const isPc = !isPhone;
|
||||
return (
|
||||
|
|
|
@ -49,13 +49,11 @@ const Setting = () => {
|
|||
title: '名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center' as const,
|
||||
},
|
||||
{
|
||||
title: 'Client ID',
|
||||
dataIndex: 'client_id',
|
||||
key: 'client_id',
|
||||
align: 'center' as const,
|
||||
render: (text: string, record: any) => {
|
||||
return <Text copyable>{record.client_id}</Text>;
|
||||
},
|
||||
|
@ -64,7 +62,6 @@ const Setting = () => {
|
|||
title: 'Client Secret',
|
||||
dataIndex: 'client_secret',
|
||||
key: 'client_secret',
|
||||
align: 'center' as const,
|
||||
render: (text: string, record: any) => {
|
||||
return <Text copyable={{ text: record.client_secret }}>*******</Text>;
|
||||
},
|
||||
|
@ -73,22 +70,16 @@ const Setting = () => {
|
|||
title: '权限',
|
||||
dataIndex: 'scopes',
|
||||
key: 'scopes',
|
||||
align: 'center' as const,
|
||||
width: '40%',
|
||||
render: (text: string, record: any) => {
|
||||
return (
|
||||
<div style={{ textAlign: 'left' }}>
|
||||
{record.scopes.map((scope: any) => {
|
||||
return <Tag key={scope}>{(config.scopesMap as any)[scope]}</Tag>;
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
return record.scopes.map((scope: any) => {
|
||||
return <Tag key={scope}>{(config.scopesMap as any)[scope]}</Tag>;
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
align: 'center' as const,
|
||||
render: (text: string, record: any, index: number) => {
|
||||
const isPc = !isPhone;
|
||||
return (
|
||||
|
|
|
@ -18,7 +18,6 @@ enum LoginStatusColor {
|
|||
const columns = [
|
||||
{
|
||||
title: '序号',
|
||||
align: 'center' as const,
|
||||
width: 50,
|
||||
render: (text: string, record: any, index: number) => {
|
||||
return index + 1;
|
||||
|
@ -28,7 +27,6 @@ const columns = [
|
|||
title: '登录时间',
|
||||
dataIndex: 'timestamp',
|
||||
key: 'timestamp',
|
||||
align: 'center' as const,
|
||||
render: (text: string, record: any) => {
|
||||
return new Date(record.timestamp).toLocaleString();
|
||||
},
|
||||
|
@ -37,25 +35,21 @@ const columns = [
|
|||
title: '登录地址',
|
||||
dataIndex: 'address',
|
||||
key: 'address',
|
||||
align: 'center' as const,
|
||||
},
|
||||
{
|
||||
title: '登录IP',
|
||||
dataIndex: 'ip',
|
||||
key: 'ip',
|
||||
align: 'center' as const,
|
||||
},
|
||||
{
|
||||
title: '登录设备',
|
||||
dataIndex: 'platform',
|
||||
key: 'platform',
|
||||
align: 'center' as const,
|
||||
},
|
||||
{
|
||||
title: '登录状态',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center' as const,
|
||||
render: (text: string, record: any) => {
|
||||
return (
|
||||
<Tag color={LoginStatusColor[record.status]} style={{ marginRight: 0 }}>
|
||||
|
|
|
@ -68,7 +68,6 @@ const Subscription = () => {
|
|||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
width: 150,
|
||||
align: 'center' as const,
|
||||
sorter: {
|
||||
compare: (a: any, b: any) => a.name.localeCompare(b.name),
|
||||
multiple: 2,
|
||||
|
@ -78,7 +77,6 @@ const Subscription = () => {
|
|||
title: '链接',
|
||||
dataIndex: 'url',
|
||||
key: 'url',
|
||||
align: 'center' as const,
|
||||
sorter: {
|
||||
compare: (a: any, b: any) => a.name.localeCompare(b.name),
|
||||
multiple: 2,
|
||||
|
@ -89,7 +87,6 @@ const Subscription = () => {
|
|||
style={{
|
||||
wordBreak: 'break-all',
|
||||
marginBottom: 0,
|
||||
textAlign: 'left',
|
||||
}}
|
||||
ellipsis={{ tooltip: text, rows: 2 }}
|
||||
>
|
||||
|
@ -103,7 +100,6 @@ const Subscription = () => {
|
|||
dataIndex: 'type',
|
||||
key: 'type',
|
||||
width: 130,
|
||||
align: 'center' as const,
|
||||
render: (text: string, record: any) => {
|
||||
return (SubscriptionType as any)[record.type];
|
||||
},
|
||||
|
@ -113,7 +109,6 @@ const Subscription = () => {
|
|||
dataIndex: 'branch',
|
||||
key: 'branch',
|
||||
width: 130,
|
||||
align: 'center' as const,
|
||||
render: (text: string, record: any) => {
|
||||
return record.branch || '-';
|
||||
},
|
||||
|
@ -121,7 +116,6 @@ const Subscription = () => {
|
|||
{
|
||||
title: '定时规则',
|
||||
width: 180,
|
||||
align: 'center' as const,
|
||||
render: (text: string, record: any) => {
|
||||
if (record.schedule_type === 'interval') {
|
||||
const { type, value } = record.interval_schedule;
|
||||
|
@ -134,7 +128,6 @@ const Subscription = () => {
|
|||
title: '状态',
|
||||
key: 'status',
|
||||
dataIndex: 'status',
|
||||
align: 'center' as const,
|
||||
width: 110,
|
||||
filters: [
|
||||
{
|
||||
|
@ -189,7 +182,6 @@ const Subscription = () => {
|
|||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
align: 'center' as const,
|
||||
width: 130,
|
||||
render: (text: string, record: any, index: number) => {
|
||||
const isPc = !isPhone;
|
||||
|
|
Loading…
Reference in New Issue
Block a user