Vue.js(5.宣言レンダリングと入力ハンドル)

4291 ワード

1.4で作成したプロジェクトbanchに追加!

// 초기화 후 확인 및 commit까지 진행
// commit이 되어야 branch를 만들 수 있다!
git init
git status
git add .
git status
git commit -m 'eslint'
// 현재 branch 확인 및 생성
git branch
git checkout -b eslint 
git branch
// remote 설정 후 push
git remote add origin https://github.com/minseung-moon/webpack-template-basic.git
git push origin eslint

2.ブランチテンプレートを使用!

  • 新しいウィンドウで
  • を行う.
    cd .\Desktop\
    // #branch 명
    npx degit minseung-moon/webpack-template-basic#eslint vue3-test
    cd .\vue3-test\
    code . -r

    3.宣言レンダリングと入力ハンドル


    01.現在必要なパッケージをインストール!

  • gitでプッシュするときはパッケージが含まれていないので、インストールが必要です!
  • npm i
    or 
    npm install

    02. App.vueを修正!


    <template>
      <h1 @click="increase">
        {{ count }}
      </h1>
    </template>
    
    <script>
    export default {
        data() {
            return {
                count : 0
            }
        },
        methods : {
            increase () {
                this.count += 1;
            }
        }
    }
    </script>
    
    <style>
        h1 {
            font-size: 50px;
            color : royalblue;
        }
    </style>