0.2.25 • Published 5 years ago

@beisen/text-area v0.2.25

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

Textarea

项目简介

本项目为textarea文本输入框。对本项目有任何疑问或建议,欢迎联系~(邮箱:mengshuai@beisen.com)

项目运行

  1. cnpm install 或 npm install

  2. npm run dev (开发环境打包、项目启动,默认端口 port:8080)

  3. npm run test (测试用例)

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

Textarea参数

const props = {
  hidden: false,
  disabled: false,
  readOnly: false,
  maxlength: 140,          //文本域允许字数最大值
  defaultHeight: '130px', //默认的输入框高度,内置默认为91px
  labeltext: '默认title',
  required: true,
  textValue: '',          //初始值
  placeHolder:'',
  showStatus: '',         //显示状态 search or ''
  showText: '请填写正确',
  helpMsg: 'dqwdq',
  sideTip: false,         //toolTip是否左右显示
  hiddenTip: false,       //toolTip是否显示
  errorStatus: false,     //是否报错
  errorMsg: '出错了~~~!', //报错信息
  lablePos: true,         //label位置,true时在左边,false在上边
  lableTxt: false,        //label中文字对齐方式,true左对齐,false右对齐
  onClick: function (event) {
    console.log(event.target.value)
  },
  onFocus: function (event) {
    console.log(event.target.value)
  },
  onChange: function (event) {
    console.log(event.target.value)
  },
  onBlur: function (event) {
    console.log(event.target.value)
  },
  iconClick: function () {
    console.log(0)
  } //没有iconClick这个字段即不支持此功能。 有即是支持这个特性
}

调用方法

1.安装npm组件包

npm install @beisen/text-area --save-dev

2.引用组件

import Textarea from "@beisen/text-area"

3.传入参数

  state = {
    hidden: false
    ,disabled: false
    ,readOnly: false
    ,maxlength: 10 //文本域允许字数最大值
    ,labeltext: "默认title"
    ,required: true
    ,textValue: 'DCSDCDSCSDDCSDCDSCSD'
    ,"showStatus":""  //显示状态 "search" or ""
    ,"showText":"请填写正确"
    ,"helpMsg":"dqwdq"
    ,"sideTip":false //toolTip是否左右显示
    ,"hiddenTip":false //toolTip是否显示
    ,"errorStatus": false//是否报错
    ,"errorMsg":"出错了~~~!" //报错信息
    ,"lablePos":  true //label位置,true时在左边,false在上边
    ,"lableTxt": false//label中文字对齐方式,true左对齐,false右对齐
    ,onClick:function(event){console.log(event.target.value)}
    ,onFocus:function(event){console.log(event.target.value)}
    ,onChange:function(event){console.log(event.target.value)}
    ,onBlur:function(event){console.log(event.target.value)}
  }

  render () {
    return (
      <div>
          <Textarea {...this.state} />
      </div>
    )
  }
0.2.25

5 years ago

0.2.24

5 years ago

0.2.23

5 years ago

0.2.22

5 years ago

0.2.21

5 years ago

0.2.20

5 years ago

0.2.13-2

6 years ago

0.2.13-1

6 years ago

0.2.16

6 years ago

0.2.15

6 years ago

0.2.14

6 years ago

0.2.13

6 years ago

0.2.11

6 years ago

0.2.10

6 years ago

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.99

6 years ago

0.1.98

6 years ago

0.1.97

6 years ago

0.1.96

6 years ago

0.1.95

6 years ago

0.1.94

6 years ago

0.1.93

6 years ago

0.1.92

6 years ago

0.1.91

6 years ago

0.1.83

6 years ago

0.1.82

6 years ago

0.1.81

6 years ago

0.1.80

6 years ago

0.1.79

6 years ago

0.1.78

6 years ago

0.1.77

6 years ago

0.1.76

6 years ago

0.1.74

6 years ago

0.1.73

7 years ago

0.1.72

7 years ago

0.1.71

7 years ago

0.1.70

7 years ago

0.1.69

7 years ago

0.1.67

7 years ago

0.1.66

7 years ago

0.1.65

7 years ago

0.1.64

7 years ago

0.1.63

7 years ago

0.1.62

7 years ago

0.1.61

7 years ago

0.1.60

7 years ago

0.1.59

7 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