
Security News
Google’s OSV Fix Just Added 500+ New Advisories — All Thanks to One Small Policy Change
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.
@xmzhou/rc-contextmenu
Advanced tools
npm install @xmzhou/rc-contextmenu
children
能够响应onContextMenu
事件和onScroll
事件onScroll
用以关闭右击菜单,如果需要实现滚动即关闭,可以设置组件的visible
受控children
的tabIndex
或children
可响应键盘事件command
,option
, shift
, ctrl
,如果更多请联系作者
export interface RC_CONTEXT_MENU_API {
/**
* 触发容器
*/
children: ReactElement;
/**
* 弹出框功能菜单
*/
menu?: RC_CONTEXT_MENU[];
/**
* 右键菜单样式
*/
className?: string;
/**
* 菜单宽度
* @default 200
*/
width?: number;
/**
* 自动响应快捷键触发
*/
shortcut?: boolean;
/**
* 右击菜单受控开闭
*/
visible?: boolean;
/**
* 触发点击事件
*/
onChange?: (key: string, data: RC_CONTEXT_MENU) => void;
/**
* 右击菜单开闭触发
*/
onVisibleChange?: (v: boolean) => void;
}
export type RC_CONTEXT_MENU = RC_CONTEXT_MENU_ITEM | RC_CONTEXT_MENU_DIVIDER;
export interface RC_CONTEXT_MENU_ITEM {
/**
* 菜单项唯一键
*/
key: string;
/**
* 菜单项标题
*/
label: ReactNode;
/**
* 菜单项样式
*/
className?: string;
/**
* 是否禁用
*/
disabled?: boolean;
/**
* 菜单图标
*/
icon?: ReactNode;
/**
* 快捷键
*/
shortcutKeys?: string[];
/**
* 自定义渲染函数
*/
render?: (d: RC_CONTEXT_MENU, node: ReactNode) => ReactNode;
}
export interface RC_CONTEXT_MENU_DIVIDER {
/**
* 菜单项唯一键
*/
key: string;
/**
* 分割线
*/
type: 'divider';
/**
* 自定义渲染函数
*/
render?: (d: RC_CONTEXT_MENU, node: ReactNode) => ReactNode;
}
FAQs
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
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.
Research
/Security News
175 malicious npm packages (26k+ downloads) used unpkg CDN to host redirect scripts for a credential-phishing campaign targeting 135+ organizations worldwide.
Security News
Python 3.14 adds template strings, deferred annotations, and subinterpreters, plus free-threaded mode, an experimental JIT, and Sigstore verification.