我认为,如果您选择一个提供您正在查看的用户的模型的插口会更容易。
您选择的插口提供有关主题的信息,但不是有关用户的信息
用户个人资料上的插口,如 `user-post-names`,提供用户模型: https://github.com/discourse/discourse/blob/5b6d32804a1eb658fdc043b082336a17b4c1c944/frontend/discourse/app/templates/user.gjs#L220-L224 使用提供模型的插口,您应该能够像教程中的示例一样使用 `@outletArgs`:https://meta.discourse.org/t/theme-developer-tutorial-4-using-outlets-to-insert-and-replace-content/357799。那里的示例使用 `discovery-list-container-top`,它提供 `@outletArgs={{lazyHash category=@model.category tag=@model.tag}}`
这就是为什么我选择一个提供用户模型的插口。当您将鼠标悬停在插口上并看到您正在查看的用户的 ID 时,您可以看到模型。教程中的许多示例都使用 currentUser 服务,它提供当前用户的 ID,这似乎不是您要找的。
