DOM:input

<el-input
      @click.native="onClickInput"
      @input="onInput"
      @keypress.native.enter="onEnterPress"
      placeholder="搜索"
      prefix-icon="el-icon-search"
      ref="input"
      v-model.trim="searchKeyword"
></el-input>

methods:

onEnterPress() {
      if (this.searchKeyword) {
        this.goSearch(this.searchKeyword)
      }
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-02
猜你喜欢
  • 2022-12-23
  • 2021-08-02
  • 2021-11-27
  • 2021-11-01
  • 2022-01-21
  • 2022-12-23
  • 2020-06-17
相关资源
相似解决方案