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