feat:员工管理上传formdata格式
This commit is contained in:
parent
94b4ae2125
commit
3316cfafdb
@ -187,9 +187,11 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 上传文件
|
// 上传文件
|
||||||
async handleChange (file) {
|
async handleChange (file) {
|
||||||
|
console.log('file: ', file)
|
||||||
let data = new FormData()
|
let data = new FormData()
|
||||||
data.append('filename', file)
|
data.append('filename', file.raw)
|
||||||
this.isUploading = true
|
this.isUploading = true
|
||||||
|
// return
|
||||||
let result = await apiUploadFile(data)
|
let result = await apiUploadFile(data)
|
||||||
this.isUploading = false
|
this.isUploading = false
|
||||||
if (result.code === 0) {
|
if (result.code === 0) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user