IT
vue.js 기본 구조 예시
agnusdei1207
2023. 4. 2. 22:51
반응형
SMALL
<template> <!-- HTML 코드 -->
<div id="app">
<Header> <!-- 아래 헤더 파일을 불러옴 -->
</Header>
<!-- 헤더에 비해 자주 바뀌는 영역은 따로 div 처리 -->
<div id="content" class="content">
<router-view>
<!-- 반응형 컴포넌트 -->
</router-view>
</div>
</div>
</template>
<script>
import Header from './components/layout/header.vue'
export default {
name: 'App',
components: {
Header /* import 한 파일을 이 곳에 명시해야 함 */
}
}
</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>
반응형
LIST