文章目录
Excel样式
1.导入
<script type="text/javascript" src="xlsx.core.min.js"></script>
或
yarn add xlsx
import XLSX from 'xlsx'
2.上传本地文件
const File = function () {
var that;
var obj = function () {
that = this;
window.addEventListener("load", that._init, false);
}
obj.prototype = {
upload: function (options) {
that._initByOptions(options);
that.fileInput.click();
},
_initByOptions: function (options) {
that.fileInput.value = "";
that.options = {
multi: false,
url: "",
accept: "",
param: null,
uploadType:'',
before: function ()