-
字符串
var array = new FormData();array.append(“name”,张三)
-
数组
new FormData传递参数为数组时,
form:{
leaf_system_pat:[]
}
form.append(‘leaf_system_pat’,this.form.leaf_system_pat);
leaf_system_pat为数组,会变为[object,object ]使用JSON.stringify转化一下即可:
form.append(‘leaf_system_pat’,JSON.stringify(this.form.leaf_system_pat))
new FormData传递参数为数组
于 2022-12-05 18:00:36 首次发布