diff --git a/Store.md b/Store.md index 1b1cd64..9c55032 100644 --- a/Store.md +++ b/Store.md @@ -20,4 +20,22 @@ app.use(store) 在任意`wkit`组件内, 都可以通过`this.$store`访问到该对象, 修改store中的任意属性, 均会同步更新到各个组件的视图。 -在非`wkit`组件中, 可以使用`getStore()`获取到store对象。 \ No newline at end of file +在非`wkit`组件中, 可以使用`getStore()`获取到store对象。 + + +```js + + +class Foo extends Component { + + mounted() { + + watch('$store.foo', val => { + // todo... + }) + + } + +} + +``` \ No newline at end of file