Skip to content
On this page

Container

常用容器

基础用法

Header
Main
Footer
使用widthheight属性来定义 Container 的样式。
<template>
  <div class="content" style="height:300px">
    <ElContainer style="height: 100%">
      <ElHeader>Header</ElHeader>
      <ElContainer>
        <ElAside width="200px">Aside</ElAside>
        <ElMain> Main </ElMain>
      </ElContainer>
      <ElFooter>Footer</ElFooter>
    </ElContainer>
  </div>
</template>

Container API

Attributes

NameDescriptionTypeDefaultRequired
titlealert title.^[string]No
typealert type.^[enum]'success' | 'warning' | 'info' | 'error' infoNo
descriptiondescriptive text.^[string]No
closablewhether alert can be dismissed.^[boolean]trueNo
centerwhether content is placed in the center.^[boolean]falseNo
close-textcustomized close button text.^[string]No
show-iconwhether a type icon is displayed.^[boolean]falseNo
effecttheme style.^[enum]'light' | 'dark''light'No

Released under the MIT License.