LayoutSkeleton 布局骨架
布局级骨架占位
LayoutSkeleton 布局骨架
用于页面/面板级别的布局占位。
状态:Beta
Demo
Layout Placeholder
容器决定骨架尺寸。
示例即将加载...
基础用法
<template>
<div style="height: 240px;">
<TxLayoutSkeleton />
</div>
</template>
使用建议
- 外层容器决定骨架尺寸与布局比例。
- 适合页面级加载,占位期间保持节奏感。
- 内容区行宽使用固定序列,保证 SSR、hydration 与测试输出稳定。
API(简版)
| 属性名 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| — | - | - | 无额外 props,尺寸由容器决定 |
交互契约
TxLayoutSkeleton无 props、events 或 slots。- 组件固定渲染 header、6 个 sidebar item 与 8 条内容行。
- 内容行宽度是确定性的,不依赖运行时随机数。
组合示例
面板占位
布局骨架搭配卡片容器使用。
示例即将加载...