[問題] Vue寫tableExport問題詢問

作者: aa12783509 (Ace)   2019-02-15 13:32:35
目前在寫vue想要將Table(.bootstrapTable生成的)匯出Excel來
使用tableExport的時候有遇到一些小問題
javascript:
<script src="Scripts/tableExport.min.js"></script>
網頁的地方放入button:
<button v-on:click="click" class="btn btn-danger">匯出檔案</button>
在vue底下建立click事件:
1.
$('#table').tableExport();
2.
$('#table').tableExport({ type: 'excel', escape: 'false', fileName: sTitle +
getToday(), formats: ["xlsx"], });
3.
$("#table").tableExport({
headings: true,
footers: true,
formats: ["xls"],
fileName: sTitle + getToday(),
bootstrap: true,
position: "top",
ignoreRows: null,
ignoreCols: null,
ignoreCSS: ".tableexport-ignore",
emptyCSS: ".tableexport-empty",
trimWhitespace: false,
});
作者: CloudyWing (孤單ㄉ翼)   2019-02-15 22:10:00
有載入xlsx.core.js和FileSaver.js嗎?題外話Excel可以開html和csv檔案,有些系統會html用改副檔名,匯出假Excel,副檔名和實際格式是兩回事

Links booklink

Contact Us: admin [ a t ] ucptt.com