diff --git a/01_content/src/client/split.tsx b/01_content/src/client/split.tsx index 692fc2e..60a933c 100644 --- a/01_content/src/client/split.tsx +++ b/01_content/src/client/split.tsx @@ -864,11 +864,10 @@ function makeDividerHandler(kind: 'left' | 'chat' | 'top' | 'pane' | 'topPane', } } -/** 浏览器内置窗:地址栏 + 刷新 + iframe(刷新 = 重新挂载 iframe,跨域也可靠) */ -function BrowserPane() { +/** 浏览器内置窗:地址栏 + 前往;刷新统一在标签栏最左(重挂载 iframe,跨域也可靠) */ +function BrowserPane(props: { reloadKey: number }) { const [url, setUrl] = useState('https://example.com') const [src, setSrc] = useState('https://example.com') - const [reloadKey, setReloadKey] = useState(0) const go = () => { const u = url.trim() setSrc(/^(\/|https?:\/\/)/i.test(u) ? u : 'about:blank') @@ -883,36 +882,22 @@ function BrowserPane() { onChange={(e) => setUrl(e.target.value)} onKeyDown={(e) => { if (e.key === 'Enter') go() }} /> - -