beforeAvatarUpload(file) {
      let FileExt = file.name.replace(/.+\./, "").toLowerCase()
      let flag = ['doc','docx','xls','xlsx'].includes(FileExt)
      const isLt30M = file.size / 1024 / 1024 < 30
      if (!flag) this.$message.error('文件格式错误请重新上传!')
      if (!isLt30M) this.$message.error('上传的文件大小不能超过 30MB!')
      return flag && isLt30M
    }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
相关资源
相似解决方案