Skip to main content

Module tags

Module tags 

Source
Expand description

标签页面模块。

对应路由:

  • /tags:标签云,展示所有标签及关联文章数量。
  • /tags/:tag:标签详情页,展示指定标签下的已发布文章列表。

数据获取:

  • 标签云通过 use_server_future(list_tags) 获取全部标签信息。
  • 标签详情通过 use_server_future 调用 get_posts_by_tag(tag) 获取该标签下的全部已发布文章(不分页)。 在 wasm32 目标下,这些 server function 的函数体被替换为向服务端端点发起 HTTP POST 请求的客户端存根; 实际的数据库访问逻辑仅在 feature = "server" 启用时运行。

Re-exports§

pub use Tags_completions::Component::Tags;
pub use TagDetail_completions::Component::TagDetail;

Structs§

TagDetailContentProps 🔒
Properties for the TagDetailContent component.
TagDetailProps
Properties for the TagDetail component.

Functions§

TagDetail
标签详情页面组件,对应路由 /tags/:tag
TagDetailContent 🔒
标签详情内容组件。
Tags
标签云页面组件,对应路由 /tags
TagsContent 🔒
标签云内容组件。