0.1.80 • Published 5 years ago

@beisen/search v0.1.80

Weekly downloads
15
License
ISC
Repository
gitlab
Last release
5 years ago

Search使用说明

项目运行

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

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

  3. npm run test (测试用例)

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

Search参数

const props = {
  /**
   * 没有值的时候显示的内容
   */
  placeholder: '搜索',

  /**
   * 文字前面的图标IconName
   */
  iconName: 'sys-icon-sousuo',

  /**
   * 搜索框中的默认值
   */
  value: '111',

  /**
   * 初始状态时是否激活
   */
  active: false,

  /**
   * 设置隐藏
   */
  hidden: false,

  /**
   * 设置只读
   */
  readonly: false,

  /**
   * 不可用状态
   */
  disabled: false,

  /**
   * 只读
   */
  readonly:false,

  /**
   * 使用input的placeholder
   * 将placeholder传给原生<input>元素
   * 值为true时原生<input>和Search组件的包装都有placeholder,
   * 否则只有Search组件的包装有placeholder
   */
  useInputPlaceHolder: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) },
  onKeyDown: function (val) { console.log(val) }
}

Search调用方法

1.安装npm组件包

npm install @beisen/search --save-dev

2.引用组件

import Search from "@beisen/search"
  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} />
        )
      }
0.1.80

5 years ago

0.1.79

5 years ago

0.1.78

5 years ago

0.1.77

5 years ago

0.1.76

5 years ago

0.1.75

5 years ago

0.1.74

5 years ago

0.1.73

5 years ago

0.1.72

5 years ago

0.1.71-2

5 years ago

0.1.71-1

5 years ago

0.1.71

6 years ago

0.1.70

6 years ago

0.1.69

6 years ago

0.1.68

6 years ago

0.1.67

6 years ago

0.1.66

6 years ago

0.1.65

6 years ago

0.1.64

6 years ago

0.1.63

6 years ago

0.1.62

6 years ago

0.1.61

6 years ago

0.1.60

6 years ago

0.1.58

7 years ago

0.1.57

7 years ago

0.1.56

7 years ago

0.1.55

7 years ago

0.1.54

7 years ago

0.1.53

7 years ago

0.1.52

7 years ago

0.1.51

7 years ago

0.1.50

7 years ago

0.1.49

7 years ago

0.1.48

7 years ago

0.1.47

7 years ago

0.1.46

7 years ago

0.1.45

7 years ago

0.1.44

7 years ago

0.1.43

7 years ago

0.1.42

7 years ago

0.1.39

7 years ago

0.1.22

7 years ago

0.1.38

7 years ago