记录一下在vue3项目中使用xlsx导出excel时报错:
TypeError: Cannot read properties of undefined (reading ‘utils’)
解决方案:
修改引用方式,将import XLSX from ‘xlsx’ 改成 import * as XLSX from ‘xlsx’
记录一下在vue3项目中使用xlsx导出excel时报错:
TypeError: Cannot read properties of undefined (reading ‘utils’)
解决方案:
修改引用方式,将import XLSX from ‘xlsx’ 改成 import * as XLSX from ‘xlsx’