封装FormData export const toFormData = (values) => { const formData = new FormData(); if (values instanceof Object) { Object.keys(values).forEach((key) => { formData.append(key, values[key]); }); } return formData; };