[问题] 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