remove console

This commit is contained in:
wintsa
2025-01-03 09:56:06 +08:00
parent c11fb54b0b
commit ff1c2a890c
3 changed files with 6 additions and 13 deletions

View File

@@ -52,7 +52,6 @@ async function fetchData({ done }: { done: any }) {
if (!hasScroll()) {
// 加载多次
while (!hasScroll()) {
console.log(hasScroll())
// 设置加载中
loading.value = true
// 请求API
@@ -78,7 +77,6 @@ async function fetchData({ done }: { done: any }) {
} else {
// 加载一次
// 设置加载中
console.log(hasScroll())
loading.value = true
// 请求API

View File

@@ -40,12 +40,11 @@ async function fetchData() {
// 加载时获取数据
onMounted(() => {
fetchData(); // 异步操作,不阻塞导航
fetchData();
});
onActivated(() => {
console.log("组件被激活");
if (dataList.value.length == 0) {
fetchData(); // 异步操作,不阻塞导航
fetchData();
}
});