element 穿梭框清空搜索内容clearQuery

<el-transfer
        ref="roleTransfer"
        v-model="formInline.lngroleids"
        class="role-transfer"
        filterable
        :filter-method="filterMethod"
        filter-placeholder="请输入编码或名称进行查询"
        :props="{
          key: 'lngroleid',
          label: 'strrolename',
          value: 'lngroleid'
        }"
        :data="getSysroleList"
        :titles="['未选数据', '已选数据']"
      />
 
 
methods: {
openDialog() {
this.$nextTick(() => {
        this.$refs.roleTransfer.clearQuery('left')
        this.$refs.roleTransfer.clearQuery('right')
      })
}
}
原文地址:https://www.cnblogs.com/hellofangfang/p/15348417.html