diff --git a/README.md b/README.md index 47f24b5..31f8797 100644 --- a/README.md +++ b/README.md @@ -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({ @@ -75,7 +74,7 @@ myStore.changeInfoAction(2, 'codehxl', 19) ##### Content -包含两个参数: +接收两个参数: - State: Object @@ -87,7 +86,7 @@ myStore.changeInfoAction(2, 'codehxl', 19) ##### Options -包含一个参数: +接收一个参数: - isDeepWatch: Boolean @@ -99,6 +98,8 @@ myStore.changeInfoAction(2, 'codehxl', 19) #### watch +函数接收两个参数: + - Key: String | String[] - Callback: Function @@ -107,6 +108,8 @@ myStore.changeInfoAction(2, 'codehxl', 19) #### watchEffect +函数接收两个参数: + - Key: String | String[] - Callback: Function @@ -115,6 +118,8 @@ myStore.changeInfoAction(2, 'codehxl', 19) #### deleteWatch +函数接收两个参数: + - Key: String | String[] - Callback: Function diff --git a/package.json b/package.json index 9868bed..7daca18 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": "true", "name": "xl-store", - "version": "0.1.16", + "version": "0.1.17", "author": "coderhxl", "description": "状态管理库", "license": "MIT", diff --git a/publish/README.md b/publish/README.md index 47f24b5..31f8797 100644 --- a/publish/README.md +++ b/publish/README.md @@ -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({ @@ -75,7 +74,7 @@ myStore.changeInfoAction(2, 'codehxl', 19) ##### Content -包含两个参数: +接收两个参数: - State: Object @@ -87,7 +86,7 @@ myStore.changeInfoAction(2, 'codehxl', 19) ##### Options -包含一个参数: +接收一个参数: - isDeepWatch: Boolean @@ -99,6 +98,8 @@ myStore.changeInfoAction(2, 'codehxl', 19) #### watch +函数接收两个参数: + - Key: String | String[] - Callback: Function @@ -107,6 +108,8 @@ myStore.changeInfoAction(2, 'codehxl', 19) #### watchEffect +函数接收两个参数: + - Key: String | String[] - Callback: Function @@ -115,6 +118,8 @@ myStore.changeInfoAction(2, 'codehxl', 19) #### deleteWatch +函数接收两个参数: + - Key: String | String[] - Callback: Function diff --git a/publish/package.json b/publish/package.json index 9a134c4..20295d4 100644 --- a/publish/package.json +++ b/publish/package.json @@ -1,6 +1,6 @@ { "name": "xl-store", - "version": "0.1.16", + "version": "0.1.17", "author": "coderhxl", "description": "状态管理库", "license": "MIT",