* style: affix & util * feat(alert): add customIcon slot * feat(anchor): ts type * style: auto-complete * feat: avatar add crossOrigin & maxPopoverTrigger * style(backTop): v-show instead v-if * style: badge * style: breadcrumb * feat: button add global size * feat: update i18n * feat: picker add disabledTime * test: update snap * doc: update img url * style: fix Card tabs of left position * doc: update cascader doc * feat: collapse * style: comment * style: configprovider * feat: date-picker add soem icon slot * style: update descriptions style * feat: add divider orientationMargin * doc: update drawer * feat: dropdown add destroyPopupOnHide & loading * style: update empty * feat: form add labelWrap * style: update grid * test: update grid snap * fix: image ts error * fix: mentions cannot select, close #5233 * doc: update pagination change info, close #5293 * fix: table dynamic expand error, close #5295 * style: remove not use * release 3.0.0-beta.11 * doc: update typo * feat: input add showCount * feat: inputNumber add prefix slot * style: update layout * style: update list * feat: add locale i18 * style: update locale ts * style: update mentions * feat: menu divider add dashed * perf: menu * perf: menu animate * feat: modal method add wrapClassName * style: update pageheader * feat: update pagination ts * feat: confirm add showCancel & promise * doc: update popover * style: update progress * style: radio * style: update rate、result、row * feat: select add fieldNames * feat: add skeleton button & input * feat: spin tip support slot * style: slider & space * stype: update steps ts type * style: update switch * feat: table add tree filter * test: update input sanp * feat: table add filterMode... * fix: tree autoExpandParent bug * test: update input snap * doc: tabs add destroyInactiveTabPane * style: update tag * style: update timeline & time-picker * fix: Tooltip arrowPointAtCenter 1px shift bug * feat: typography add enterEnterIcon triggerType * doc: update tree-select * fix: deps and TypeScript types * style: udpate transfer * style: update style * doc: add colorScheme * chore: add css var builg * doc: sort api * style: lint code * doc: add css var * test: update snap * chore: add pre script * chore: update lint * perf: collapse animate * perf: collapse tree * perf: typography shaking when edit * doc: update auto-complete demo * fix: table tree not have animate * feat: deprecated dropdown center placement * feat: deprecated dropdown center placement * test: update snap
4.8 KiB
category | type | cols | title | cover |
---|---|---|---|---|
Components | Layout | 1 | Layout | https://gw.alipayobjects.com/zos/alicdn/hzEndUVEx/Layout.svg |
Handling the overall layout of a page.
Specification
Size
The first level navigation is inclined left near a logo, and the secondary menu is inclined right.
- Top Navigation (almost systems): the height of the first level navigation
64px
, the second level navigation48px
. - Top Navigation(contents page): the height of the first level navigation
80px
, the second level navigation56px
. - Calculation formula of a top navigation:
48+8n
. - Calculation formula of an aside navigation:
200+8n
.
Interaction rules
- The first level navigation and the last level navigation should be distinguishable by visualization;
- The current item should have the highest priority of visualization;
- When the current navigation item is collapsed, the style of the current navigation item is applied to its parent level;
- The left side navigation bar has support for both the accordion and expanding styles; you can choose the one that fits your case the best.
Visualization rules
Style of a navigation should conform to its level.
-
Emphasis by colorblock
When background color is a deep color, you can use this pattern for the parent level navigation item of the current page.
-
The highlight match stick
When background color is a light color, you can use this pattern for the current page navigation item; we recommend using it for the last item of the navigation path.
-
Highlighted font
From the visualization aspect, a highlighted font is stronger than colorblock; this pattern is often used for the parent level of the current item.
-
Enlarge the size of the font
12px
,14px
is a standard font size of navigations,14px
is used for the first and the second level of the navigation. You can choose an appropriate font size regarding the level of your navigation.
Component Overview
Layout
: The layout wrapper, in whichHeader
Sider
Content
Footer
orLayout
itself can be nested, and can be placed in any parent container.Header
: The top layout with the default style, in which any element can be nested, and must be placed inLayout
.Sider
: The sidebar with default style and basic functions, in which any element can be nested, and must be placed inLayout
.Content
: The content layout with the default style, in which any element can be nested, and must be placed inLayout
.Footer
: The bottom layout with the default style, in which any element can be nested, and must be placed inLayout
.
Based on
flex layout
, please pay attention to the compatibility.
API
<Layout>
<Header>header</Header>
<Layout>
<Sider>left sidebar</Sider>
<Content>main content</Content>
<Sider>right sidebar</Sider>
</Layout>
<Footer>footer</Footer>
</Layout>
Layout
The wrapper.
Property | Description | Type | Default |
---|---|---|---|
class | container className | string | - |
hasSider | whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering | boolean | - |
style | to customize the styles | object|string | - |
Layout.Sider
The sidebar.
Property | Description | Type | Default | Version |
---|---|---|---|---|
breakpoint | breakpoints of the responsive layout | Enum { 'xs', 'sm', 'md', 'lg', 'xl', 'xxl' } | - | |
class | container className | string | - | |
collapsed(v-model) | to set the current status | boolean | - | |
collapsedWidth | width of the collapsed sidebar, by setting to 0 a special trigger will appear |
number | 80 | |
collapsible | whether can be collapsed | boolean | false | |
defaultCollapsed | to set the initial status | boolean | false | |
reverseArrow | reverse direction of arrow, for a sider that expands from the right | boolean | false | |
style | to customize the styles | object|string | - | |
theme | color theme of the sidebar | string: light dark |
dark |
|
trigger | specify the customized trigger, set to null to hide the trigger | string|slot | - | |
width | width of the sidebar | number|string | 200 | |
zeroWidthTriggerStyle | to customize the styles of the special trigger that appears when collapsedWidth is 0 |
object | - | 1.5.0 |
Events
Events Name | Description | Arguments | |
---|---|---|---|
breakpoint | the callback function, executed when breakpoints changed | (broken) => {} | - |
collapse | the callback function, executed by clicking the trigger or activating the responsive layout | (collapsed, type) => {} |
breakpoint width
{
xs: '480px',
sm: '576px',
md: '768px',
lg: '992px',
xl: '1200px',
xxl: '1600px',
xxxl: '2000px',
}