jspdf-autotable将不会填充数据

时间:2019-03-10 20:08:27

标签: vue.js jspdf jspdf-autotable

我目前正在尝试使用jspdf-autotable从v-data-table生成数据pdf。 这是我要传递的标头:

headersPDF:[
            {title: "Title", datakey:"title"},
            {title: "Author", datakey:"author"},
            {title: "Description", datakey:"description"},
            {title: "Status", datakey: "status"},
            {title: "Media Type", datakey: "type"},
            {title: "Rating", datakey: "rating"},
            {title: "Private", datakey: "private"},
            {title: "Created By", datakey: "createdby"},
        ],

以下是传入数据的格式(来自chrome控制台): Data

这是我用来生成表格的代码:

createPDF(){
            var docu = new jsPDF();
            //used to create what is seen in the "data" screenshot
            let pds = this.simplifyProDevs()
            docu.autoTable(this.headersPDF, pds);
            docu.save('proDevs.pdf');
        },

0 个答案:

没有答案