1234567891011121314151617181920212223 |
- //
- // message.swift
- // 74 桌
- //
- // Created by yunli on 2023/5/20.
- //
- import SwiftUI
- struct messageView: View {
- @Binding var count: Int
- var body: some View {
- List{
- ForEach(0..<count,id:\.self) { item in
- Text("\(item)")
- }
- Button(action:{count+=1;print(count)}) {
- Label("添加消息", systemImage: "plus")
- }
- }
- .navigationBarTitle("消息列表")
- }
- }
|