@beisen-platform/area-selector
用于选择地区,多配合着选择器一起使用,可配置单选或多选
Last updated a year ago by beisencorp .
ISC · Repository · Original npm · Tarball · package.json
$ cnpm install @beisen-platform/area-selector 
SYNC missed versions from official npm registry.

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(<Demo />, document.getElementById('content')) ```

Current Tags

  • 2.2.0-rc.3                                ...           latest (a year ago)

23 Versions

  • 2.2.0-rc.3                                ...           a year ago
  • 2.2.0-rc.2                                ...           a year ago
  • 2.2.0-rc.1                                ...           a year ago
  • 2.1.5                                ...           a year ago
  • 2.1.4-rc.1                                ...           a year ago
  • 2.1.3                                ...           a year ago
  • 2.1.2                                ...           a year ago
  • 2.1.1                                ...           a year ago
  • 2.1.0                                ...           a year ago
  • 2.0.4-rc.1                                ...           a year ago
  • 2.0.4                                ...           a year ago
  • 2.0.3                                ...           a year ago
  • 2.0.2                                ...           a year ago
  • 2.0.1                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 1.0.6                                ...           a year ago
  • 1.0.5                                ...           a year ago
  • 1.0.4                                ...           a year ago
  • 1.0.3                                ...           a year ago
  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           2 years ago
  • 0.2.5                                ...           2 years ago

Copyright 2014 - 2016 © taobao.org |