Different width for each columns in jspdf autotable?

前端 未结 4 1649
谎友^
谎友^ 2021-01-01 18:06

My table has 13 columns. How can I get different width for each column? Can I give each column width like this?

styles: {overflow: \'linebreak\' ,columnWidt

4条回答
  •  自闭症患者
    2021-01-01 18:50

    By default the 'columnsStyles' dont have in 'Options', that's necessary create it and next step you define the 'columnWidth'.

    Options['columnStyles'] = {
      0: {columnWidth: 50},
      1: {columnWidth: 'auto'},
      2: {columnWidth: 'wrap'},
      3: {columnWidth: 150}
    }
    JSPDF.autoTable(columns, values, Options)
    

提交回复
热议问题