穿梭框pinyin-match搜索不显示问题
作者:互联网
<el-transfer ref="defTransfer" v-model="form.ids" filterable :filter-method="filterMethod" :titles="['可选项','已选项']" class="new-transfer def-transfer" :props="{ key: 'lngaccountid', label: 'straccount', value:'lngaccountid' }" :data="accountList" />
//这个只有搜索了才会有数据
filterMethod(query, item) { console.log(PinyinMatch.match(item.straccount, query)) return PinyinMatch.match(item.straccount, query) },//正确写法
filterMethod(query, item) { return query ? PinyinMatch.match(item.straccount, query) : item },
标签:straccount,item,pinyin,return,PinyinMatch,穿梭,query,match 来源: https://www.cnblogs.com/hellofangfang/p/15398769.html