Commit de14908f by Stephen Chang Committed by GitHub

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

当icon-picker组件切换分页后,在输入关键词检索,但是分页没有重置,导致检索结果异常
1 parent 5c397219
...@@ -76,6 +76,12 @@ const keyword = ref(''); ...@@ -76,6 +76,12 @@ const keyword = ref('');
const keywordDebounce = refDebounced(keyword, 300); const keywordDebounce = refDebounced(keyword, 300);
const innerIcons = ref<string[]>([]); const innerIcons = ref<string[]>([]);
/* 当检索关键词变化时,重置分页 */
watch(keywordDebounce, () => {
currentPage.value = 1;
setCurrentPage(1);
});
watchDebounced( watchDebounced(
() => props.prefix, () => props.prefix,
async (prefix) => { async (prefix) => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!