The element-ui input component cannot enter a value

problem description: in the input box using element, the input box can not enter the value, does any boss know why?

The

code is as follows: http://jsrun.net/kXXKp/edit

Jun.17,2022

clipboard.png
I have also encountered it. Maybe the component is applied too deeply and vue cannot detect the view update. Add this.$forceUpdate () to the input event of the invalid input box to force refresh


what kind of effect do you want to achieve? if you can't modify it together, you can only get it without two-way binding.
Note: I changed it. I don't know if there is a hole. You can refer to it

.
<div id="app">
    <el-input
      v-for='(item,index) in arr'
      type="textarea"
      autosize
      placeholder=""
      v-model="textarea2[index]"
      >
</el-input>
<div style="margin: 20px 0;"></div>
</div>
var app = new Vue({
  el:'-sharpapp',
  data() {
    return {
      textarea2:[],
      arr:[]
    }
  },
  mounted(){
    //id
    this.get1();
  },
  methods:{
    get1(){
      this.arr = [1,2,1,23,1,25]
      this.arr.forEach(item=>{
        let tt = this.get(item)
        this.textarea2.push(tt)
      })
      
    },
    get(n){
     // n
      // 
      if(n == 1){
           return ''
      }
      return ''
    }
  }
})

in fact, you have come into a misunderstanding. The v-model event implementation mechanism is that you change the value value after the input value triggers the @ input event.
therefore, there are two ways to do this when you use < el-input >.

v-model bidirectional binding

<el-input v-model="result" type="text"></el-input> 

@ input +: value simulates v-model you change the value of result in the change method

<el-input :value="result" @input="change($event)" type="text"></el-input>

the el-input component of element-ui is different from the native html component.
el-input: value='a' can be understood to mean that as long as the value of a remains unchanged, even if you enter characters in the input box, it will be reset to the value of a, so the echo will always truncate the input and retain only the value of a, unless the entered value is re-assigned to a.

  

there is really something wrong with the code. You have to bind the component to a variable in data. The code appears to bind elements in an array, but in fact you return a string that does not bind specific variables or attributes

Menu