Socket
Socket
Sign inDemoInstall

@beisen-platform/area-selector

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@beisen-platform/area-selector

用于选择地区,多配合着选择器一起使用,可配置单选或多选


Version published
Weekly downloads
6
decreased by-14.29%
Maintainers
1
Weekly downloads
 
Created
Source

area-selector 使用说明

项目运行

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

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

  3. npm run test (测试用例)

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

base-button参数


	{
      data: AreaData,
      isSingleSelect: false,  //单多选
      totalCount: 99,         // 可选总数
      allLevelDisplay:true,   //是否显示所有级别,默认true
      allowContainsChildren: true, // 选中父级默认选中子集,且子集无法取消勾选,仅在多选状态下生效
      hiddenTip:false,        //ToolTip的hidden字段,默认false
      sideTip:false,          //ToolTip的side字段,默认false
      defaultResults: [       // 默认选中
        {
          name: '全国',
          id: 1
        },
        {
          id: 3702,
          name: '青岛市'
        }
      ],
      sureClick: function (data) {
        console.log(data);
      },
      cancelClick: function () {
        console.log(11)
      }
    }

base-button调用方法

1.安装npm组件包

npm install @beisen/area-selector --save-dev

2.引用组件

import AreaSelect from "@beisen/area-selector"
  1. 传入参数

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

    class Demo extends Component{
    
    render () {
      const _data = {
        data: AreaData,
        isSingleSelect: false,
        totalCount: 99,
        defaultResults: [
          {
            name: '全国',
            id: 1
          },
          {
            id: 3702,
            name: '青岛市'
          }
        ],
        sureClick: function (data) {
          console.log(data);
        },
        cancelClick: function () {
          console.log(11)
        }
      }
      return (
        <div>
            <App {..._data}/>
        </div>
      )
    }
    

} render(, document.getElementById('content')) ```

Keywords

FAQs

Package last updated on 01 Jul 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