feat: 新增 CSV、XLSX、XLS 文件类型解析支持

This commit is contained in:
begoniezhao
2025-11-19 17:27:17 +08:00
parent 3a2c86df5b
commit 587d1b2bd3
7 changed files with 118 additions and 2 deletions

View File

@@ -23,7 +23,7 @@ export function formatStringDate(date: any) {
);
}
export function kbFileTypeVerification(file: any) {
let validTypes = ["pdf", "txt", "md", "docx", "doc", "jpg", "jpeg", "png"];
let validTypes = ["pdf", "txt", "md", "docx", "doc", "jpg", "jpeg", "png", "csv", "xlsx", "xls"];
let type = file.name.substring(file.name.lastIndexOf(".") + 1);
if (!validTypes.includes(type)) {
MessagePlugin.error("文件类型错误!");