exam.swift 465 B

1234567891011121314151617181920212223
  1. //
  2. // exam.swift
  3. // 74 桌
  4. //
  5. // Created by yunli on 2023/5/20.
  6. //
  7. import SwiftUI
  8. struct examListView: View {
  9. @Binding var count: Int
  10. var body: some View {
  11. List {
  12. ForEach(0 ..< count, id: \.self) { item in
  13. Text("\(item)")
  14. }
  15. Button(action: { count += 1 }) {
  16. Label("添加考试", systemImage: "plus")
  17. }
  18. }
  19. .navigationBarTitle("考试列表")
  20. }
  21. }