获取后缀

  // 获取后缀
  format(temp) {
    let index = temp.lastIndexOf('.')
    let format = temp.substring(index + 1)
    return format
  }
原文地址:https://www.cnblogs.com/cap-rq/p/12918262.html