fix(icon-picker): 解决icon-picker组件切换分页后,关键词检索失效问题 (#6437)

当icon-picker组件切换分页后,在输入关键词检索,但是分页没有重置,导致检索结果异常
pull/162/head^2^2
Stephen Chang 2025-06-27 19:21:23 +08:00 committed by GitHub
parent 5c3972196a
commit de14908fd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -76,6 +76,12 @@ const keyword = ref('');
const keywordDebounce = refDebounced(keyword, 300);
const innerIcons = ref<string[]>([]);
/* 当检索关键词变化时,重置分页 */
watch(keywordDebounce, () => {
currentPage.value = 1;
setCurrentPage(1);
});
watchDebounced(
() => props.prefix,
async (prefix) => {