Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@beisen-phoenix/tooltip
Advanced tools
简单的文字提示气泡框。
鼠标移入则显示提示的简单气泡浮层,应用于显示简单的文字提示,不承载复杂文本和操作。
可用来代替浏览器默认的 title
属性。
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
title | 提示文字,配合isHTMLContent可以支持html格式。 | string | 无 |
extraCls | 自定义的容器class,一般通过此class来实现自定义样式 | string | 无 |
isHTMLContent | 是否提示文字为html,如果置为true则正文会被当做html识别,同时会有xss潜在风险。 | boolean | false |
showOverflowTooltip | 根据文本是否打点来决定是否展示Tooltip,注意此时节点需要是仅有一层标签包裹的纯文本才能正确计算,详情请见样例。 | boolean | false |
destroyTooltipOnHide | 是否在tooltip隐藏时销毁dom节点 | boolean | false |
arrowPointAtCenter | 箭头是否指向目标元素中心 | boolean | true |
autoAdjustOverflow | 气泡被遮挡时自动调整位置 | boolean | true |
defaultVisible | 默认是否显隐 | boolean | false |
getTooltipContainer | 浮层渲染父节点,默认渲染到 body 上 | Function(triggerNode) | () => document.body |
mouseEnterDelay | 鼠标移入后延时多少才显示 Tooltip,单位:秒 | number | 0 |
mouseLeaveDelay | 鼠标移出后延时多少才隐藏 Tooltip,单位:秒 | number | 0.1 |
overlayClassName | 卡片类名 | string | 无 |
overlayStyle | 卡片样式 | object | 无 |
placement | 气泡框位置,可选 top left right bottom topLeft topRight bottomLeft bottomRight leftTop leftBottom rightTop rightBottom | string | top |
trigger | 触发行为,可选 hover | string | hover |
visible | 用于手动控制浮层显隐 | boolean | false |
onVisibleChange | 显示隐藏的回调 | (visible) => void | 无 |
align | 该值将合并到 placement 的配置中,设置参考 rc-tooltip | Object | 无 |
请确保 Tooltip
的子元素能接受 onMouseEnter
、onMouseLeave
、onFocus
、onClick
事件。
FAQs
The npm package @beisen-phoenix/tooltip receives a total of 412 weekly downloads. As such, @beisen-phoenix/tooltip popularity was classified as not popular.
We found that @beisen-phoenix/tooltip demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.