<el-input v-model.trim="name" @input="projectNameInput" />
projectNameInput(value) {
  this.keyword = value
  this.$refs.autocomplete.handleInput(value);
  this.$refs.autocomplete.activated = true;//这句话是重点
}
<el-autocomplete  ref="autocomplete" v-model="keyword" :fetch-suggestions="querySearchAsync"  @select="handleSelect">
</el-autocomplete>

  

posted on 2024-05-28 15:10  前端入门菜鸟  阅读(157)  评论(0编辑  收藏  举报