<template>
    <div>
        <header>
          <!-- <el-input  :maxlength="6" :disabled="disabled" v-model="newValue" :placeholder="placeholder" :style="'width:'+width+';height:'+height" ></el-input>  -->
          <!-- <el-input onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))" :maxlength="maxlength"  :disabled="disabled" v-model="newValue" :placeholder="placeholder" :style="'width:'+width+';height:'+height" ></el-input>  -->
          <!-- <el-input onkeydown="if(event.keyCode==13)event.keyCode=9" onKeypress="if
((event.keyCode<48 || event.keyCode>57)) event.returnValue=false" :maxlength="maxlength"  :disabled="disabled" v-model="newValue" :placeholder="placeholder" :style="'width:'+width+';height:'+height" ></el-input>  -->
 <el-input  :maxlength="maxlength"  :disabled="disabled" v-model="newValue" :placeholder="placeholder" :style="'width:'+width+';height:'+height" ></el-input> 
        </header>
    </div>

</template>

<script>
export default {
  name: 'BlueInput',
  data(){
    return{
    }
  },
  props: {
    width:{ //宽
      type: String,
      default: '238px',
    },
    height:{ //高
      type: String,
      default: '30px',
    },
    placeholder:{ //高
      type: String,
      default: '请输入',
    },
    value:{ //数据
      type: String,
      default:''
    },
    disabled:{
      type:Boolean,
      default: false
    },
    maxlength:{
      type:Number,
      default: null
    }
  },
  computed: {
    newValue: {
      get() {
        return this.value
      },
      set(value) {
        this.$emit('input', value)
      },
    },
  },
}
</script>

<style scoped>
.el-input >>> .el-input__inner{
  width: 100%;
  height: 100%;
  color: #fff;
  background: rgba(57, 75, 135, 0.7) !important;
  border-radius: 2px !important;
  border: 1px solid rgba(77, 103, 186, 0.75) !important;
  
}
 .el-input >>> input::-webkit-input-placeholder{
  color: #fff;
  opacity: 0.5;
}
/* .el-form-item__content >>> .el-input--suffix span{
  line-height: 30px !important;
} */

</style>