export const presetTypeData = [ { title: '文档', key: 'documents', children: [ { key: 'pdf', title: 'PDF', types: ['.pdf'], color: 'red', }, { key: 'word', title: 'Word文档', types: ['.doc', '.docx'], color: 'blueDark', }, { key: 'excel', title: 'Excel工作簿', types: ['.xls', '.xlsx'], color: 'green600', }, { key: 'powerPoint', title: 'PowerPoint演示文稿', types: ['.ppt', '.pptx'], color: 'orangeDark', }, { key: 'textFile', title: '文本文件', types: ['.txt'], color: 'gray700', }, { key: 'richFile', title: '富文本格式', types: ['.rtf'], color: 'gray500', }, { key: 'csv', title: 'CSV', types: ['.csv'], color: 'green600', }, ], }, { title: '图片', key: 'images', children: [ { key: 'jpg', title: 'JPG', types: ['.jpg', '.jpeg'], color: 'img', }, { key: 'png', title: 'PNG', types: ['.png'], color: 'img', }, { key: 'gif', title: 'GIF', types: ['.gif'], color: 'img', }, { key: 'bmp', title: 'BMP', types: ['.bmp'], color: 'img', }, { key: 'tiff', title: 'TIFF', types: ['tif', '.tiff'], color: 'img', }, { key: 'svg', title: 'SVG', types: ['.svg'], color: 'img', }, { key: 'webp', title: 'WEBP', types: ['.webp'], color: 'img', }, ], }, { title: '音频', key: 'audio', children: [ { key: 'mp3', title: 'MP3', types: ['.mp3'], color: 'pink600', }, { key: 'wav', title: 'WAV', types: ['.wav'], color: 'pink600', }, { key: 'flac', title: 'FLAC', color: 'pink600', types: ['.flac'], }, { key: 'aac', title: 'AAC', color: 'pink600', types: ['.aac', '.m4a'], }, { key: 'ogg', title: 'OGG', types: ['.ogg'], color: 'pink600', }, ], }, { title: '视频', key: 'video', children: [ { key: 'mp4', title: 'MP4', types: ['.mp4'], color: 'blueDark', }, { key: 'avi', title: 'AVI', types: ['.avi'], color: 'blueDark', }, { key: 'mkv', title: 'MKV', types: ['.mkv'], color: 'blueDark', }, { key: 'mov', title: 'MOV', types: ['.mov'], color: 'blueDark', }, { key: 'wmv', title: 'WMV', types: ['.wmv'], color: 'blueDark', }, { key: 'flv', title: 'FLV', types: ['.flv'], color: 'blueDark', }, ], }, { title: '压缩文件', key: 'compressedFiles', children: [ { key: 'zip', title: 'ZIP', types: ['.zip'], color: 'gray700', }, { key: 'rar', title: 'RAR', types: ['.rar'], color: 'gray700', }, { key: '7z', title: '7Z', types: ['.7z'], color: 'gray700', }, { key: 'tar', title: 'TAR', types: ['.tar'], color: 'gray700', }, { key: 'gz', title: 'GZ', types: ['.gz'], color: 'gray700', }, ], }, ]; export const presetTypeTreeData = presetTypeData.map((item) => { return { label: item.title, key: item.key, value: item.key, children: item.children.map((i) => { return { label: `${i.title} (${i.types.join(',')})`, key: i.key, value: i.key, }; }), }; });