修复前端TypeScript编译错误

- CookiePage: blob类型转换为BlobPart,移除Tag的size属性
- UsersPage: 移除Divider的orientation属性(类型不兼容)
This commit is contained in:
yml2213
2026-06-23 00:59:02 +08:00
parent 157793cf0f
commit 56de33a285
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -37,7 +37,7 @@ export default function CookiePage() {
const handleExport = async (format: string = 'csv') => { const handleExport = async (format: string = 'csv') => {
try { try {
const blob = await cookieApi.exportCsv(format); const blob = await cookieApi.exportCsv(format);
const url = URL.createObjectURL(blob instanceof Blob ? blob : new Blob([blob])); const url = URL.createObjectURL(blob instanceof Blob ? blob : new Blob([blob as any]));
const a = document.createElement('a'); const a = document.createElement('a');
a.href = url; a.href = url;
a.download = format === 'custom' ? 'cookies_custom.txt' : 'cookies.csv'; a.download = format === 'custom' ? 'cookies_custom.txt' : 'cookies.csv';
@@ -112,7 +112,7 @@ export default function CookiePage() {
width: 100, width: 100,
align: 'center', align: 'center',
render: (name: string | null) => render: (name: string | null) =>
name ? <Tag color="green" size="small">{name}</Tag> : <Text type="secondary" style={{ fontSize: 12 }}></Text>, name ? <Tag color="green">{name}</Tag> : <Text type="secondary" style={{ fontSize: 12 }}></Text>,
}, },
{ {
title: 'Cookie', title: 'Cookie',
+1 -1
View File
@@ -311,7 +311,7 @@ export default function UsersPage() {
if (groupKeys.length === 0) return null; if (groupKeys.length === 0) return null;
return ( return (
<div key={group.label} style={{ marginBottom: 12 }}> <div key={group.label} style={{ marginBottom: 12 }}>
<Divider orientation="left" style={{ margin: '8px 0 12px' }}> <Divider style={{ margin: '8px 0 12px' }}>
{group.label} {group.label}
</Divider> </Divider>
<div style={{ display: 'flex', flexWrap: 'wrap', gap: '8px 24px' }}> <div style={{ display: 'flex', flexWrap: 'wrap', gap: '8px 24px' }}>