Skip to content

Commit 1dfd5f2

Browse files
author
anthinkingcoder
committed
add know to readme.md
1 parent e4f59d4 commit 1dfd5f2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ Using npm:
88
```bash
99
$ npm install vuex-loadings -s
1010
```
11+
## Know
12+
use vxl.aopLoading(commit,loadingName,fn,isPromise) to proxy fn, simplify loading state change
13+
use vxl.mixin({state,getters,mutations},stateObj) to automatic set loading state,loading getter,loading mutation for stateObj
1114

1215
## Example
1316
```js
@@ -38,6 +41,9 @@ const getters = {
3841
}
3942
}
4043

44+
//vxl.aopLoading(commit, loadingName, fn, isPromise)
45+
//isPromise = true, fn must be a promise
46+
// isPromise = false, fn must be receiver two argument, cb and errorCb function
4147
const actions = {
4248
listProduct ({{commit}}) {
4349
//proxy callback

0 commit comments

Comments
 (0)