http://pdfmake.org/playground.html
如果我在单元格中放置表格,则将第 3 行中的“text:3”插入到第 2 列 如果我在单元格中放置了文本,那么第 3 行中的“text:3”将插入到第 3 列中,所以它应该是这样。
为什么我不能将表格放在表格的单元格中并设置 rowSpan。 对不起我的英语。
var dd = { content: [
{
table: {
body: [
[{text:'11111'},{text:'222222'},{text:'333333'}], //row1
[ //row2
{ul: ['item 1','item 2']},
{
// text:'22'
table: {
body: [['Col1', 'Col2', 'Col3'],['1', '2', '3'],['1', '2', '3']]
}
,rowSpan:2
},
{text: "123123123"}
],
[{text:'1'},{text:'2'},{text:'3'}]
]
},
},
]}
尝试在同一个单元格中取消注释文本:'22'和注释表
最佳答案
请试试这个。希望对您有所帮助!
var dd = {
content: [
{
table: {
body: [
[{text:'11111'},{text:'222222'},{text:'333333'}], //row1
[ //row2
{ul: ['item 1','item 2']},
// updated here !
[
'22',
{
table: {
body: [
['Col1', 'Col2', 'Col3'],
['1', '2', '3'],
['1', '2', '3']]
},
rowSpan:2
}
],
{text: "123123123"}
],
[{text:'1'},{text:'2'},{text:'3'}]
]
},
},
]
}
关于javascript - 表中表pdfmake,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57216297/