pub fn Tooltip(props: TooltipProps) -> impl IntoViewExpand description
悬浮提示:深色小气泡,悬停 300ms 后出现,键盘聚焦触发器时立即出现。
只给图标按钮补名称或快捷键,不放可点击内容。样式见 ui.css 的 .tooltip:
只认包裹层的直接子元素,外层祖先上的悬停不会误触。
Props:
tip:提示文字shortcut:可选的快捷键,显示在文字右侧(如⌘K)placement:"top"(默认)/"bottom"align:"center"(默认)/"start"/"end";触发器贴容器边缘时朝内侧对齐, 避免居中气泡被overflow-hidden裁掉
§Required Props
tip:impl Into<Signal<String>>children: [Children]
§Optional Props
shortcut: [impl Into<MaybeProp<&'static str>>](MaybeProp<&’static str>)placement:impl Into<Signal<String>>align:impl Into<Signal<String>>