使用延时加同步方法解决
beforeupload(file) {
console.log(file)
const that = this
setTimeout(async() => {
await that.$message({ type: 'success', message: file.name })
// Message({
// message: file.name,
// type: 'error'
// })
})
// 重点是 setTimeout async await
// this.$message({ type: 'success', message: file.name })
}