Vue 프로젝트 생성 및 기본 설정
$ vue create 프로젝트이름
https://vuejs.github.io/vetur/guide/setup.html#project-setup
Setup | Vetur
Setup Extensions VS Code Config Add vue to your eslint.validate setting, for example: Project Setup jsconfig.json vs. tsconfig.json Use tsconfig.json for a pure TS project. Use jsconfig.json for a pure JS project. Use both with allowJs: true for a mixed JS
vuejs.github.io
Setup > Project Setup를 참고하여 jsconfig.json, tsconfig.json 두 파일을 수정해준다.
<template>
<div> {{ greeting(name) }} </div>
</template>
<script>
export default {
setup() {
const name = "혜수";
const greeting = (name) => {
return '안녕하세요 ' + name;
};
return {
name,
greeting,
};
}
}
</script>
<style>
</style>
와 greeting 화살표함수 만들고 name 매개변수도 넣었다.