Browse Source

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

当icon-picker组件切换分页后,在输入关键词检索,但是分页没有重置,导致检索结果异常
pull/6445/head
Stephen Chang 9 months ago
committed by GitHub
parent
commit
de14908fd3
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      packages/effects/common-ui/src/components/icon-picker/icon-picker.vue

6
packages/effects/common-ui/src/components/icon-picker/icon-picker.vue

@ -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) => {

Loading…
Cancel
Save