vue.jsのvuex(データ保存)でカウンター機能を実装する。 1, vueプロジェクトを作る(下準備)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
vue create vue_vuex Vue CLI v4.5.6 ? Please pick a preset: Default ([Vue 2] babel, eslint) Default (Vue 3 Preview) ([Vue 3] babel, eslint) > Manually select features Vue CLI v4.5.6 ? Please pick a preset: Manually select features ? Check the features needed for your project: (*) Choose Vue version (*) Babel ( ) TypeScript ( ) Progressive Web App (PWA) Support (*) Router >(*) Vuex ( ) CSS Pre-processors (*) Linter / Formatter ( ) Unit Testing ( ) E2E Testing # あとはエンター連打 # webサーバ機能で、http://localhost:8080/ がブラウザで見れるようになる。 cd vue_vuex yarn serve |
2, vuex(ストア)の設定を行う src/ 続きを読む vue.jsのvuex(データ保存)でカウンター機能を実装する。→