Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-admin-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
najiu-frontend
najiu-admin-template
Commits
c4b22a22
Commit
c4b22a22
authored
Jun 23, 2021
by
Vben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(upload): make sure to carry custom parameters, fix #802
parent
60b80c96
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
9 additions
and
3 deletions
+9
-3
.gitignore
.gitignore
+2
-1
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+1
-0
Axios.ts
src/utils/http/axios/Axios.ts
+6
-2
11.jpg
tests/server/static/upload/11.jpg
+0
-0
5ab46a3cN616bdc41.jpg
tests/server/static/upload/5ab46a3cN616bdc41.jpg
+0
-0
5ac1bf5fN2522b9dc.jpg
tests/server/static/upload/5ac1bf5fN2522b9dc.jpg
+0
-0
5c9ccca8a27f0.png
tests/server/static/upload/5c9ccca8a27f0.png
+0
-0
5c9ccca8b27f1.jpg
tests/server/static/upload/5c9ccca8b27f1.jpg
+0
-0
5c9ccca8bc1e0.png
tests/server/static/upload/5c9ccca8bc1e0.png
+0
-0
No files found.
.gitignore
View file @
c4b22a22
...
@@ -4,7 +4,8 @@ dist
...
@@ -4,7 +4,8 @@ dist
.npmrc
.npmrc
.cache
.cache
test/server/static
tests/server/static
tests/server/static/upload
.local
.local
# local env files
# local env files
...
...
CHANGELOG.zh_CN.md
View file @
c4b22a22
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
### 🐛 Bug Fixes
### 🐛 Bug Fixes
-
**Table**
修复分页抖动问题
-
**Table**
修复分页抖动问题
-
**Upload**
确保携带自定义参数
## 2.5.0(2021-06-20)
## 2.5.0(2021-06-20)
...
...
src/utils/http/axios/Axios.ts
View file @
c4b22a22
...
@@ -5,7 +5,7 @@ import axios from 'axios';
...
@@ -5,7 +5,7 @@ import axios from 'axios';
import
qs
from
'
qs
'
;
import
qs
from
'
qs
'
;
import
{
AxiosCanceler
}
from
'
./axiosCancel
'
;
import
{
AxiosCanceler
}
from
'
./axiosCancel
'
;
import
{
isFunction
}
from
'
/@/utils/is
'
;
import
{
isFunction
}
from
'
/@/utils/is
'
;
import
{
cloneDeep
}
from
'
lodash-es
'
;
import
{
cloneDeep
,
omit
}
from
'
lodash-es
'
;
import
{
ContentTypeEnum
}
from
'
/@/enums/httpEnum
'
;
import
{
ContentTypeEnum
}
from
'
/@/enums/httpEnum
'
;
import
{
RequestEnum
}
from
'
/@/enums/httpEnum
'
;
import
{
RequestEnum
}
from
'
/@/enums/httpEnum
'
;
...
@@ -136,8 +136,12 @@ export class VAxios {
...
@@ -136,8 +136,12 @@ export class VAxios {
formData
.
append
(
key
,
params
.
data
[
key
]);
formData
.
append
(
key
,
params
.
data
[
key
]);
});
});
}
}
formData
.
append
(
params
.
name
||
'
file
'
,
params
.
file
,
params
.
filename
);
formData
.
append
(
params
.
name
||
'
file
'
,
params
.
file
,
params
.
filename
);
const
customParams
=
omit
(
params
,
'
file
'
,
'
filename
'
,
'
file
'
);
Object
.
keys
(
customParams
).
forEach
((
key
)
=>
{
formData
.
append
(
key
,
customParams
[
key
]);
});
return
this
.
axiosInstance
.
request
<
T
>
({
return
this
.
axiosInstance
.
request
<
T
>
({
...
config
,
...
config
,
...
...
tests/server/static/upload/11.jpg
deleted
100644 → 0
View file @
60b80c96
215 KB
tests/server/static/upload/5ab46a3cN616bdc41.jpg
deleted
100644 → 0
View file @
60b80c96
114 KB
tests/server/static/upload/5ac1bf5fN2522b9dc.jpg
deleted
100644 → 0
View file @
60b80c96
405 KB
tests/server/static/upload/5c9ccca8a27f0.png
deleted
100644 → 0
View file @
60b80c96
2.68 KB
tests/server/static/upload/5c9ccca8b27f1.jpg
deleted
100644 → 0
View file @
60b80c96
37.8 KB
tests/server/static/upload/5c9ccca8bc1e0.png
deleted
100644 → 0
View file @
60b80c96
2.12 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment