Skip to content

Commit ac75a55

Browse files
committed
fix: 修复重置搜索框时错误显示的问题
1 parent 70fc339 commit ac75a55

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src-vue/src/components/VirtualMemeList.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,8 @@ const updateWindowWidth = () => {
117117
};
118118
119119
// 监听 items 变化,重置可见数量
120-
watch(() => props.items.length, (newLength, oldLength) => {
121-
if (newLength < oldLength) {
122-
// 如果 items 减少了(比如新搜索),重置可见数量
123-
visibleCount.value = Math.min(20, newLength);
124-
}
120+
watch(() => props.items.length, (newLength) => {
121+
visibleCount.value = newLength;
125122
});
126123
127124
onMounted(() => {

0 commit comments

Comments
 (0)