# Layout 版面容器
頁面整體佈局骨架:LhLayout / LhHeader / LhAside / LhMain / LhFooter 五件套,含 Aside 時自動轉為縱向。
佈局
<template>
<div style="height: 200px; border: 1px solid var(--lh-border-color); border-radius: 6px; overflow: hidden">
<LhLayout>
<LhLayoutHeader style="background: var(--lh-primary-color); color: #fff; padding: 0 16px; line-height: 56px">
Header
</LhLayoutHeader>
<LhLayout direction="horizontal">
<LhLayoutAside
:width="160"
aria-label="側欄導覽"
style="background: var(--lh-fill-color, #f0ebe2); padding: 16px"
>
Aside
</LhLayoutAside>
<LhLayoutMain style="background: var(--lh-bg-color); padding: 16px">Main</LhLayoutMain>
</LhLayout>
<LhLayoutFooter style="background: var(--lh-fill-color, #f0ebe2); padding: 0 16px; line-height: 48px">
Footer
</LhLayoutFooter>
</LhLayout>
</div>
</template>
# Layout Props
| 屬性 | 說明 | 類型 | 預設值 |
|---|---|---|---|
| direction | 排列方向(含 Aside 時自動為 vertical) | 'horizontal' \| 'vertical' | 'horizontal' |
| sx | sx 快速佈局屬性 | — | — |
# LayoutAside Props
| 屬性 | 說明 | 類型 | 預設值 |
|---|---|---|---|
| width | 側欄寬度 | number \| string | 200 |
| ariaLabel | 無障礙名稱(landmark 命名) | string | — |
| sx | sx 快速佈局屬性 | — | — |
提示
Header / Main / Footer 只承接語意與佈局,除 sx 外無額外 props。
← Grid 欄格 Collapse 折疊面板 →
Copyright © 2024-2026 风默文学 | 宁ICP备2024006574号 |
苏公网安备32040002010537