解决elementUI中穿梭框(transfer)组件搜索框中内容清除问题

<el-transfer ref="transferCom" filterable filter-placeholder="快速检索" :titles="titles" v-model="checked" :data="data" :props="labelAndKey" @change="change" @right-check-change="rightCheckChange"></el-transfer>
clearSearch(): void {
    const { transferCom } = this.$refs;
    if (transferCom) {
      transferCom.$children['0']._data.query = '';
      // 清空右边搜索
      transferCom.$children['3']._data.query = '';
    }
  }
posted @ 2020-09-03 15:30  黄鹂  阅读(4627)  评论(0编辑  收藏  举报