feat: 完成网站前端的基本建设

- 网站内容展示:首页, 产品页, 解决方案, 联系信息等
- 网站跳转逻辑:通过Vue-Router实现路由跳转
- 后端通信: 通过Nuxt Strapi与后端Strapi服务进行通信
This commit is contained in:
2025-09-06 15:59:52 +08:00
parent 6470da9792
commit f957adfa5d
52 changed files with 3358 additions and 92 deletions

12
app/utils/file.ts Normal file
View File

@ -0,0 +1,12 @@
export function formatFileSize(sizeInKB: number): string {
if (sizeInKB < 1024) {
return `${sizeInKB.toFixed(2)} KB`;
} else {
const sizeInMB = sizeInKB / 1024;
return `${sizeInMB.toFixed(2)} MB`;
}
}
export function formatFileExtension(ext: string): string {
return ext.startsWith('.') ? ext.slice(1).toUpperCase() : ext.toUpperCase();
}