修复 TypeScript 类型错误:将 MUI sx 语法改成标准 CSS 属性

This commit is contained in:
雨霖铃
2026-05-22 00:38:48 +08:00
parent 427e668e7c
commit 6711783975
7 changed files with 14 additions and 13 deletions
+1 -1
View File
@@ -397,7 +397,7 @@ export default function App() {
iconColor={theme.palette.primary.main} iconColor={theme.palette.primary.main}
title="应用设置" title="应用设置"
subtitle="针对不同窗口类型独立配置 Dashboard 中显示的功能及其排序" subtitle="针对不同窗口类型独立配置 Dashboard 中显示的功能及其排序"
sx={{ mb: 4 }} sx={{ marginBottom: '1rem' }}
/> />
{/* Tab 与恢复按钮同行 */} {/* Tab 与恢复按钮同行 */}
<Stack <Stack
-4
View File
@@ -6,7 +6,6 @@ import { SnackbarProvider } from '@/components/GlobalSnackbar';
import { Box } from '@mui/material'; import { Box } from '@mui/material';
import { getEntryPointType } from '@/config/features'; import { getEntryPointType } from '@/config/features';
import { useMemo } from 'react'; import { useMemo } from 'react';
import { Button } from '@/components/ui/button';
export default function App() { export default function App() {
// 打开Chrome扩展选项页面,需确保manifest中已配置options_page或options_ui // 打开Chrome扩展选项页面,需确保manifest中已配置options_page或options_ui
@@ -64,9 +63,6 @@ export default function App() {
<ErrorBoundary> <ErrorBoundary>
<RouterContainer /> <RouterContainer />
</ErrorBoundary> </ErrorBoundary>
<Button variant="outline" className="m-4">
Tailwind CSS
</Button>
</Box> </Box>
</SnackbarProvider> </SnackbarProvider>
</RouterProvider> </RouterProvider>
+1 -1
View File
@@ -80,7 +80,7 @@ export default function JsonFormatSection() {
value={indentSize} value={indentSize}
onChange={(v) => setIndentSize(v)} onChange={(v) => setIndentSize(v)}
options={INDENT_OPTIONS.map((size) => ({ value: size, label: String(size) }))} options={INDENT_OPTIONS.map((size) => ({ value: size, label: String(size) }))}
sx={{ width: 'auto', mb: 0, flexShrink: 0 }} sx={{ width: 'auto', marginBottom: 0, flexShrink: 0 }}
size="small" size="small"
/> />
+2 -2
View File
@@ -28,14 +28,14 @@ export default function Index() {
subtitle={t('qrCode:pageSubtitle')} subtitle={t('qrCode:pageSubtitle')}
icon={<QrCode />} icon={<QrCode />}
iconColor={qrCodePageStyles.primaryColor} iconColor={qrCodePageStyles.primaryColor}
sx={{ mb: 2.5 }} sx={{ marginBottom: '0.625rem' }}
/> />
<SwitchButtonGroup <SwitchButtonGroup
value={qrCode.mode} value={qrCode.mode}
options={modeOptions} options={modeOptions}
onChange={qrCode.setMode} onChange={qrCode.setMode}
sx={{ mb: 3 }} sx={{ marginBottom: '0.75rem' }}
/> />
{qrCode.mode === 'generate' ? <GeneratePanel /> : <ParsePanel />} {qrCode.mode === 'generate' ? <GeneratePanel /> : <ParsePanel />}
+8 -3
View File
@@ -43,7 +43,12 @@ export default function DomainHeader({ domain, totalSize }: DomainHeaderProps) {
</Box> </Box>
) : null ) : null
} }
iconSx={storageCleanerPageStyles.DOMAIN_HEADER_ICON} iconSx={{
padding: '0.3rem',
borderRadius: '0.75rem',
boxShadow: '0 2px 8px rgba(245, 158, 11, 0.15)',
transition: 'all 0.2s',
}}
titleSx={{ titleSx={{
fontSize: '1rem', fontSize: '1rem',
}} }}
@@ -53,10 +58,10 @@ export default function DomainHeader({ domain, totalSize }: DomainHeaderProps) {
overflow: 'hidden', overflow: 'hidden',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
mt: 0.3, marginTop: '0.3rem',
fontSize: '0.75rem', fontSize: '0.75rem',
}} }}
sx={{ mb: 3 }} sx={{ marginBottom: '0.75rem' }}
/> />
); );
} }
+1 -1
View File
@@ -52,7 +52,7 @@ export default function Index() {
minRows={8} minRows={8}
maxRows={15} maxRows={15}
showClear={false} showClear={false}
sx={{ mb: 3 }} sx={{ marginBottom: '0.75rem' }}
/> />
{/* 统计结果展示区域 */} {/* 统计结果展示区域 */}
+1 -1
View File
@@ -77,7 +77,7 @@ export default function Index() {
{ value: 's', label: t('timestamp:unitS') }, { value: 's', label: t('timestamp:unitS') },
]} ]}
onChange={(v) => setUnit(v as 'ms' | 's')} onChange={(v) => setUnit(v as 'ms' | 's')}
sx={{ width: 'auto', mb: 0, flexShrink: 0 }} sx={{ width: 'auto', marginBottom: 0, flexShrink: 0 }}
size="small" size="small"
/> />