问题修复
This commit is contained in:
parent
1a5cbe0951
commit
b5938e42bb
|
|
@ -162,7 +162,7 @@
|
||||||
>
|
>
|
||||||
<i class="el-icon-upload"></i>
|
<i class="el-icon-upload"></i>
|
||||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||||
<div class="el-upload__tip" slot="tip" style="color: red;">只能上传.xlsx文件</div>
|
<div class="el-upload__tip" slot="tip" style="color: red;">只能上传.xls或.xlsx文件</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
@ -674,8 +674,8 @@ export default {
|
||||||
},
|
},
|
||||||
beforeUpload(file) {
|
beforeUpload(file) {
|
||||||
const fileType = file.name.split('.').pop().toLowerCase();
|
const fileType = file.name.split('.').pop().toLowerCase();
|
||||||
if (fileType!== 'xlsx') {
|
if (fileType!== 'xls' && fileType!== 'xlsx') {
|
||||||
this.$message.error('只能上传 Excel 文件(.xlsx)');
|
this.$message.error('只能上传 Excel 文件(.xls 或 .xlsx)');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue