elmentUI组件怎么绑定原生事件

el-input为例:

    <el-input 
      id="user-input"
      type="textarea" 
      placeholder="请换行输入不同用户" 
      :autosize="{minRows: 2, maxRows: 10}" 
      v-model="users" 
      @input="changeInput"
      @focus="onFocus"
      @blur="hintItems=null"
      @click.native="onClick"
      @keyup.native="onKeyup1">
    </el-input>

如上面所示,原生事件绑定要在后面加.native

猜你喜欢

转载自www.cnblogs.com/XHappyness/p/9258998.html
今日推荐