<template>
<img alt="Vue logo" src="./assets/logo.png">
<HelloWorld msg="Welcome to Your Vue.js App"/> <!--제거-->
</template>
<script>
import HelloWorld from './components/HelloWorld.vue' //제거
export default {
name: 'App',
components: {
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>
<template>
<img alt="Vue logo" src="./assets/logo.png">
</template>
<script>
export default {
name: 'App',
components: {
}
}
</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>
document.getElementById().innerHTML = ??
<template>
<img alt="Vue logo" src="./assets/logo.png">
{{name}}
</template>
<script>
export default {
name: 'App',
data() {
return {
name : '아무개'
}
},
components: {
}
}
</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>
자주 변할 것 같은 데이터들은 js에 데이터로 보관하고 html에 {{}}를 꽂아넣어라
<template>
<img alt="Vue logo" src="./assets/logo.png">
<h1 :style="style">파란색</h1>
</template>
<script>
export default {
name: 'App',
data() {
return {
style: "color: blue;"
}
},
components: {
}
}
</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>