自动下滑

This commit is contained in:
董宏凯 committed 2026-05-17 21:33:24 +08:00
1 parent c19417a706
commit 20786e690d
1 file changed
+8
@@ -71,6 +71,14 @@ export function AIWritingPanel() {
}
}, [isIdle]);
// 开始写作 / 点击继续后恢复自动滚底
useEffect(() => {
if (isRunning && !state.isPaused) {
autoScrollRef.current = true;
setAutoScroll(true);
}
}, [isRunning, state.isPaused]);
// 监听用户手动滚动(挂载一次)
useEffect(() => {
const el = scrollRef.current;