IE11遇到情况如下:
经过如此强大的.filter(item => item != null)处理之后:
完美!!!
IE导入EXCEL的readExcelIE方法,遇到这个鬼SHI大坑处理方法:
关键是这段代码:.filter(item => item != null),因为IE11大佬测试起来很卡,笔记本都发烫了蓝瘦香菇。。。搞了一晚终于可用纪念一哈。。。
for (let i of this.arrObj) { // if ([...Object.values(i)].filter(item => typeof item !== 'undefined').length) { if ([...Object.values(i)].filter(item => item != null).length) { const _dataRow = {} this.arrCheckAll.forEach(item => { _dataRow[item['key']] = i[item[this.browser]] }) this.infoTable.push(_dataRow) } } // this.arrObj = this.arrObj.filter(itemA => [...Object.values(itemA)].filter(itemB => typeof itemB !== 'undefined').length > 0) this.arrObj = this.arrObj.filter(itemA => [...Object.values(itemA)].filter(itemB => itemB != null).length > 0)