1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-09-10 05:31:08 +08:00

Update index.vue

复用此组件时因为id不可重复的问题会导致onSuccess指向错误。
This commit is contained in:
zhaoguoweiLLHC 2018-09-27 12:50:13 +08:00 committed by GitHub
parent b2c9eb4f7b
commit 1e65175152
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
<template>
<div>
<input class="excel-upload-input" ref="excel-upload-input" type="file" accept=".xlsx, .xls" @change="handleClick">
<input ref="excel-upload-input" class="excel-upload-input" type="file" accept=".xlsx, .xls" @change="handleClick">
<div class="drop" @drop="handleDrop" @dragover="handleDragover" @dragenter="handleDragover">
Drop excel file here or
<el-button :loading="loading" style="margin-left:16px;" size="mini" type="primary" @click="handleUpload">Browse</el-button>
@ -56,7 +56,6 @@ export default {
e.dataTransfer.dropEffect = 'copy'
},
handleUpload() {
// document.getElementById('excel-upload-input').click()
// onSuccess
// idididrefsclass
this.$refs['excel-upload-input'].click();