Files
ClassContent/历届学生/罗朝/2019-06-04/笔记.txt
2024-09-27 02:06:13 +08:00

12 lines
467 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

State : 用来存放Vuex变量的数据作用类似于vuex
Getter : 用来读取 State 里面的数据
Mutation : 用来修改 State 里面的数据
Action :
vuex 使用套路:
1 写数据Action 执行一个方法,然后把方法运算结果 传递给 Mutation 中的某个方法AA会直接帮我
向 State 中写入数据
2 读数据: 调用 Getter里面的方法B然后B会帮我们读取 State 的数据,并返回给调用者