- 增加防抖,解决输入打断
This commit is contained in:
Aqr-K
2024-12-28 22:34:32 +08:00
committed by GitHub
parent da67088e9c
commit 00bd1c45a1

View File

@@ -160,12 +160,14 @@ watch(
)
// 搜索监听
watch([() => search.value, () => isComposing.value], async () => {
if (!isComposing.value) {
console.log('search: ' + search.value)
reloadPage(true)
}
})
watch([() => search.value, () => isComposing.value],
debounce(async () => {
if (!isComposing.value) {
console.log('search: ' + search.value)
reloadPage(true)
}
}, 1000),
)
// 获取订阅列表数据
async function fetchData(page = currentPage.value, count = itemsPerPage.value) {