Skip to content

Commit

Permalink
doc: update alerts-and-menus/demo3/README.md (#39)
Browse files Browse the repository at this point in the history
* fix Capsule text

* fix some translate

* modify form translate

* modify containers translate

* format Alert code
  • Loading branch information
zhu-hongwei authored Jul 16, 2023
1 parent 6016222 commit 657f8aa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion example/alerts-and-menus/demo3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
基本的SwiftUI警报如下所示:

```swift
Alert(title: Text("Important message"), message: Text("Wear sunscreen"), dismissButton: .default(Text("Got it!")))
Alert(
title: Text("Important message"),
message: Text("Wear sunscreen"),
dismissButton: .default(Text("Got it!"))
)
```

但是,您经常需要将动作附加到按钮上,以便在点击它们时执行特定的动作。 为此,请在您的按钮上附加一个闭包,当您点击按钮时将其关闭,如下所示:
Expand Down

0 comments on commit 657f8aa

Please sign in to comment.