mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-25 16:16:20 +08:00
fix(axios): 非GET请求时增加判断config.data是否为FormData (#2082)
This commit is contained in:
@@ -111,7 +111,7 @@ const transform: AxiosTransform = {
|
||||
} else {
|
||||
if (!isString(params)) {
|
||||
formatDate && formatRequestDate(params);
|
||||
if (Reflect.has(config, 'data') && config.data && Object.keys(config.data).length > 0) {
|
||||
if (Reflect.has(config, 'data') && config.data && (Object.keys(config.data).length > 0 || config.data instanceof FormData)) {
|
||||
config.data = data;
|
||||
config.params = params;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user