真小仙 2024-08-16 15:11 采纳率: 0%
浏览 40

导出excel出问题

img

 IVue warnl:Error in y-on handler:"TypeError:jszip is not a constructor  X                                                                                          emv.js:1
 found in
   一QuotationSheet> at sre/views/QuotationSheet.wue
        (App>atsrc/App.ue
          (Root>
  TypeError:jszip is not a constructor                                                                                        env.is:1 
     atwrite_ziD(x1sx.js:11654:1
     atwite_zip_type(x1sxis:11770:1)
     at Object.writeSmnc [as write](xlsx.is:11784:1
     at WueComponent.sheet2blob(QuotationSheet.e:323:1
     atWueComponent.setExport2Excel(QuotationSheet.wue:288:1)
     at invokewithErrorHandling(wie.runtine.esmjs:3033:1)
     atHTMIButtonElement.inyoker(wae.runtime.esmjs:1832:1
     at original_1._wrapper(vie.runtime.esmjs:7500:1)
     atHTLButtonElement.i(env.is:1:852
                                                                                          CSDN@真小仙

导出excel出问题

  • 写回答

2条回答 默认 最新

  • 一直免费一直爽 2024-08-16 15:12
    关注

    以下回复参考:皆我百晓生券券喵儿等免费微信小程序作答:

    根据给定的错误信息,可以看出问题出在jszip不是一个构造函数。这可能是因为jszip库没有正确导入或者与其他库冲突导致的。为了解决这个问题,你可以尝试以下方法:

    1. 确保你已经安装了jszip库,可以使用以下命令进行安装:
    npm install jszip
    
    1. 在你的项目中正确导入jszip库。在QuotationSheet.vue文件的顶部添加以下代码:
    import JSZip from 'jszip';
    
    1. 如果问题仍然存在,尝试检查你的项目中是否有其他库与jszip冲突。如果有冲突,你可以考虑使用不同版本的库或者寻找替代方案。
    评论

报告相同问题?

问题事件

  • 创建了问题 8月16日