jsx中渲染报错 Invalid handler for event "input": got undefined

原代码

 let dom =
      <el-dialog title="详细信息" visible={ this.dialogshow } cancel:false width="600px">
        <el-form model={ this.ruleForm } rules={this.rules} ref="ruleForm" label-width="100px" class="demo-ruleForm">
          <el-form-item label="医院名称" prop="ErpHospitalName">
            <el-input vModel={this.ruleForm.ErpHospitalName}></el-input>

改良后

let dom =
      <el-dialog title="详细信息" visible={ this.bddialogshow } cancel:false width="600px">
        <el-form props={{ model: this.ruleForm }} rules={this.rules} ref="ruleForm" label-width="100px" class="demo-ruleForm">

报错消失

posted @ 2023-02-10 11:16  2han9x1nyun  阅读(280)  评论(0)    收藏  举报