1.3.2 • Published 5 years ago

bd-comp-ng v1.3.2

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

引入该模块

import {BdCompModule} from 'bd-comp-ng';

city-select城市选择控件

依赖条件

ant-Design版本

  • 该控件使用ant-Design 0.7.x版本,使用前请核准版本是否匹配。不向下兼容

安装jquery

安装swiper

全局使用$ 和 Swiper。需要在typings.d.ts配置下

declare var $: any;
declare var jQuery: any;
declare var jQuery: any;

安装ng-zorro-antd

调用

  • <bc-city-select [cityOpts]="{userName:'xxxx',projectCode:'yyyy',initData: (e)=> {}}" (cityCheck)="Handler($event)"></bc-city-select>

需要参数 object

  • {userName:'xxxx',projectCode:'yyyy',radio?: boolean,defaultValue?: string|function}

radio: 是否单选,true为单选。false或不传,默认复选。

defaultValue: 。 string类型时,传all|first。function类型, function类型示例

defaultValue(){
    return {
    aggregation:true/false, // 是否选中聚合
        aggregateName:'第一批',
        names:'北京,成都',// 所选城市字符串
        citys: ['北京','成都','深圳']
    }
    
}

提供确认回掉函数

  • cityCheck
  • 触发时机:初始化组件是会调用一次。点击确定触发。
  • 返回:所选择的城市信息
  • 格式:
  {
    aggregation:true/false, // 是否选中聚合
    aggregateName:'第一批',
    names:'北京,成都',// 所选城市字符串
    citys: ['北京','成都','深圳']
  }

###编译和发布

  • npm version dispatch 修改package.json版本
  • npm run packagr
  • cd dist
  • npm publish
1.3.2

5 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.0

6 years ago