「Javascript/nuxtjs/helloworld」の版間の差分
提供: 初心者エンジニアの簡易メモ
| 行41: | 行41: | ||
} | } | ||
</pre> | </pre> | ||
| + | |||
| + | ==実行== | ||
| + | $ yarn dev | ||
==参考== | ==参考== | ||
[[Javascript/vue/node/helloworld]] [ショートカット] | [[Javascript/vue/node/helloworld]] [ショートカット] | ||
2021年6月7日 (月) 17:07時点における版
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 [ショートカット]
