Skip to content

Commit

Permalink
文档更新
Browse files Browse the repository at this point in the history
  • Loading branch information
coder-hxl committed Feb 24, 2023
1 parent 1156b8c commit 40ae4c7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ npm install xl-store
## 示例

```JavaScript
// 1.导入 xlStore
// 1.导入模块 ES/CJS
import xlStore from 'xl-store'
// const xlStore = require('xlStore')

// 2.定义一个仓库
const myStore = xlStore({
Expand Down Expand Up @@ -75,7 +74,7 @@ myStore.changeInfoAction(2, 'codehxl', 19)

##### Content

包含两个参数
接收两个参数

- State: Object

Expand All @@ -87,7 +86,7 @@ myStore.changeInfoAction(2, 'codehxl', 19)

##### Options

包含一个参数
接收一个参数

- isDeepWatch: Boolean

Expand All @@ -99,6 +98,8 @@ myStore.changeInfoAction(2, 'codehxl', 19)

#### watch

函数接收两个参数:

- Key: String | String[]

- Callback: Function
Expand All @@ -107,6 +108,8 @@ myStore.changeInfoAction(2, 'codehxl', 19)

#### watchEffect

函数接收两个参数:

- Key: String | String[]

- Callback: Function
Expand All @@ -115,6 +118,8 @@ myStore.changeInfoAction(2, 'codehxl', 19)

#### deleteWatch

函数接收两个参数:

- Key: String | String[]

- Callback: Function
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": "true",
"name": "xl-store",
"version": "0.1.16",
"version": "0.1.17",
"author": "coderhxl",
"description": "状态管理库",
"license": "MIT",
Expand Down
13 changes: 9 additions & 4 deletions publish/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ npm install xl-store
## 示例

```JavaScript
// 1.导入 xlStore
// 1.导入模块 ES/CJS
import xlStore from 'xl-store'
// const xlStore = require('xlStore')

// 2.定义一个仓库
const myStore = xlStore({
Expand Down Expand Up @@ -75,7 +74,7 @@ myStore.changeInfoAction(2, 'codehxl', 19)

##### Content

包含两个参数
接收两个参数

- State: Object

Expand All @@ -87,7 +86,7 @@ myStore.changeInfoAction(2, 'codehxl', 19)

##### Options

包含一个参数
接收一个参数

- isDeepWatch: Boolean

Expand All @@ -99,6 +98,8 @@ myStore.changeInfoAction(2, 'codehxl', 19)

#### watch

函数接收两个参数:

- Key: String | String[]

- Callback: Function
Expand All @@ -107,6 +108,8 @@ myStore.changeInfoAction(2, 'codehxl', 19)

#### watchEffect

函数接收两个参数:

- Key: String | String[]

- Callback: Function
Expand All @@ -115,6 +118,8 @@ myStore.changeInfoAction(2, 'codehxl', 19)

#### deleteWatch

函数接收两个参数:

- Key: String | String[]

- Callback: Function
Expand Down
2 changes: 1 addition & 1 deletion publish/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xl-store",
"version": "0.1.16",
"version": "0.1.17",
"author": "coderhxl",
"description": "状态管理库",
"license": "MIT",
Expand Down

0 comments on commit 40ae4c7

Please sign in to comment.