🎉 重构传输模块.

This commit is contained in:
lijiahangmax
2025-06-28 01:23:53 +08:00
parent 49a0b6786e
commit 9a7cfc4061
15 changed files with 427 additions and 391 deletions

View File

@@ -41,6 +41,17 @@ export function readFileText(e: File, encoding = 'UTF-8'): Promise<string> {
});
}
// 关闭 fileReader
export function closeFileReader(reader: FileReader) {
// 清理资源
if (reader.readyState === FileReader.LOADING) {
reader.abort();
}
reader.onload = null;
reader.onerror = null;
reader.onabort = null;
}
/**
* 解析路径类型
*/