Compare commits

..

No commits in common. "master" and "2.1.7" have entirely different histories.

2 changed files with 5 additions and 14 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@bytedo/fetch",
"version": "2.1.8",
"version": "2.1.7",
"description": "全新的ajax封装。分2个版本, 一个基于XMLHttpRequest, 一个基于window.fetch",
"main": "dist/next.js",
"files": [

View File

@ -84,17 +84,13 @@ export const Format = {
mkFormData(data) {
let form = new FormData()
for (let i in data) {
let val = data[i]
if (val === void 0) {
val = ''
}
if (Array.isArray(val)) {
val.forEach(function (it) {
let el = data[i]
if (Array.isArray(el)) {
el.forEach(function (it) {
form.append(i + '[]', it)
})
} else {
form.append(i, val)
form.append(i, data[i])
}
}
return form
@ -109,11 +105,6 @@ export const Format = {
if (/native code/.test(v)) {
return
}
if (v === void 0) {
v = ''
}
let _type = getType(v)
v = typeof v === 'function' ? v() : v