嵌入视频
This commit is contained in:
@@ -19,12 +19,12 @@
|
||||

|
||||
|
||||
### 数据持久化
|
||||

|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/SzTNX7rg9Qg" frameborder="0" allowfullscreen></iframe>
|
||||
|
||||
玩单机游戏最怕什么?断电。通过订阅 `store.subscribe`,将state储存在localStorage,精确记录所有状态。网页关了刷新了、程序崩溃了、手机没电了,重新打开连接,都可以继续。
|
||||
|
||||
### Vuex 状态预览([Vue DevTools extension](https://github.com/vuejs/vue-devtools))
|
||||

|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/iuoSSTqSAUE" frameborder="0" allowfullscreen></iframe>
|
||||
|
||||
Vuex 设计管理了所有应存的状态,这是上面持久化的保证。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user