0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

vue.js [ vuetify ] 行と列の対応

Posted at

vue.js [ vuetify ] 行と列の対応

不用意にdevとか混在させても上手くいくだろうと思ってコーディングしてたらどんどんはまっていったので、最低限のテンプレートを備忘録として記す。
SPAを作成したかったので、App.vueからいろんなvueを呼び出し、router-viewで表示する。

基本構成

最初にmain.jsから呼ばれるvue

App.vue
<template> <!-- vueの決まり -->
  <v-app> <!-- 最初に呼ばれるApp.vueの決まり -->
      <v-content>
        <v-container>
          <v-layout>
              <router-view></router-view>
          </v-layout>
        </v-container>
      </v-content>
  </v-app>
</template>

<script>
export default {
  name: 'App'
};
</script>

routerに呼ばれるvue

About.vue
<template>
  <div class="about">
    <v-contaienr>
      <v-layout> <!-- row -->
        <v-flex></v-flex> <!-- column1 -->
          <p></p> <!-- row1 -->
          <p></p> <!-- row2 -->
        <v-flex></v-flex> <!-- column2 -->
      </v-layout>
    </v-contaienr>
  </div>
</template>

行と列の対応

図1.png

About.vueの画面上をグリッドで分割して見たとき、v-containerの子要素であるv-layoutが「行(row)」になる。以下、階層を下るたびに入れ替わる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?