pub fn PostToc(props: PostTocProps) -> impl IntoViewExpand description
文章目录(Table of Contents)组件。
Props:
toc_html:服务端生成的目录 HTML 字符串title:目录标题,默认「目录」nav_id、content_id、scroll_id:可选的图鉴局部作用域(省略即不传, 不要传Some(..));正式文章使用默认的页面目录和窗口滚动。
组件函数体只运行一次:切文章时由调用方按 slug 重建本组件,
重建会重跑初始化(__initTocSidebar 幂等,先 dispose 上一次的 observer 与激活态)。
§Required Props
toc_html:impl Into<String>
§Optional Props
title: [&'static str]nav_id: [&'static str]content_id: [&'static str]scroll_id: [&'static str]