TypeError: this.$refs.excel-upload-input.click is not a function"
為什麼說不是函數
<el-input ref="excel-upload-input" class="excel-upload-input" type="file" accept=".xlsx, .xls" @change="handleClick"></el-input>
handleUpload() {
this.$refs['excel-upload-input'].click()
},
不能用el-input
<input ref="excel-upload-input" class="excel-upload-input" type="file" accept=".xlsx, .xls" @change="handleClick"></input>