mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-30 07:39:06 +08:00
refactor(useFiles): 将参数从布尔值改为对象以增强可扩展性
This commit is contained in:
parent
64ab5ce017
commit
8b17694cdf
@ -33,7 +33,7 @@ export const useFiles = (props?: Props) => {
|
||||
* 4. 当选择了不支持的文件类型时,会显示提示信息
|
||||
*/
|
||||
const onSelectFile = useCallback(
|
||||
async (multipleSelections: boolean = true): Promise<FileMetadata[]> => {
|
||||
async ({ multipleSelections = true }: { multipleSelections?: boolean }): Promise<FileMetadata[]> => {
|
||||
if (selecting) {
|
||||
return []
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user