/**
 * created by wbz20
 * on 2018/12/26
 * */

const typeTextMap = {
  'image/*': '图片',
  'image/png': 'PNG',
  'image/jpeg': 'JPEG',
  'image/jpg': 'JPG',
  'application/pdf': 'PDF',
  'application/vnd.ms-excel': 'EXCEL',
  'application/msword': 'WORD',
}
// 文件格式转为提示文字
export default function fileTypeText (fileType) {
  const types = fileType.split(',')
  return types.map(item => typeTextMap[item.trim()] || item).join(' / ')
}
