2017-04-11 21 views
0

我正在尋找保存表中選定的一組行。另存爲功能給我這個錯誤:未捕獲的ReferenceError:JSZip沒有定義 我已在FileSaver.js,我甚至更新它作爲https://github.com/eligrey/FileSaver.js/blob/master/FileSaver.jsUncaught ReferenceError:JSZip未定義

有人可以幫助我的是什麼問題呢?我有什麼不同的做法可以將行導出爲ex​​cel?我正在使用參數查詢

   {               
       type: 'button', 
       label: "Export", 
       icon: "ui-icon-arrowthickstop-1-s", 

       listener: function() { 

        //filter the selected rows. 
        this.filter({ 
         oper: 'replace', 
         data: [{ dataIndx: 'Selected', value: true, condition: 'equal' }] 
        }) 

        Blob = this.exportData({ 

         format: $("#export_format").val(), 
         zip: $("#export_zip").prop("checked"), 
         render: true 
        }); 

        //reset the filter. 
        this.filter({ 
         oper: 'replace', 
         data: [] 
        }) 

        if (typeof blob === "string") { 
         blob = new Blob([blob]); 
        } 
        saveAs(blob, "RollManager." + format); 

       } 
      } 

回答

1

您必須包含JSZip腳本。它應該在您的Paramquery文件中,例如「/jsZip-2.5.0/jszip.min.js」像這樣

<script type="text/javascript" src="[path to paramquery]/jsZip-2.5.0/jszip.min.js"></script> 
相關問題