schtonn 1 year ago
parent
commit
5564a4642a
1 changed files with 3 additions and 3 deletions
  1. 3 3
      sdsz74/message.swift

+ 3 - 3
sdsz74/message.swift

@@ -10,11 +10,11 @@ import SwiftUI
 struct messageView: View {
     @Binding var count: Int
     var body: some View {
-        List{
-            ForEach(0..<count,id:\.self) { item in
+        List {
+            ForEach(0 ..< count, id: \.self) { item in
                 Text("\(item)")
             }
-            Button(action:{count+=1;print(count)}) {
+            Button(action: { count += 1; print(count) }) {
                 Label("添加消息", systemImage: "plus")
             }
         }