增加注解

This commit is contained in:
JinJiangHuang
2026-03-01 22:23:38 +08:00
parent 99a8cc799b
commit ee8c71dcd4
23 changed files with 374 additions and 24 deletions
+8
View File
@@ -2,17 +2,24 @@ import SwiftUI
/// - Android SeriesAdapter
struct EpisodeListView: View {
/// 线
let episodes: [VodInfo.Episode]
///
let selectedIndex: Int
///
let onSelect: (Int) -> Void
/// 50
@State private var currentGroup = 0
///
private let groupSize = 50
/// 1 0
private var groupCount: Int {
max(1, (episodes.count + groupSize - 1) / groupSize)
}
///
private var currentEpisodes: [VodInfo.Episode] {
let start = currentGroup * groupSize
let end = min(start + groupSize, episodes.count)
@@ -62,6 +69,7 @@ struct EpisodeListView: View {
GridItem(.fixed(44)),
GridItem(.fixed(44))
], spacing: 10) {
// 使 + 便
ForEach(Array(currentEpisodes.enumerated()), id: \.offset) { index, episode in
let actualIndex = currentGroup * groupSize + index
Button {