![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@beisen/dropdown
Advanced tools
cnpm install 或 npm install cnpm使用教程
npm run dev (开发环境打包 port:8080)
npm run test (测试用例)
npm run build (生产环境打包)
const props = {
/**
* input框前的文字标识,可为空
*/
title: '测试',
/**
* 下拉菜单为单选或者多选
* true 多选
* false 单选(默认)
*/
multiple: true,
/**
* 是否显示搜索框
*/
hasSearch: false,
hiddenTip: false,
/**
* 信息是否左右显示
*/
sideTip: false,
/**
* 限制选择数量
* 当超过该数量后,其它的则禁用
*/
limitCount: 5,
/**
* 每项的内容
*/
children: [
{
value: 0,
text: '查看详情',
isActive: false,
isChecked: true,
tipText: "哎哎多撒多撒<br/>多撒多撒多所" //如果有该字段,则鼠标移入文字会一直显示tip,tip内容为该字段内容
}
],
/**
* 是否显示
*/
hidden: false,
/**
* 是否使用模板下拉(空内容的弹层)
*/
templateDrop: true,
/**
* 自定义模板弹层内容
*/
templateComponent: [<div onClick={this.clickLi}>111</div>, <div>111</div>],
/**
* 弹层宽度
* 外部传入,最小为170px
*/
dropdownWidth: '500px',
/**
* 弹层最大高度
*/
maxHeight: '',
/**
* 点击后事件回调
* @param event 事件
* @param val 抛出的值(单选为对象,多选为数组)
*/
onClick: function (event, val) { console.log(val); },
/**
* 多语言参数
*/
translation: {
searchText: '搜索',
confirmText: '确定'
}
}
1.安装npm组件包
npm install @beisen/drop-down --save-dev
2.引用组件
import DropDown from "@beisen/drop-down"
传入参数
该参数为上述参数,传入方式使用: {...参数}
render () {
return (
<DropDown {...data} />
)
}
FAQs
dropdown
The npm package @beisen/dropdown receives a total of 9 weekly downloads. As such, @beisen/dropdown popularity was classified as not popular.
We found that @beisen/dropdown 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
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.