facebook twitter hatena line email

Javascript/nuxtjs/helloworld

提供: 初心者エンジニアの簡易メモ
2021年6月9日 (水) 18:16時点におけるAdmin (トーク | 投稿記録)による版

(差分) ←前の版 | 最新版 (差分) | 次の版→ (差分)
移動: 案内検索

pages/index.vue

<template>
  <div id="app">
    <h1>{{ msg }}</h1>
  </div>
</template>
<script>
export default {
  name: 'app',
  data() {
    return {
      msg: 'Welcome to App'
    }
  },
  mounted() {
     // インスタンスがマウントされた直後に実行
  }
}
</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;
}
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}

実行

$ yarn dev

参考

Javascript/vue/node/helloworld [ショートカット]