修复我的列表搜索对最后一个字符的匹配问题
parent
e54597b944
commit
078245cb96
|
@ -1,6 +1,8 @@
|
|||
|
||||
### 修复
|
||||
|
||||
- 修复使用全局快捷键还原窗口时,窗口没有获取焦点的问题
|
||||
- 修复我的列表搜索对最后一个字符的匹配问题
|
||||
|
||||
### 优化
|
||||
|
||||
|
|
|
@ -239,7 +239,7 @@ export default {
|
|||
handleSearch() {
|
||||
if (!this.text.length) return this.resultList = []
|
||||
let list = []
|
||||
let rxp = new RegExp(this.text.split('').join('.*'), 'i')
|
||||
let rxp = new RegExp(this.text.split('').join('.*') + '.*', 'i')
|
||||
for (const item of this.list) {
|
||||
if (rxp.test(`${item.name}${item.singer}${item.albumName ? item.albumName : ''}`)) list.push(item)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue