Skip to content

Commit

Permalink
fix: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryChangCN committed Mar 25, 2018
1 parent 2a5664d commit 4ce894d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zlp",
"version": "1.0.4",
"version": "1.0.5",
"description": "single react data flow tools",
"main": "lib/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { connect } from 'zlp'
import a from '/store/a'

// 一个组件可以绑定多个 store a\b\c 都是 store 示例
@connect(a, b, c)
@connect([a, b, c])
class Index extends React.Component {
render () {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/connect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface ConnectStore {
handle?: () => void
}

export default function connect (stores: Store[] | any): any {
export default function connect (stores: any | Store[]): any {
let arr: Store[] = []
if (Array.isArray(stores)) {
arr = stores
Expand Down
1 change: 0 additions & 1 deletion src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class Store {

protected setStore (path, value) {
set(this.store, path, value)
this.store[path] = value
this.emit('change')
}

Expand Down

0 comments on commit 4ce894d

Please sign in to comment.