Skip to content

Commit

Permalink
fix: 修复搜索图标不生效,并支持模糊搜索 (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinLiang66 authored Oct 11, 2024
1 parent 40bfcd5 commit 6e9b322
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/GiIconSelector/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const search = () => {
if (searchValue.value) {
const temp = searchValue.value.toLowerCase()
searchList.value = iconList.filter((item) => {
return item.toLowerCase().startsWith((temp.startsWith('icon') ? '' : 'icon') + temp)
return item.toLowerCase().includes((temp))
})
total.value = searchList.value.length
currentPageIconList.value = searchList.value.slice(0, pageSize)
Expand Down

0 comments on commit 6e9b322

Please sign in to comment.