feat: 需求 select 搜索功能情况下问题,label和value都进行了匹配 只匹配label

This commit is contained in:
Wang Chenguang 2019-09-27 14:21:04 +08:00
parent 551c730771
commit b3d1fe2855

View file

@ -496,7 +496,7 @@
const nodeText = node.elm ? node.elm.textContent : node.text;
return `${str} ${nodeText}`;
}, '') || '';
const stringValues = JSON.stringify([value, label, textContent]);
const stringValues = JSON.stringify([label, textContent]);
const query = this.query.toLowerCase().trim();
return stringValues.toLowerCase().includes(query);
},