功能优化:跨平台文件大小计算支持
- 新增跨平台文件大小计算工具,支持Windows/macOS/Linux - Windows使用1024进制,macOS/Linux使用1000进制 - 优化光盘类型配置,自动适配不同操作系统 - 更新文件大小格式化函数,确保跨平台一致性 - 添加测试工具和详细文档说明
This commit is contained in:
@@ -129,44 +129,9 @@ const CDTypes = {
|
||||
6: 'BD_TL',
|
||||
7: 'BD_QL'
|
||||
}
|
||||
const size = 1024
|
||||
const cd_types = [
|
||||
{
|
||||
value: 1,
|
||||
label: 'CD 700MB',
|
||||
size: 700 * size * size
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'DVD 4.7GB',
|
||||
size: 4.7 * size * size * size
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'DVD_DL 8.5GB',
|
||||
size: 8.5 * size * size * size
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: 'BD 25GB',
|
||||
size: 25 * size * size * size
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: 'BD_DL 50GB',
|
||||
size: 50 * size * size * size
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: 'BD_TL 100GB',
|
||||
size: 100 * size * size * size
|
||||
},
|
||||
{
|
||||
value: 7,
|
||||
label: 'BD_QL 128GB',
|
||||
size: 128 * size * size * size
|
||||
}
|
||||
]
|
||||
// 使用跨平台文件大小计算
|
||||
const { getCurrentOSDiscTypes } = require('@/utils/fileSize')
|
||||
const cd_types = getCurrentOSDiscTypes()
|
||||
|
||||
const defaultData = {
|
||||
// 任务列表
|
||||
|
||||
Reference in New Issue
Block a user