import {
FilePdfOutlined,
FileWordOutlined,
FileExcelOutlined,
FilePptOutlined,
FileTextOutlined,
FileZipOutlined,
FileImageOutlined,
FileUnknownOutlined,
} from "@ant-design/icons";
export const isContentEmpty = (html: string) => {
// 创建一个临时 div 来解析 HTML 内容
const temp = document.createElement("div");
temp.innerHTML = html;
// 获取纯文本内容并检查是否为空
return !temp.textContent?.trim();
};
export const getFileIcon = (filename: string) => {
const extension = filename.split(".").pop()?.toLowerCase();
switch (extension) {
case "pdf":
return ;
case "doc":
case "docx":
return ;
case "xls":
case "xlsx":
return ;
case "ppt":
case "pptx":
return ;
case "txt":
return ;
case "zip":
case "rar":
case "7z":
return ;
case "png":
case "jpg":
case "jpeg":
case "gif":
case "webp":
return ;
default:
return ;
}
};