# 在 Topic 连接器中切换可见性

**URL:** <https://meta.discourse.org/t/toggling-visibility-within-a-topic-connector/367898>\
**Category:** Development\
**Created:** [2025年五月28日 07:43 UTC](https://meta.discourse.org/t/toggling-visibility-within-a-topic-connector/367898 "2025-05-28T07:43:08Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)\
**Post date:** [2025年五月28日 07:53 UTC](https://meta.discourse.org/t/toggling-visibility-within-a-topic-connector/367898/6 "2025-05-28T07:53:39Z")

</div>

正在查看实现：

> <https://github.com/discourse/discourse/blob/435088f62cf4281e5f1cdfac5495c01688d29805/app/assets/javascripts/discourse/app/controllers/topic.js#L1114C3-L1118C1>

您已经在连接器中访问了 `model`，那么直接从您的连接器执行 `this.args.model.toggleStatus("visible")` 是否更有意义？

---

_[View the full topic](https://meta.discourse.org/t/toggling-visibility-within-a-topic-connector/367898)._
