<template>
  <div class="table">
    <div class="table-row" v-for="row in 3" :key="row">
      <div class="table-cell" v-for="column in 6" :key="column">
        Cell {{ (row - 1) * 6 + column }}
      </div>
    </div>
  </div>
</template>
<style>
  .table {
    display: table;
  }
  .table-row {
    display: table-row;
  }
  .table-cell {
    display: table-cell;
    border: 1px solid black;
    padding: 5px;
  }
</style>
前端vue实现一个3行6列的表格

原文地址: https://www.cveoy.top/t/topic/uJ7 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录