From 5e272e2e9c2114a555f7427d39a8f3d0f0a39e2b Mon Sep 17 00:00:00 2001 From: Ryan SU Date: Sun, 3 Dec 2023 15:51:08 +0800 Subject: [PATCH] fix(icon): custom icon value in picker --- src/components/Icon/src/IconPicker.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/Icon/src/IconPicker.vue b/src/components/Icon/src/IconPicker.vue index b7b7fc69..c308f191 100644 --- a/src/components/Icon/src/IconPicker.vue +++ b/src/components/Icon/src/IconPicker.vue @@ -88,8 +88,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; import svgIcons from 'virtual:svg-icons-names'; import { copyText } from '/@/utils/copyTextToClipboard'; - - // 没有使用别名引入,是因为WebStorm当前版本还不能正确识别,会报unused警告 + const AInput = Input; const APopover = Popover; const APagination = Pagination; @@ -175,12 +174,12 @@ function handleSearchChange(e: Event) { const value = (e.target as HTMLInputElement).value; - if (!value) { setCurrentPage(1); currentList.value = icons; return; } + currentSelect.value = value currentList.value = icons.filter((item) => item.includes(value)); }