iter(g139): 提示气泡支持左右方位

This commit is contained in:
HIsheR
2026-10-26 15:32:47 +08:00
parent a3db5e66fc
commit 08ceb8f127
9 changed files with 62 additions and 18 deletions
+3 -1
View File
@@ -464,13 +464,15 @@ const content = h(
section(
'sec-tooltip',
'悬浮提示',
'tooltip 包裹触发器:hover / 聚焦延迟 150ms 出场,移出、失焦或 Esc 收起,气泡不抢指针;视口一侧空间不足时气泡自动翻到另一侧。',
'tooltip 包裹触发器:hover / 聚焦延迟 150ms 出场,移出、失焦或 Esc 收起,气泡不抢指针;方位支持上下左右四向,视口该侧空间不足时自动翻到对侧。',
h(
'div',
{ class: 'row' },
tooltip({ content: '保存后立即生效' }, button({ label: '保存' })),
tooltip({ content: '该操作不可撤销', placement: 'bottom' }, button({ label: '删除', variant: 'danger' })),
tooltip({ content: '聚焦输入框同样会显示' }, textField({ placeholder: '聚焦我…' })),
tooltip({ content: '左侧方位:竖排工具栏常用', placement: 'left' }, button({ label: '左侧气泡', variant: 'ghost' })),
tooltip({ content: '右侧方位,贴右边时自动翻回左侧', placement: 'right' }, button({ label: '右侧气泡', variant: 'ghost' })),
),
),
section(