Expand description
项目自写组件的公开图鉴与独立用法页。
目录、文案和属性说明来自本模块的静态数据;预览直接渲染项目里的组件。
Modules§
- browser_
previews 🔒 - 图鉴中的浏览器实例。每个预览拥有独立 DOM 宿主,正式页面与这里复用同一 JS 库。
- business_
previews 🔒 - Local examples for business components. The production controllers stay in components/.
- comment_
previews 🔒 - 评论组件图鉴:固定样例与局部上下文,展示节点仍由正式评论组件渲染。
- layout_
article_ 🔒previews - 文章组件的本地样例。所有展示复用正式组件,演示操作仅改本地状态。
- live_
previews 🔒 - 图鉴里的实时预览:直接渲染生产 UI 组件,状态只留在本页,不发任何请求。
Structs§
- Alert
BoxDemo 🔒Props - Props for the
AlertBoxDemocomponent. - Code
Token 🔒 - Component
Preview 🔒Props - Props for the
ComponentPreviewcomponent. - Component
Spec 🔒 - GetShowcase
Data 🔒 - Serialized arguments for the
get_showcase_dataserver function. - Showcase
Data 🔒 - Showcase
Data 🔒Gate Props - Props for the
ShowcaseDataGatecomponent. - Showcase
Detail 🔒Props - Props for the
ShowcaseDetailcomponent. - Showcase
Detail Route - 单枚组件详情路由,对应
/about/components/:component。 - Showcase
Gallery 🔒Props - Props for the
ShowcaseGallerycomponent. - Showcase
Inspector 🔒Props - Props for the
ShowcaseInspectorcomponent. - Showcase
Route - 组件图鉴目录路由,对应
/about/components。
Enums§
- Preview
Mode 🔒 - Preview
Route 🔒 - Usage
Kind 🔒
Constants§
- DETAIL_
SECTIONS 🔒 - 详情页的章节,与右侧目录一一对应。
- MASONRY_
PRELOAD_ 🔒SCRIPT - 首屏边解析边排瀑布流:卡片一闭合就按自然高度写好
grid-row-end,浏览器每次中途绘制 看到的都是最终位置;之后由showcase-masonry.ts接管(公式、断点与它一致,算出的跨度 相同,不再挪动)。卡片的位置只取决于它前面卡片的跨度,所以还在解析的最后一张不用等。 客户端导航时脚本在目录挂上文档时执行,此时卡片已齐,一次排完。
Statics§
- SHOWCASE 🔒
Functions§
- Alert
BoxDemo 🔒 - Required Props
- Component
Preview 🔒 - Required Props
- Showcase
Data 🔒Gate - 加载图鉴数据后再渲染子页面,使目录、详情与预览可同步读取
showcase()。 - Showcase
Detail 🔒 - Required Props
- Showcase
Gallery 🔒 - Showcase
Inspector 🔒 - 目录右侧的详情栏:说明、状态、属性与用法,并给出详情页入口。
- __
Showcase 🔒Detail Route_ View - __
Showcase 🔒Route_ View - alert_
box_ 🔒next_ variant - alert_
box_ 🔒preset_ message - alert_
box_ 🔒snippet - checkbox_
snippet 🔒 - checkbox_
state 🔒 - click_
hits_ 🔒interactive - 点击是否落在卡片内的交互控件上(链接、按钮、编辑器等),这类点击不触发卡片选中。
- fetch_
showcase 🔒 - 客户端会话内只请求一次;首屏直接复用 SSR 水合数据。取数函数随分包加载,
见
hooks::ssr_resource。 - get_
showcase_ 🔒data - group_
label 🔒 - highlight_
snippet 🔒 - highlighted_
view 🔒 - 高亮后的用法片段。
- inspector_
visible 🔒 - 宽屏时目录右侧有详情栏,点卡片只切换选中;窄屏没有详情栏,点卡片直接进入详情页。
- is_
local_ 🔒demo - is_
wide_ 🔒preview - preview_
route 🔒 - showcase 🔒
- 当前图鉴数据。