|
@@ -13,7 +13,7 @@
|
|
|
>
|
|
|
<i class="el-icon-upload" />
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
- <div class="el-upload__tip" slot="tip">只能上传excel(.xls,.xlsm,.xlsx,.et)文件,且不超过1M</div>
|
|
|
+ <div class="el-upload__tip" slot="tip">只能上传 excel(.xls,.xlsm,.xlsx,.et) 文件,且不超过 1000 条</div>
|
|
|
</dg-upload>
|
|
|
<!-- <div v-footer>
|
|
|
<el-button @click="handleCancel">取消</el-button>
|
|
@@ -108,14 +108,10 @@ export default {
|
|
|
beforeUpload(file) {
|
|
|
const that = this;
|
|
|
const isExcel = [/.xls$/, /.xlsm$/, /.xlsx$/, /.et$/].some((item) => item.test(file.name));
|
|
|
- const isLt2M = file.size / 1024 / 1024 < 1;
|
|
|
if (!isExcel) {
|
|
|
- that.$message.error("只能上传文件只能是 excel 格式文件!");
|
|
|
+ that.$message.error("只能上传 excel 文件!");
|
|
|
}
|
|
|
- if (!isLt2M) {
|
|
|
- that.$message.error("上传文件大小不能超过 1MB!");
|
|
|
- }
|
|
|
- return isExcel && isLt2M;
|
|
|
+ return isExcel;
|
|
|
},
|
|
|
onClose() {
|
|
|
this.$emit("close");
|