Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
4d2fac6f
Commit
4d2fac6f
authored
Sep 16, 2017
by
thegatheringstorm
Committed by
杨奕
Sep 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload: convert var to const and let
parent
6e3f46a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
packages/upload/src/index.vue
packages/upload/src/index.vue
+9
-9
No files found.
packages/upload/src/index.vue
View file @
4d2fac6f
...
...
@@ -139,13 +139,13 @@ export default {
this
.
onChange
(
file
,
this
.
uploadFiles
);
},
handleProgress
(
ev
,
rawFile
)
{
var
file
=
this
.
getFile
(
rawFile
);
const
file
=
this
.
getFile
(
rawFile
);
this
.
onProgress
(
ev
,
file
,
this
.
uploadFiles
);
file
.
status
=
'
uploading
'
;
file
.
percentage
=
ev
.
percent
||
0
;
},
handleSuccess
(
res
,
rawFile
)
{
var
file
=
this
.
getFile
(
rawFile
);
const
file
=
this
.
getFile
(
rawFile
);
if
(
file
)
{
file
.
status
=
'
success
'
;
...
...
@@ -156,8 +156,8 @@ export default {
}
},
handleError
(
err
,
rawFile
)
{
var
file
=
this
.
getFile
(
rawFile
);
var
fileList
=
this
.
uploadFiles
;
const
file
=
this
.
getFile
(
rawFile
);
const
fileList
=
this
.
uploadFiles
;
file
.
status
=
'
fail
'
;
...
...
@@ -171,13 +171,13 @@ export default {
file
=
this
.
getFile
(
raw
);
}
this
.
abort
(
file
);
var
fileList
=
this
.
uploadFiles
;
let
fileList
=
this
.
uploadFiles
;
fileList
.
splice
(
fileList
.
indexOf
(
file
),
1
);
this
.
onRemove
(
file
,
fileList
);
},
getFile
(
rawFile
)
{
var
fileList
=
this
.
uploadFiles
;
var
target
;
let
fileList
=
this
.
uploadFiles
;
let
target
;
fileList
.
every
(
item
=>
{
target
=
rawFile
.
uid
===
item
.
uid
?
item
:
null
;
return
!
target
;
...
...
@@ -209,7 +209,7 @@ export default {
},
render
(
h
)
{
var
uploadList
;
let
uploadList
;
if
(
this
.
showFileList
)
{
uploadList
=
(
...
...
@@ -223,7 +223,7 @@ export default {
);
}
var
uploadData
=
{
const
uploadData
=
{
props
:
{
type
:
this
.
type
,
drag
:
this
.
drag
,
...
...
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