tusen-ai / naive-ui

A Vue 3 Component Library. Fairly Complete. Theme Customizable. Uses TypeScript. Fast.
https://www.naiveui.com
MIT License
16.01k stars 1.67k forks source link

fix: 修复文件夹上传每次只上传文件夹中100个文件的bug #6028

Closed x-carrier closed 2 months ago

x-carrier commented 3 months ago

readEntries 每次调用最多返回 100 个条目。这是设计使然,目的是在处理可能非常大的目录时,不会导致内存溢出或性能问题。因此,每次调用 readEntries 时,它会返回 0 到 100 个条目。如果目录中的条目超过 100 个,需要多次调用 readEntries 来获取下一批条目。

close https://github.com/tusen-ai/naive-ui/issues/6027

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
naive-ui ❌ Failed (Inspect) Jul 20, 2024 2:35pm
07akioni commented 2 months ago

还有这种幺蛾子?

有什么 specification 能看到这个表现吗?

07akioni commented 2 months ago

学到了

x-carrier commented 2 months ago

还有这种幺蛾子?

有什么 specification 能看到这个表现吗? 在这可以看到 https://developer.mozilla.org/zh-CN/docs/Web/API/FileSystemDirectoryReader/readEntries image

07akioni commented 2 months ago

这 PR 改的 TS 编译没过

Type checking in this PR is not passed.

07akioni commented 2 months ago

还有一点就是 try catch 也被删掉了,其实最好不要这样,修 bug 的时候尽量不要影响原有表现。

Also, try catch is deleted. It would be better not doing so. When fixing bugs, try not to influence the original behavior.