@beisen/Search

Search

Stats

StarsIssuesVersionUpdatedCreatedSize
@beisen/Search
0.1.375 years ago5 years agoMinified + gzip package size for @beisen/Search in KB

Readme

Search使用说明

项目运行

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

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

  3. npm run test (测试用例)

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

Search参数

  state= {
    SearchData :{
      "placeholder":"搜索"        /**没有值的时候显示的内容(string)**/
      ,"iconName":"icon-sousuo"     /**IconName 文字前面的图标**/
      ,"value":""  //搜索框中的默认值
      ,"active":true //input框激活
      ,"hidden":false             //隐藏搜索框
      ,"readonly":false           //搜索框只读
      ,"disabled":false           //搜索框禁用
      ,"onClick":function(val){console.log(val)}
      ,"onBlur":function(val){console.log(val)}
      ,"onFocus":function(val){console.log(val)}
      ,"onChange":function(val){console.log(val)}
    }
  }

Search调用方法

  1. 引用组件
import Search from "./src/index"
  1. 传入参数

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

state= {
  SearchData :{
    "placeholder":"搜索"        /**没有值的时候显示的内容(string)**/
    ,"iconName":"icon-sousuo"     /**IconName 文字前面的图标**/
    ,"value":""  //搜索框中的默认值
    ,"active":true //input框激活
    ,"hidden":false             //隐藏搜索框
    ,"readonly":false           //搜索框只读
    ,"disabled":false           //搜索框禁用
    ,"onClick":function(val){console.log(val)}
    ,"onBlur":function(val){console.log(val)}
    ,"onFocus":function(val){console.log(val)}
    ,"onChange":function(val){console.log(val)}
  }
}
render () {
    return (
      <Search {...this.state.SearchData} />
    )
  }

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.