Optimize code

This commit is contained in:
2024-01-08 13:43:47 +08:00
parent d526d913b9
commit 88c66bd7a7
12 changed files with 68 additions and 70 deletions

View File

@@ -123,7 +123,7 @@ const SensitiveWord: React.FC = () => {
justifyContent: 'flex-end'
}}
>
{selectedKeys?.length === 1 ? (
{selectedKeys?.length === 1 && (
<AntdTooltip title={'删除选中项'}>
<Icon
style={{ fontSize: '1.2em' }}
@@ -131,7 +131,7 @@ const SensitiveWord: React.FC = () => {
onClick={handleOnDelete}
/>
</AntdTooltip>
) : undefined}
)}
</span>,
'拦截'

View File

@@ -27,7 +27,7 @@ export const SettingsCard: React.FC<SettingsCardProps> = (props) => {
<FlexBox direction={'horizontal'} className={'head'}>
<Icon component={props.icon} className={'icon'} />
<div className={'title'}>{props.title}</div>
{!props.loading ? (
{!props.loading && (
<Permission operationCode={props.modifyOperationCode}>
{props.expand}
<AntdButton onClick={props.onReset} title={'重置'}>
@@ -37,7 +37,7 @@ export const SettingsCard: React.FC<SettingsCardProps> = (props) => {
<Icon component={IconOxygenSave} />
</AntdButton>
</Permission>
) : undefined}
)}
</FlexBox>
<LoadingMask
maskContent={<AntdSkeleton active paragraph={{ rows: 6 }} />}