文字提示
Tooltip浮层与反馈深色小气泡,只给图标按钮补名称或快捷键。悬停 300ms 后出现,键盘聚焦立即出现;不放可点击内容。
复制链接搜索⌘K向右旋转R
属性
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
tip | Signal<String> | 必填 | 提示内容。 |
shortcut | MaybeProp<&'static str> | None | 快捷键,显示在提示文字右侧。 |
children | Children | 必填 | 触发提示的元素。 |
placement | Signal<String> | top | top 或 bottom。 |
align | Signal<String> | center | center、start 或 end。 |
键盘
- 鼠标停留
- 显示提示
用法
src/components/ui.rsview! {
<Tooltip tip="\u641C\u7D22" shortcut="\u2318K">
<button aria-label="\u641C\u7D22">
<Icon name=IconName::Search/>
</button>
</Tooltip>
}