+ {/* 终端容器 - 始终渲染,确保fit能正确计算尺寸 */}
+
+
+ {/* Loading 状态 - 覆盖在终端上方 */}
+ {connectionStatus === 'initializing' && (
+
+ )}
+
+ {/* 断开中状态 - 覆盖在终端上方 */}
+ {connectionStatus === 'disconnecting' && (
+
+ )}
+
+ {/* 错误状态 - 覆盖在终端上方 */}
+ {connectionStatus === 'error' && errorMessage && (
+
+
+
连接失败
+
{errorMessage}
+
+
+ )}
+
+