> For the complete documentation index, see [llms.txt](https://3440217568.gitbook.io/rxswift/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://3440217568.gitbook.io/rxswift/decision_tree/do.md).

# do

**当 `Observable` 产生某些事件时，执行某个操作**

![](https://4217506537-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MWj545abP2yK86-qksJ%2Fsync%2F482543241f163689f4bf47497ef57321c5d4671b.png?generation=1616819395849815\&alt=media)

当 `Observable` 的某些事件产生时，你可以使用 **do** 操作符来注册一些回调操作。这些回调会被单独调用，它们会和 `Observable` 原本的回调分离。
