@carefrees/form-utils-react-hooks 0.0.9 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,4 +16,4 @@ export declare class WatchInstanceBase {
16
16
  /**
17
17
  * 字段监听
18
18
  */
19
- export declare const useWatch: (name: string, form: FormInstanceBase, callBack?: (value: any, form: FormInstanceBase) => void) => [any, FormInstanceBase, WatchInstanceBase];
19
+ export declare const useWatch: (name: string, form?: FormInstanceBase, callBack?: (value: any, form: FormInstanceBase) => void) => [any, FormInstanceBase, WatchInstanceBase];
@@ -16,4 +16,4 @@ export declare class WatchInstanceBase {
16
16
  /**
17
17
  * 字段监听
18
18
  */
19
- export declare const useWatch: (name: string, form: FormInstanceBase, callBack?: (value: any, form: FormInstanceBase) => void) => [any, FormInstanceBase, WatchInstanceBase];
19
+ export declare const useWatch: (name: string, form?: FormInstanceBase, callBack?: (value: any, form: FormInstanceBase) => void) => [any, FormInstanceBase, WatchInstanceBase];
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "SunLxy <1011771396@qq.com>",
4
4
  "description": "表单组件公共hooks",
5
5
  "homepage": "https://github.com/SunLxy/carefrees-form-utils",
6
- "version": "0.0.9",
6
+ "version": "0.0.11",
7
7
  "main": "lib/index.js",
8
8
  "types": "lib/index.d.ts",
9
9
  "module": "esm/index.js",
@@ -21,7 +21,7 @@
21
21
  "esm"
22
22
  ],
23
23
  "dependencies": {
24
- "@carefrees/form-utils": "^0.0.9"
24
+ "@carefrees/form-utils": "^0.0.11"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/react": "18.2.21",
@@ -35,7 +35,7 @@ export class WatchInstanceBase {
35
35
  */
36
36
  export const useWatch = (
37
37
  name: string,
38
- form: FormInstanceBase,
38
+ form?: FormInstanceBase,
39
39
  callBack?: (value: any, form: FormInstanceBase) => void,
40
40
  ) => {
41
41
  const formInstance = form || useFormInstance();