fix: audio uploader has cache issue

This commit is contained in:
jialin
2025-06-23 16:25:22 +08:00
parent fd3d7a6f29
commit 547f49a978
11 changed files with 35 additions and 61 deletions
@@ -1,7 +1,7 @@
import IconFont from '@/components/icon-font';
import { ClearOutlined, RightOutlined } from '@ant-design/icons';
import { RightOutlined } from '@ant-design/icons';
import { useIntl } from '@umijs/max';
import { Button, Checkbox, Tooltip } from 'antd';
import { Button, Checkbox } from 'antd';
import _ from 'lodash';
import React from 'react';
@@ -77,36 +77,12 @@ const HeaderPrefix: React.FC<HeaderPrefixProps> = (props) => {
expandable
)}
</span>
<Tooltip
destroyTooltipOnHide
fresh={true}
defaultOpen={false}
title={
indeterminate && (
<Button
size="small"
type="text"
variant="filled"
color="default"
icon={<ClearOutlined />}
onClick={handleUnCheckAll}
>
{intl.formatMessage({ id: 'common.button.clearSelection' })}
</Button>
)
}
overlayClassName="light-downloading-tooltip"
overlayInnerStyle={{
backgroundColor: 'var(--color-spotlight-bg)'
}}
>
<Checkbox
onChange={onSelectAll}
indeterminate={indeterminate}
checked={selectAll}
disabled={disabled}
></Checkbox>
</Tooltip>
<Checkbox
onChange={onSelectAll}
indeterminate={indeterminate}
checked={selectAll}
disabled={disabled}
></Checkbox>
</div>
);
}
+4 -6
View File
@@ -20,12 +20,10 @@ const UploadAudio: React.FC<UploadAudioProps> = (props) => {
return false;
};
const handleOnChange = React.useCallback(
(data: { file: any; fileList: any }) => {
props.onChange?.(data);
},
[]
);
const handleOnChange = (data: { file: any; fileList: any }) => {
props.onChange?.(data);
};
return (
<Tooltip
overlayInnerStyle={{ maxWidth: 290, width: 'max-content' }}