Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@beisen-platform/dropdown

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@beisen-platform/dropdown

平台搜索下拉组件

  • 1.1.9-rc.6
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-73.68%
Maintainers
1
Weekly downloads
 
Created
Source

drop-down 使用说明

项目运行

  1. cnpm install 或 npm install cnpm使用教程

  2. npm run dev (开发环境打包 port:8080)

  3. npm run test (测试用例)

  4. npm run build (生产环境打包)

drop-down参数

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, sortVal) { console.log(val); }

}

drop-down调用方法

1.安装npm组件包

npm install @beisen/drop-down --save-dev

2.引用组件

import DropDown from "@beisen/drop-down"
  1. 传入参数

    该参数为上述参数,传入方式使用: {...参数}

    
    render () {
    		return (
    			<DropDown {...data} />
    		)
    	}
    

Keywords

FAQs

Package last updated on 06 Nov 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc