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 メモ

Last updated at Posted at 2018-09-16

Vueファイルは大まかに

<template>
<script>
<css>

で成り立つ。
これでひとつのコンポーネント(部品)となる

このコンポーネントをSinglePageに組み込み、URLのパスで呼び出すコンポーネントを指定する

大元はindex.html
ここにApp.Vueを呼び出す処理を書いておく

  <body>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>

App.Vue

<template>
  <div id="app">
    <img src="./assets/logo.png">
    <router-view/>
  </div>
</template>
<router-view/>

というところに
router/index.jsで定義されたURLのパスに対応するコンポーネントが入ってくる

なので、どの画面でも同じものを表示したければ.App.Vueに書いてしまおう

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?