๐Ÿ“• Language/Vue

[Age of Vue] Vue.js ์‹œ์ž‘ํ•˜๊ธฐ - 29. ์‹ฑ๊ธ€ ํŒŒ์ผ ์ปดํฌ๋„ŒํŠธ ์†Œ๊ฐœ ๋ฐ ๋ฐฐ์šด ๋‚ด์šฉ ์ ์šฉ

a n u e 2022. 5. 8. 13:50

vu + tab

<template>
      <!--HTML-->
</template>

<script>
export default {
    //Javascript - ์ธ์Šคํ„ด์Šค ์˜ต์…˜
}
</script>

<style>
    /** CSS */
</style>

<template>
  <div id="app">
    <img alt="Vue logo" src="./assets/logo.png">
    <HelloWorld msg="Welcome to Your Vue.js App"/> 
    <!-- ์ปดํฌ๋„ŒํŠธ ๋ช…๋ช…๋ฒ• ์ข…๋ฅ˜ (๋„ค์ด๋ฐ ์ปจ๋ฒค์…˜)
      <hello-world></hello-world>
      <HelloWorld></HelloWorld>
      <HelloWorld/>
    -->
  </div>
</template>

<script>
//1.์ปดํฌ๋„ŒํŠธ๋ฅผ importํ•˜์—ฌ ๋“ค๊ณ ์™€์„œ
import HelloWorld from './components/HelloWorld.vue'

export default {
  name: 'App',
  //2. components ์†์„ฑ์— ๋„ฃ์–ด ์‚ฌ์šฉํ•œ๋‹ค.
  components: {
    HelloWorld,
    //'hello-world' : HelloWorld, ๊ณผ ๋™์ผํ•˜๋‹ค
}
}
</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;
}
</style>