|
@@ -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")
|
|
|
}
|
|
|
}
|