0.0.5 • Published 6 years ago

ionic-address-picker v0.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

前言:

网路上已经有ionic-city-picer等插件,为什么还要再写一个?

由于网路上其他的ionic-city-picker不能满足一些业务需求,如2级联动,或4级联动,以及保存当时的选择状态等。

为了满足更多的业务需求,于是我这里又写了一个希望可以给正在做IONIC开发的同志们一些效率上的帮助;

Install

npm install ionic-address-picker

Using ionic-address-picker module in an Ionic 2 app

/* 使用方法 */
/*------------------------------------------------*/
import { AddressPickerModule } from 'ionic-address-picker';
/*------------------------------------------------*/

@NgModule({
  declarations: [
    MyApp,
    AboutPage,
    ContactPage,
    HomePage,
    TabsPage,
  ],
  imports: [
    BrowserModule,
    AddressPickerModule, 
    IonicModule.forRoot(MyApp)
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    AboutPage,
    ContactPage,
    HomePage,
    TabsPage,
  ],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler}
  ]
})
export class AppModule {}


/*QQ442970923(如发现Bug请与我联系,将进行改进)*/

/*---------------------HTML---------------------*/

<ion-header>
  <ion-navbar>
    <ion-title>Home</ion-title>
  </ion-navbar>
</ion-header>

<ion-content padding>

 <address-picker></address-picker>

</ion-content>

输入属性

名称类型默认描述
placeholderstring默认文字
Reset有值时会重置
LeveLnumber选择联动的层数(最大4;最小1)
cancelTextstring'取消'取消文字
DoneTextstring'完成'完成文字
columnWidthnumber每列的宽度(%)
PickerData[]城市联动数据

输出事件

key类型描述
DoneeventDone($event)返回选择时的数据
0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago