打印的data:
<template>
<div class="index">
<input type="file" @change="importFile(this)" id="imFile" style="display: none"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"/>
<Button type="primary" @click="uploadFile">导入</Button>
</div>
</template>
<script>
// 引入xlsx
var XLSX = require("xlsx");
export default {
name: "Index",
data() {
return {
fullscreenLoading: false, // 加载中
imFile: "", // 导入文件el
errorMsg: "", // 错误信息内容
};
},
mounted()