Expand description
首页模块。
对应路由:
/:首页,默认展示第 1 页文章。/page/:page:分页首页,展示指定页码的已发布文章列表。
数据获取:通过 use_server_future 调用 list_published_posts server function,
从服务端获取已发布文章的分页列表与总数,并渲染文章卡片与分页导航。
在 wasm32 目标下,server function 的函数体被替换为向服务端端点发起 HTTP POST 请求的客户端存根;
实际的数据库访问逻辑仅在 feature = "server" 启用时运行。
Re-exports§
pub use Home_completions::Component::Home;pub use HomePage_completions::Component::HomePage;
Structs§
- Home
Page Props - Properties for the
HomePagecomponent. - Home
Posts 🔒Props - Properties for the
HomePostscomponent.