<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.js 实现 3 行 6 列表格:简单代码示例

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

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