Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
admin-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pleroma
admin-fe
Commits
afe975b3
Commit
afe975b3
authored
6 years ago
by
Pan
Browse files
Options
Downloads
Patches
Plain Diff
fix[UploadExcel]: fix can't select the same excel
parent
d0eebf83
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/UploadExcel/index.vue
+3
-1
3 additions, 1 deletion
src/components/UploadExcel/index.vue
with
3 additions
and
1 deletion
src/components/UploadExcel/index.vue
+
3
−
1
View file @
afe975b3
<
template
>
<div>
<input
id=
"excel-upload-input"
type=
"file"
accept=
".xlsx, .xls"
class=
"c-hide"
@
change=
"handkeFileChange"
>
<input
id=
"excel-upload-input"
ref=
"excel-upload-input"
type=
"file"
accept=
".xlsx, .xls"
class=
"c-hide"
@
change=
"handkeFileChange"
>
<div
id=
"drop"
@
drop=
"handleDrop"
@
dragover=
"handleDragover"
@
dragenter=
"handleDragover"
>
Drop excel file here or
<el-button
style=
"margin-left:16px;"
size=
"mini"
type=
"primary"
@
click=
"handleUpload"
>
browse
</el-button>
...
...
@@ -51,7 +51,9 @@ export default {
handkeFileChange
(
e
)
{
const
files
=
e
.
target
.
files
const
itemFile
=
files
[
0
]
// only use files[0]
if
(
!
itemFile
)
return
this
.
readerData
(
itemFile
)
this
.
$refs
[
'
excel-upload-input
'
].
value
=
null
// fix can't select the same excel
},
readerData
(
itemFile
)
{
const
reader
=
new
FileReader
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment