Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/393.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jspdf中的嵌套表_Javascript_Angular_Pdf_Jspdf_Jspdf Autotable - Fatal编程技术网

Javascript jspdf中的嵌套表

Javascript jspdf中的嵌套表,javascript,angular,pdf,jspdf,jspdf-autotable,Javascript,Angular,Pdf,Jspdf,Jspdf Autotable,我正在使用jspdf开发一个表。 我试着把自动表放在自动表中。 问题是表的行没有根据插入表的高度进行动态调整。 然后它重叠到下一行 这是我的密码 doc.autoTable({ html: '#table', theme:'grid', overflow: 'linebreak', bodyStyles: {lineColor:[0, 0, 0],

我正在使用jspdf开发一个表。 我试着把自动表放在自动表中。 问题是表的行没有根据插入表的高度进行动态调整。 然后它重叠到下一行

这是我的密码

doc.autoTable({ html: '#table', 
                      theme:'grid', 
                      overflow: 'linebreak',
                      bodyStyles: {lineColor:[0, 0, 0], 
                                   textColor:[0, 0, 0]}, 
                                   startX: 15, 
                                   startY: 50, 
                                   styles:{font:'noto'}, 
                                   headStyles : { halign: 'center', 
                                                  textColor: [0, 0, 0], 
                                                  fillColor:[255, 255, 255], 
                                                  lineWidth: 0.1, 
                                                  lineColor:[0, 0, 0]
                                                },
                      didDrawCell: function (data) {
                        if (data.cell.section === 'body' && data.column.index === 1 && data.row.index === 9) {
                          
                          document.getElementsByClassName("confluenceTable")[0].id = 'confluenceTable';
                          console.log("------test----")
                          console.log(document.getElementById("confluenceTable"))
                          data.cell.text = "";
                          doc.autoTable({
                                          html: '#confluenceTable', 
                                          theme:'grid', 
                                          overflow: 'linebreak',
                                          bodyStyles: {lineColor:[0, 0, 0],
                                                        textColor:[0, 0, 0]
                                                      },
                                          styles:{font:'noto'},
                                          startY: data.cell.y + 2,
                                          margin: {left: data.cell.x + data.cell.padding('left')},
                                          tableWidth: 'wrap',
                                        })
                        } 
                      },                     
                       didParseCell: function (data) {
                        if (data.cell.section === 'body' && data.column.index === 1 && data.row.index === 9) {
                          data.cell.text = "";
                        }
                      },  
                      // , columnStyles: {0: {fillColor: [212, 212, 212]}, tableLineColor: [0, 0, 0]}
                      });

这是我的结果