Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
umi-plugin-cmdk
Advanced tools
一个通过快捷键打开搜索面板的插件, 搜索面板默认可以搜索菜单,也可以定制其他的链接。
Npm
npm install umi-plugin-cmdk
Yarn
yarn add umi-plugin-cmdk
Pnpm
pnpm add umi-plugin-cmdk
Configure in .umirc.ts
,
export default {
plugins: ["umi-plugin-cmdk"],
};
可以通过配置文件 config/config. Ts 中的 layout 属性开启插件。
import { defineConfig } from 'umi';
export default defineConfig({
cmdk: {
keyFilter: 'meta.k',
searchPlaceholder: '搜索菜单',
empty: '找不到搜索结果',
suggestionKeys: [],
groups: []
}
});
KeyFilter
meta.k
定义打开弹框的快捷键, 具体用法可见 ahooks 的 useKeyPress
string
寻找你想去的地方...
弹框搜索框的 Placeholder
string
迷路了! ! !
搜索结果为空的时候展示效果
string[]
用于配置哪些菜单需要置顶,置顶之后会放到 suggestion 组内,同时在 menu 组下面就会隐藏。
Group
出了菜单以外,还想配置更多的跳转链接,可以用这个属性进行扩展更多的分组。
类型如下:
interface Item {
key: string;
title: string;
action?: () => void;
}
interface Group {
groupName: string;
items: Item[];
}
MIT
FAQs
在 umi 项目里可以快速搜索菜单
The npm package umi-plugin-cmdk receives a total of 1 weekly downloads. As such, umi-plugin-cmdk popularity was classified as not popular.
We found that umi-plugin-cmdk 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.