posX = e.pageX}/>
@@ -174,17 +240,21 @@ function WebSSH(props) {
activeKey={activeId}
type="editable-card"
onTabClick={key => setActiveId(key)}
- onEdit={handleRemove}
+ onEdit={(key, action) => action === 'remove' ? handleRemove(key, 'self') : null}
style={{width: `calc(100vw - ${width}px)`}}
- tabBarExtraContent={
}>文件管理器}>
+ tabBarExtraContent={hosts.length === 0 ? (
+
小提示:双击标签快速复制窗口,右击标签展开更多操作。
+ ) : (
+
}>文件管理器
+ )}>
{hosts.map(item => (
-
+ }>
))}
diff --git a/spug_web/src/pages/ssh/index.module.less b/spug_web/src/pages/ssh/index.module.less
index 5b31b74..670994b 100644
--- a/spug_web/src/pages/ssh/index.module.less
+++ b/spug_web/src/pages/ssh/index.module.less
@@ -50,6 +50,14 @@
display: flex;
flex-direction: column;
+ .tips {
+ position: absolute;
+ top: 12px;
+ left: 12px;
+ font-size: 12px;
+ color: #666;
+ }
+
:global(.ant-tabs-nav) {
height: 42px;
margin: 0;
@@ -88,4 +96,10 @@
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
+}
+
+.tabRender {
+ user-select: none;
+ padding: 8px 8px 8px 16px;
+ margin: 0 -8px 0 -16px;
}
\ No newline at end of file