Vue의 기본 구조는 template / script / style로 구성된다.
<template>
<div>
<h4 :style="스타일 명 변경">{{ name1 }} 원룸</h4>
<p>{{ price1 }} 만원</p>
</div>
<div>
<h4>{{ name2 }} 원룸</h4>
<p>{{ price2 }} 만원</p>
</div>
</template>
import { defineComponent } from 'vue';
export default defineComponent({
name: 'App',
data(){
return{
price1 : 500,
price2 : 600,
name1 : "양천구",
name2 : "강서구",
스타일명 변경 : "color : red"
}
},
components: {
}
});