ElementUI inputボックスが入力できない問題の解決


ネット上では、この問題の原因は「コンポーネントのネストが深すぎるためかもしれない」と話しています.
以下は私の解決策です.
1.カスタムinputボックス
<template>
  <el-input v-model="input" @input="update($event)"></el-input>
</template>

<script>
export default {
     
  name: 'MyInput',
  props: ['initValue'],
  data () {
     
    return {
     
      input: this.initValue
    }
  },
  methods: {
     
    update: function (e) {
     
      this.$forceUpdate()	//   
    }
  }
}
</script>

<style scoped>
</style>

2.MyInputボックスを使う
// Main   
...
<MyInput ref="myInput" :initValue="scope.row.name" style="float: left; width: 100px"/>
...

import MyInput from '@/components/MyInput'

export default {
     
  name: 'Main',
  components: {
     
    MyInput
  },
  ...
}

3.MyInputボックスの内容を取得する
// Main   
let input = this.$refs.myInput.input