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.
bee-cascader
Advanced tools
IE 9+ ✔ | Chrome 31.0+ ✔ | Firefox 31.0+ ✔ | Opera 30.0+ ✔ | Safari 7.0+ ✔ |
react bee-cascader component for tinper-bee
先进行下载cascader包
npm install --save bee-cascader
组件调用
import { Cascader } from 'bee-cascader';
React.render(<div>
<div>
<Cascader />
</div>
</div>, document.getElementById('target'));
<link rel="stylesheet" href="./node_modules/build/bee-cascader.css">
import "./node_modules/src/cascader"
//或是
import "./node_modules/build/bee-cascader.css"
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
placeholder | input提示信息 | string | "" |
options | 下拉列表数据 | json | 必填,无默认值 |
defaultValue | 默认的选中项 | string[] | [] |
changeOnSelect | 当此项为 true 时,点选每级菜单选项值都会发生变化 | boolean | false |
disabled | 禁用 | boolean | false |
expandTrigger | 次级菜单的展开方式,可选 'click' 和 'hover' | string | 'click' |
size | 输入框大小,可选 lg md sm | string | 'md' |
onChange | 选择完成后的回调 | Function(value, selectedOptions) | - |
onClick | 选中节点的钩子函数,返回array选中的节点 | function | - |
inputValue | 自定义输入框展示内容 | string | - |
options格式如下:
const options = [
label: '浙江',
value: 'zj',
children: [{
label: '杭州',
value: 'hz',
children: [{
label: '西湖',
value: 'xh',
children: [{
label: '白娘子',
value: 'bnz'
},{
label: '许仙',
value: 'xx'
}]
}]
}]
},
{
label: '江苏',
value: 'js',
children: [{
label: '南京',
value: 'nj',
children: [{
label: '中华门',
value: 'zhm'
}]
}]
},
{
label: '山东',
value: 'sd'
}
];
$ git clone https://github.com/tinper-bee/bee-cascader
$ cd bee-cascader
$ npm install
$ npm run dev
FAQs
Cascader ui component for react
We found that bee-cascader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 14 open source maintainers 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.