diff --git a/src/App.tsx b/src/App.tsx index 9a613925..f932e372 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1014,8 +1014,8 @@ export default function App() { 滚动条,而外面那层会把整个分栏一起推走。 */} {/* - 工具栏之下这一层。**滚动不在这儿** —— 请求页交给 `Split` - (分栏时两栏各滚各的),其余页面各自在自己的容器里滚。 + 工具栏之下这一层。**滚动不在这儿** —— 请求页在自己那一层里 + 横竖都滚,其余页面各自在自己的容器里滚。 在这儿再加一层滚动就是两层滚动条。 */}
{t.probesElsewhere(locallyAnswered)} diff --git a/src/traffic/RequestTable.tsx b/src/traffic/RequestTable.tsx index 1a8b7743..59557dc1 100644 --- a/src/traffic/RequestTable.tsx +++ b/src/traffic/RequestTable.tsx @@ -74,13 +74,21 @@ export function RequestTable({ }) { const t = useText(appText); return ( -
| ) {
+function Table({
+ className,
+ scroll = true,
+ ...props
+}: React.ComponentProps<"table"> & {
+ /**
+ * `false`:外面这层不再横着滚,太宽的表交给页面的滚动层去滚。
+ *
+ * **表头要吸顶就得关掉它。**`overflow-x: auto` 会让这层在竖直方向上
+ * 也成为滚动容器(另一个方向的 `visible` 被算成 `auto`),于是
+ * `sticky` 的表头钉在这层上 —— 而它从来不竖着滚,表头就跟着页面走了。
+ */
+ scroll?: boolean
+}) {
return (
|
|---|