Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
@vavt/message
Advanced tools
A native JS crafted message notification component, encompassing features for displaying messages, warnings, successes, and errors.
原生 js 编写的消息提示组件。包括消息、警告、成功和错误提示。
yarn add @vavt/message
import { message } from '@vavt/message';
// error, success, info, warning
const { close, update } = message.info('这是一条普通信息');
// 更新内容
update('这是更新后的内容');
// 手动关闭
close();
// 关闭全部
message.closeAll();
类型名称 | 默认值 | 描述 |
---|---|---|
class | '' | |
single | false | 是否只显示一个提示 |
offsetTop | 20 | 单个提示距离上一个提示的距离 |
duration | 3000 | 该时间后自动关闭,<=0 时不会自动关闭 |
closeable | false | 是否显示关闭按钮 |
darkSelector | :root[data-theme=dark] | 暗夜模式的选择器,只能通过config 配置,不能调用时设置 |
zIndex | 9999 |
配置全局属性
message.config({ duration: 5000 });
在调用时配置
message.warning('这条消息不会自动关闭', { duration: 0 });
FAQs
A native JS crafted message notification component, encompassing features for displaying messages, warnings, successes, and errors.
We found that @vavt/message demonstrated a healthy version release cadence and project activity because the last version was released less than 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
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.