Skip to content

五.Space

前言

组件默认使用 Flex 布局,不需要手动设置 type="flex"。

请注意父容器避免使用 inline 相关样式,会导致组件宽度不能撑满。

默认

<template>
  <web-space wrap>
    <web-card v-for="i in 3" :key="i" class="box-card" style="width: 250px">
      <template #header>
        <div class="card-header">
          <span>Card name</span>
          <web-button class="button" text>Operation button</web-button>
        </div>
      </template>
      <div v-for="o in 4" :key="o" class="text item">
        {{ 'List item ' + o }}
      </div>
    </web-card>
  </web-space>
</template>