hookehuyr

feat(音频上传): 扩展支持的音频格式列表

添加对 .flac, .ogg, .wma, .m4a 格式的支持,以兼容更多音频文件类型
......@@ -595,7 +595,7 @@ const getAcceptType = () => {
const acceptMap = {
'image': 'image/*',
'video': 'video/*',
'audio': '.mp3,.wav,.aac'
'audio': '.mp3,.wav,.aac,.flac,.ogg,.wma,.m4a'
}
return acceptMap[activeType.value] || '*'
}
......@@ -608,7 +608,7 @@ const getUploadTips = () => {
const tipsMap = {
'image': '支持格式:jpg/jpeg/png',
'video': '支持格式:视频文件',
'audio': '支持格式:.mp3/.wav/.aac 音频文件'
'audio': '支持格式:.mp3/.wav/.aac/.flac/.ogg/.wma/.m4a 音频文件'
}
return tipsMap[activeType.value] || ''
}
......@@ -825,7 +825,7 @@ const onClickPreview = (file, detail) => {
* @returns {boolean}
*/
const isAudioFile = (fileName) => {
const audioExtensions = ['.mp3', '.wav', '.ogg', '.aac', '.m4a', '.flac']
const audioExtensions = ['.mp3', '.wav', '.ogg', '.aac', '.m4a', '.flac', '.wma']
return audioExtensions.some(ext => fileName.toLowerCase().includes(ext))
}
......