File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 19
19
![ 手机] ( https://img.alicdn.com/tps/TB1kvJyOVXXXXbhaFXXXXXXXXXX-320-555.gif )
20
20
21
21
### 数据持久化
22
- ![ 数据持久化 ] ( http ://7xkm8j.com1.z0.glb.clouddn. com/persistence.gif )
22
+ < iframe width = " 560 " height = " 315 " src = " https ://www.youtube. com/embed/SzTNX7rg9Qg " frameborder = " 0 " allowfullscreen ></ iframe >
23
23
24
24
玩单机游戏最怕什么?断电。通过订阅 ` store.subscribe ` ,将state储存在localStorage,精确记录所有状态。网页关了刷新了、程序崩溃了、手机没电了,重新打开连接,都可以继续。
25
25
26
26
### Vuex 状态预览([ Vue DevTools extension] ( https://github.com/vuejs/vue-devtools ) )
27
- ![ Vuex状态预览 ] ( http ://7xkm8j.com1.z0.glb.clouddn. com/vuex.gif )
27
+ < iframe width = " 560 " height = " 315 " src = " https ://www.youtube. com/embed/iuoSSTqSAUE " frameborder = " 0 " allowfullscreen ></ iframe >
28
28
29
29
Vuex 设计管理了所有应存的状态,这是上面持久化的保证。
30
30
You can’t perform that action at this time.
0 commit comments