autocomplete组件常用,针对于它的各种解决方案也很多,下面只是其中一种
<el-autocomplete
ref="autocompleteRef"
v-model="paramsContent"
placeholder="请输入搜索内容"
:fetch-suggestions=""querySearch"
"debounce="0"
@keyup.delete.native="handleDel"
></el-autocomplete>
.......
<el-table
:data="tableList"
></el-table>
......
....
methods:{
handleDel(){
if(!this.paramsContent){
this.tableList = null;
}
}
}