Visualforce 页面:表格不会在跨行单元格上添加分页符

问题描述 投票:0回答:1

我遇到了与此问题相关的相同问题:table rowspan page break

在我的 Visualforce 页面中,我的 html 表有一列带有自定义行跨度(取决于行跨度的数量)并且我遇到了样式问题(请参阅绿色方块中的问题): enter image description here

enter image description here

我正在使用样式为 page-break-before: auto 和动态 rowspan(取决于业务逻辑)的 tr

我尝试在 rowspanned tr 中使用 apge-break-inside,但没有结果。

html css html-table visualforce page-break
1个回答
0
投票

我通过在主表内的行中添加内部表而不是在“tr”中使用 rowspan 属性并且不使用分页符来解决我的问题:

 <table class="general">
    <thead style="display: table-header-group; valign: top">
    .
    .
    .
    </thead>
    <tbody>
        <apex:repeat value="{!VALUE}" var="VAR">
        <tr>
            <td>
                <apex:outputText escape="false" value="{!VALUE}" />
            </td>
            <td>
            <table>
            <apex:repeat value="{!VALUE}" var="VAR">
            <tr>
                    <td>
                        <apex:outputText escape="false" value="{!value}" />
                    </td>
             </tr>
             </apex:repeat>
             </table>
        </tr>
    </tbody>
© www.soinside.com 2019 - 2024. All rights reserved.