Skip to content

Commit

Permalink
feat: keyword search (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
uyarn authored Nov 12, 2024
1 parent 91d0fa1 commit 04cb882
Show file tree
Hide file tree
Showing 2 changed files with 2,236 additions and 4 deletions.
9 changes: 6 additions & 3 deletions packages/view/src/IconView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,10 @@ const handleSearchIcon = (searchStr) => {
searchManifest[key][category] = ctx;
} else {
ctx.icons.forEach((icon) => {
if (icon.name.indexOf(searchStr) > -1) {
if (
icon.name.indexOf(searchStr) > -1
|| icon.keywords.find((keyword) => keyword.indexOf(searchStr) > -1)
) {
if (!searchManifest[key][category]) {
searchManifest[key][category] = {
labelCN: ctx.labelCN,
Expand Down Expand Up @@ -321,10 +324,10 @@ watch(
background-color: var(--bg-color-component-hover);
}
.t-tabs__btn--right {
box-shadow: none;
box-shadow: none;
}
.t-tabs__btn--left {
box-shadow: none;
box-shadow: none;
}
.t-tabs__nav-item {
Expand Down
Loading

0 comments on commit 04cb882

Please sign in to comment.