1.0.6 • Published 6 years ago

ionic-page-search v1.0.6

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

Install

npm install ionic-page-search

Using ionic2-page-search module in an Ionic 2 app

import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';

import { AboutPage } from '../pages/about/about';
import { ContactPage } from '../pages/contact/contact';
import { HomePage } from '../pages/home/home';
import { TabsPage } from '../pages/tabs/tabs';

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
/* 使用方法 */
/*------------------------------------------------*/
import { PageSearchModule } from 'ionic-page-search';
/*------------------------------------------------*/

@NgModule({
  declarations: [
    MyApp,
    AboutPage,
    ContactPage,
    HomePage,
    TabsPage,
  ],
  imports: [
    BrowserModule,
    /*------------------------------------------------*/
    PageSearchModule,  
    /*------------------------------------------------*/
    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>

  <page-search (ionChange)="ionChange()"  SearchType="noContent" [(ngModel)]="SearchVal"></page-search>

</ion-content>

输入属性

名称类型默认描述
SearchTypestring'tag'or'noContent' 搜索类型
typestringinput类型
clearTextstring'清除历史记录'SearchType是tag类型的时候生效
cancelTextstring'取消'取消文字
positionstring'content''content'时上下收缩,其他值不收缩

ionic-page-event

key类型描述
ionfocusevent搜索框聚焦时
ionblurevent搜索框失去焦点时
ionkeydownevent键盘按下时
ioncancelevent取消按钮点击时
ionChangeeventinput值改变时
ionkeyupevent键盘弹起时
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.1

6 years ago

1.0.0

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

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