1
0
mirror of synced 2025-11-06 04:30:39 +08:00
This commit is contained in:
binaryify
2019-05-23 10:55:58 +08:00
parent 26ef850230
commit 7b844f42ea
2 changed files with 5 additions and 5 deletions

View File

@@ -23,14 +23,14 @@ Please view [README.md](https://github.com/Binaryify/vue-tetris/blob/master/READ
### 数据持久化
[视频](http://static.binaryify.com/persistence.mp4)
[视频](https://static.binaryify.com/persistence.mp4)
玩单机游戏最怕什么?断电。通过订阅 `store.subscribe`将state储存在localStorage精确记录所有状态。网页关了刷新了、程序崩溃了、手机没电了重新打开连接都可以继续。
### Vuex 状态预览([Vue DevTools extension](https://github.com/vuejs/vue-devtools)
![preview](http://static.binaryify.com/vuex.gif)
![preview](https://static.binaryify.com/vuex.gif)
[视频](http://static.binaryify.com/vuex.mp4)
[视频](https://static.binaryify.com/vuex.mp4)
Vuex 设计管理了所有应存的状态,这是上面持久化的保证。