Newer
Older
sample-vue-component02 / src / App.vue
Yoshimune Saito on 26 Jan 2020 903 bytes サンプル格納
<template>
  <div id="app">
    <MyTable :row="hoge" :items="items" />
  </div>
</template>

<script>
import MyTable from "./components/MyTable.vue";
import MyRow from "./components/MyRow.vue";

export default {
  name: "app",
  components: {
    MyTable,
  },
  data() {
    return {
      hoge: MyRow,
      items: [
        {
          no: 1,
          name: "Taro",
          desc: "hoge"
        },
        {
          no: 2,
          name: "Ken",
          desc: "fuga"
        },
        {
          no: 3,
          name: "Jiro",
          desc: "piyo"
        }
      ]
    };
  }
};
</script>

<style>
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
table,
tr,
td,
th {
  border: solid 1px #000000;
  border-collapse: collapse;
}
</style>