优化代码消除 控制台的报错信息

This commit is contained in:
mmc
2026-08-31 10:30:21 +08:00
parent 674721504d
commit a1922cdeaf
23 changed files with 259 additions and 214 deletions

View File

@@ -831,7 +831,7 @@ export default function WayLinePage({ onRefresh }) {
<Row gutter={[16, 16]} style={{ marginBottom: 8 }}>
{topCards.map((item, index) => (
<Col xs={12} sm={8} md={4} key={index}>
<Card bordered={false} bodyStyle={{ padding: '12px 14px' }} style={cardStyle}>
<Card variant="borderless" styles={{ body: { padding: '12px 14px' } }} style={cardStyle}>
<div style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
<div style={{ width: 36, height: 36, background: item.bg, borderRadius: 10, display: 'flex', justifyContent: 'center', alignItems: 'center', color: item.color }}>
{React.cloneElement(item.icon, { size: 18 })}
@@ -890,8 +890,8 @@ export default function WayLinePage({ onRefresh }) {
<Button size="small" icon={<Maximize2 size={12} />} />
</Space>
}
bordered={false}
bodyStyle={{ padding: 0, position: 'relative' }}
variant="borderless"
styles={{ body: { padding: 0, position: 'relative' } }}
style={{ ...cardStyle, marginBottom: 10 }}
>
<div style={{ width: '100%', height: 420, background: '#e8f3ff url(https://picsum.photos/seed/solar_map_v2/1600/1000) center/cover', position: 'relative' }}>
@@ -957,8 +957,8 @@ export default function WayLinePage({ onRefresh }) {
/>
</Tooltip>
}
bordered={false}
bodyStyle={{ padding: 0, display: 'flex', flexDirection: 'column', height: "calc(100% - 40px)", overflow: "auto" }}
variant="borderless"
styles={{ body: { padding: 0, display: 'flex', flexDirection: 'column', height: "calc(100% - 40px)", overflow: "auto" } }}
style={{ ...cardStyle, maxHeight: "250px", flex: 1, marginBottom: 0 }}
>
<Table
@@ -982,8 +982,8 @@ export default function WayLinePage({ onRefresh }) {
<Col xs={24} xl={10} style={{ display: "flex", flexDirection: "column" }} >
<Card
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>{t('devices.taskOrchestrationAI')}</span>}
bordered={false}
bodyStyle={{ padding: '12px 16px' }}
variant="borderless"
styles={{ body: { padding: '12px 16px' } }}
style={{ ...cardStyle, marginBottom: 8 }}
>
<Table
@@ -1025,8 +1025,8 @@ export default function WayLinePage({ onRefresh }) {
<Card
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>{t('devices.waylineParamsTitle')}</span>}
extra={<Text type="secondary" style={{ fontSize: 12 }}>{t('devices.currentWayline')}{selectedTask?.name || '-'}</Text>}
bordered={false}
bodyStyle={{ padding: '16px' }}
variant="borderless"
styles={{ body: { padding: '16px' } }}
style={{ ...cardStyle, marginBottom: 8 }}
>
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: '8px', marginBottom: 8 }}>
@@ -1141,8 +1141,8 @@ export default function WayLinePage({ onRefresh }) {
<Card
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>{t('devices.weatherWindowTitle')}</span>}
bordered={false}
bodyStyle={{ padding: '16px' }}
variant="borderless"
styles={{ body: { padding: '16px' } }}
style={{ ...cardStyle, flex: 1, }}
>
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(5, 1fr)', gap: '8px', marginBottom: 16 }}>
@@ -1248,8 +1248,8 @@ export default function WayLinePage({ onRefresh }) {
/>
</div>
}
bordered={false}
bodyStyle={{ padding: '12px', display: 'flex', flexDirection: 'column', height: 480 }}
variant="borderless"
styles={{ body: { padding: '12px', display: 'flex', flexDirection: 'column', height: 480 } }}
style={{ ...cardStyle, height: '100%' }}
>
<Input
@@ -1313,8 +1313,8 @@ export default function WayLinePage({ onRefresh }) {
<Card
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>{t('devices.ganttViewTitle')} <Text type="secondary" style={{ fontSize: 11, fontWeight: 400, marginLeft: 12 }}></Text></span>}
extra={<MoreOutlined style={{ cursor: 'pointer', fontSize: 18 }} />}
bordered={false}
bodyStyle={{ padding: 16 }}
variant="borderless"
styles={{ body: { padding: 16 } }}
style={{ ...cardStyle, height: '100%' }}
>
<div style={{ position: 'relative', border: '1px solid #F2F3F5', borderRadius: 8, padding: '16px 12px' }}>
@@ -1393,8 +1393,8 @@ export default function WayLinePage({ onRefresh }) {
</Space>
</div>
}
bordered={false}
bodyStyle={{ padding: 16 }}
variant="borderless"
styles={{ body: { padding: 16 } }}
style={{ ...cardStyle, height: '100%', maxHeight: 480, overflow: "auto" }}
>
<Row gutter={10}>