diff --git a/src/react/AudioPlayer/index.tsx b/src/react/AudioPlayer/index.tsx index b1c0920..99692c2 100644 --- a/src/react/AudioPlayer/index.tsx +++ b/src/react/AudioPlayer/index.tsx @@ -1,5 +1,5 @@ -import { ActionIcon, type ActionIconProps, Icon, Tag } from '@lobehub/ui'; -import { Dropdown, Slider } from 'antd'; +import { ActionIcon, type ActionIconProps, Tag } from '@lobehub/ui'; +import { Slider } from 'antd'; import { Download, PauseCircle, Play, StopCircle } from 'lucide-react'; import { type CSSProperties, memo, useCallback, useMemo } from 'react'; import { Flexbox } from 'react-layout-kit'; @@ -31,6 +31,7 @@ export interface AudioPlayerProps { onPause?: () => void; onPlay?: () => void; onStop?: () => void; + showDonload?: boolean; showSlider?: boolean; showTime?: boolean; style?: CSSProperties; @@ -60,6 +61,7 @@ const AudioPlayer = memo( stop: () => {}, }, allowPause = true, + showDonload = true, buttonActive, timeType = 'left', showSlider = true, @@ -115,7 +117,7 @@ const AudioPlayer = memo( className={className} gap={8} horizontal - style={{ paddingRight: 8, width: '100%', ...style }} + style={{ width: '100%', ...style }} >
( /> )} {showTime && ( - , - onClick: download, - }, - ], - }} - placement="top" - > - - + + )} + {!isLoading && showDonload && ( + )} );