feat(P4): precompute移植+app.js sources双向回填+回归1003/1003+验收体积/文件/data.json
Deploy to GitHub Pages / deploy (push) Failing after 16s
Regression / regression (push) Failing after 15m2s

This commit is contained in:
aurora-admin
2026-09-12 14:18:41 +08:00
parent 16f365a045
commit c65a69c34e
401 changed files with 22932 additions and 140 deletions
+54
View File
@@ -0,0 +1,54 @@
import React, { useState } from 'react';
import './ExpandableTable.css';
export default function ExpandableTable({ data = [], columns = [], idKey = 'id' }) {
const [openSet, setOpenSet] = useState({});
const toggle = (id) => setOpenSet((s) => ({ ...s, [id]: !s[id] }));
return (
<table className="aa-exptable">
<thead>
<tr>
<th style={{ width: 40 }} />
{columns.map((c) => (
<th key={c.key}>{c.title}</th>
))}
</tr>
</thead>
<tbody>
{data.map((row) => (
<React.Fragment key={row[idKey]}>
<tr className="aa-row">
<td>
<button
className={'aa-exp-toggle' + (openSet[row[idKey]] ? ' is-open' : '')}
onClick={() => toggle(row[idKey])}
>
▶
</button>
</td>
{columns.map((c) => (
<td key={c.key}>{row[c.key]}</td>
))}
</tr>
{openSet[row[idKey]] && (
<tr className="aa-exp-row">
<td />
<td colSpan={columns.length}>
<div className="aa-exp-panel">
<div>备注:{row.detail.note}</div>
<div className="aa-exp-sub">
{row.detail.items.map((it, i) => (
<div key={i}>· {it}</div>
))}
</div>
</div>
</td>
</tr>
)}
</React.Fragment>
))}
</tbody>
</table>
);
}