序号按当前筛选范围的位置计算,不写业务记录或改变导出字段。 后台续载和虚拟滚动沿用绝对索引,空结果/占位行同步列数。 验证:序号首列/连续性/占位与aria行数红绿通过;完整本地门禁及原生备份恢复通过。
This commit is contained in:
@@ -97,6 +97,7 @@ const QARow = memo(
|
||||
if (!(event.target as HTMLElement).closest('button,a,input,select,textarea,summary')) onSelect(item.id)
|
||||
}}
|
||||
>
|
||||
<td className="qa-ops-index">{rowIndex - 1}</td>
|
||||
{qaColumns.map(({ key }) => (
|
||||
<td
|
||||
key={key}
|
||||
@@ -237,9 +238,10 @@ export function QAOperationsView(props: ViewProps) {
|
||||
<table
|
||||
className="qa-ops-table"
|
||||
aria-rowcount={items.length + 1}
|
||||
style={{ width: qaColumns.reduce((sum, c) => sum + ledgerColumnWidth(c.key), 160) }}
|
||||
style={{ width: qaColumns.reduce((sum, c) => sum + ledgerColumnWidth(c.key), 224) }}
|
||||
>
|
||||
<colgroup>
|
||||
<col style={{ width: 64 }} />
|
||||
{qaColumns.map((c) => (
|
||||
<col key={c.key} style={{ width: ledgerColumnWidth(c.key) }} />
|
||||
))}
|
||||
@@ -247,6 +249,9 @@ export function QAOperationsView(props: ViewProps) {
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" className="qa-ops-index">
|
||||
序号
|
||||
</th>
|
||||
{columns.map(({ key, label }) => (
|
||||
<th key={key}>
|
||||
{props.onFiltersChange && editableFieldKeys.includes(key as EditableField) ? (
|
||||
@@ -267,14 +272,14 @@ export function QAOperationsView(props: ViewProps) {
|
||||
<tbody>
|
||||
{!items.length && page && !props.loading && !props.error ? (
|
||||
<tr>
|
||||
<td colSpan={columns.length + 1} className="qa-ops-empty">
|
||||
<td colSpan={columns.length + 2} className="qa-ops-empty">
|
||||
没有符合条件的问答,请调整表头筛选、时间范围或关键词。
|
||||
</td>
|
||||
</tr>
|
||||
) : null}
|
||||
{visible.padTop > 0 ? (
|
||||
<tr aria-hidden="true" className="qa-ledger-spacer">
|
||||
<td colSpan={columns.length + 1} style={{ height: visible.padTop }} />
|
||||
<td colSpan={columns.length + 2} style={{ height: visible.padTop }} />
|
||||
</tr>
|
||||
) : null}
|
||||
{items.slice(visible.start, visible.end).map((item, index) => {
|
||||
@@ -292,7 +297,7 @@ export function QAOperationsView(props: ViewProps) {
|
||||
})}
|
||||
{visible.padBottom > 0 ? (
|
||||
<tr aria-hidden="true" className="qa-ledger-spacer">
|
||||
<td colSpan={columns.length + 1} style={{ height: visible.padBottom }} />
|
||||
<td colSpan={columns.length + 2} style={{ height: visible.padBottom }} />
|
||||
</tr>
|
||||
) : null}
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user