初始化项目

vue create todo-list

? Please pick a preset: Manually select features
? Check the features needed for your project: (Press <space> to select, <a> to toggle all, <i> to inve
? Check the features needed for your project: (Press <space> to select, <a> to toggle all, <i> to inve
? Check the features needed for your project: (Press <space> to select, <a> to toggle all, <i> to inve
? Check the features needed for your project: Choose Vue version, Babel, TS, Vuex
? Choose a version of Vue.js that you want to start the project with 3.x
? Use class-style component syntax? No
? Use Babel alongside TypeScript (required for modern mode, auto-detected polyfills, transpiling JSX)?
 Yes
? Where do you prefer placing config for Babel, ESLint, etc.? In package.json
? Save this as a preset for future projects? No

Untitled

Vuex

工作流

标准流程:

所需成员:

  1. actionTypes action 类型
  2. actions 调用 mutation 的方法
  3. mutations 更改 state 的方法
  4. state 中央数据管理池
  5. store出口 action、mutations、state 统一到仓库里进行管理

Untitled