fix(icon-picker): 解决icon-picker组件切换分页后,关键词检索失效问题 (#6437)
当icon-picker组件切换分页后,在输入关键词检索,但是分页没有重置,导致检索结果异常pull/162/head^2^2
parent
5c3972196a
commit
de14908fd3
|
@ -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) => {
|
||||||
|
|
Loading…
Reference in New Issue