bug: ion-infinite-scroll when loadmore data error. ionInfinite will be trigger many many times.
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Bắt đầu với bản tái hiện Vue/TypeScript được cung cấp, tập trung vào handler ionInfinite và lệnh gọi loadNextPage của nó khi yêu cầu trang 2 được mô phỏng bị từ chối. Xác minh rằng sự kiện infinite-scroll không lặp lại sau lỗi tải thêm; issue không nêu tệp nguồn nào trong repository hoặc test nào cần chạy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v8.x
Current Behavior
trigger many many times
Expected Behavior
do not trigger
Steps to Reproduce
pull up loadmore
Code Reproduction URL
1
Ionic Info
1
Additional Information
首页 {{ item.name }} <script setup lang="ts"> import { IonPage, IonList, IonButton, IonItem, IonHeader, IonTitle, IonToolbar, IonRefresher, IonContent, IonRefresherContent, RefresherCustomEvent, IonInfiniteScroll, IonInfiniteScrollContent, InfiniteScrollCustomEvent } from "@ionic/vue" import LoadStatus from '@/components/load-status/load-status.vue'; import {useLoadStatus} from "@/components/load-status/useLoadStatus" import {chevronDownCircleOutline} from "ionicons/icons" // 模拟请求数据的接口客户端 const loadImpl = async (endpoint: string, p: { page: number; size: number }) => { // 模拟网络请求延迟 await new Promise(resolve => setTimeout(resolve, 1000)); // throw new Error("接口请求失败"); // return [] console.log(`请求接口 ${endpoint},页码: ${p.page}, 每页大小: ${p.size}`); if (p.page >= 2) { throw new Error(`接口请求失败=${p.page}`); } // 模拟分页数据 const totalItems = 45; // 假设总共有45条数据 const start = (p.page - 1) * p.size const end = start + p.size const items = Array.from({length: totalItems}, (_, i) => ({id: i + 1, name: `数据项 ${i + 1}`})); return items.slice(start, end); // const start = (page - 1) * size; // const start = (curPage.value - 1) * pageSize; // const end = start + pageSize; // const items = Array.from({length: totalItems}, (_, i) => ({id: i + 1, name: `数据项 ${i + 1}`})); // return items.slice(start, end); }; // Dashboard 数据请求配置 const {data, status, error, hasMore, hasData, isLoadingMore, refresh, loadNextPage} = useLoadStatus({ fetcher: async (curPage, pageSize) => { // 支持分页 const res = await loadImpl('/dashboard', {page: curPage!, size: pageSize!}); return res; }, pageSize: 20, autoFetch: true }); const handleRefresh = (event: RefresherCustomEvent) => { refresh().then(() => { event.target.complete(); }); }; const ionInfinite = (event: InfiniteScrollCustomEvent) => { // generateItems(); // setTimeout(() => event.target.complete(), 500); console.log("触发上拉加载更多"); loadNextPage().then(() => { console.log("加载下一页完成"); event.target.complete(); // setTimeout(() => { // event.target.disabled = false // }, 2000) }) }; </script>- Ngôn ngữ chính
- TypeScript
- Star
- 52.8k
- Fork
- 13.3k
- Merge trung bình
- 3 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 86
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ionic-team/ionic-framework
-
bug: input-otp, backspace in an empty box only moves focus instead of clearing the previous boxCó thể đã có người làm @sarankumar1325 đã nhận 23 ngày trước. Đang mởpackage: core type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
ionic-team/ionic-framework#31639 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: vue swipe cancellation throws when the previous page is missingCó thể đã có người làm @dandoingdev đã nhận 46 ngày trước. Đang mởpackage: vue type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ionic-team/ionic-framework#31514 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: ion-searchbar input is always labelled "search text"; aria-label on the host is not forwardedCó thể đã có người làm @HappyKnuckles đã nhận 41 ngày trước. Đang mởa11y package: core type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
ionic-team/ionic-framework#31492 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: IonTabs throws when a Fragment contains one IonRouterOutletCó thể đã có người làm @Benziza đã nhận 82 ngày trước. Đang mởpackage: react type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ionic-team/ionic-framework#31410 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: angular swipe-back gesture crashes in StackController.startBackTransition when the stack is popped before the gesture is capturedCó thể đã có người làm @officialasishkumar đã nhận 9 ngày trước. Đang mởpackage: angular type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
ionic-team/ionic-framework#31291 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của ionic-team/ionic-framework
Issue tương tự
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
lingdojo/kana-dojo#34223 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug status: needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
mastra-ai/mastra#30587 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:web p2 product:business triage:active type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
cuadrao-ai/argus#2228 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
embedpdf/embed-pdf-viewer#1098 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
.Needs Triage .Team/Metabot Priority:P3 Type:Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
metabase/metabase#87252 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày