@sheinx/hooks 3.6.1-beta.3 → 3.6.1-beta.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"use-form.d.ts","sourceRoot":"","sources":["use-form.ts"],"names":[],"mappings":"AA+BA,OAAO,EAEL,aAAa,EACb,YAAY,EACZ,gBAAgB,EAGhB,gBAAgB,EAEjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAe,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI5D,QAAA,MAAM,OAAO;;;;;;;;;wBAyRC;gBAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;gBAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;aAAE;8BA9Jd,MAAM;oCAiOD,OAAO;;6BAfb,MAAM,KAAK,KAAK,GAAG,SAAS;;oCAdrB,MAAM,EAAE;sCA5LxC,MAAM,GAAG,MAAM,EAAE,WAAU,gBAAgB;qCA8PvB,MAAM,WAAW,gBAAgB;gCA/CzB,MAAM,SAAS,MAAM,UAAU,KAAK;gCAKpC,MAAM,SAAS,MAAM;kCAnIpD,MAAM,0BAAyB,qBAAqB;;;;;;oBAqEjD;YAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;SAAE;0BA9Jd,MAAM;gCAiOD,OAAO;;yBAfb,MAAM,KAAK,KAAK,GAAG,SAAS;;gCAdrB,MAAM,EAAE;kCA5LxC,MAAM,GAAG,MAAM,EAAE,WAAU,gBAAgB;iCA8PvB,MAAM,WAAW,gBAAgB;4BA/CzB,MAAM,SAAS,MAAM,UAAU,KAAK;4BAKpC,MAAM,SAAS,MAAM;8BAnIpD,MAAM,0BAAyB,qBAAqB;;CAma9D,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"use-form.d.ts","sourceRoot":"","sources":["use-form.ts"],"names":[],"mappings":"AA+BA,OAAO,EAEL,aAAa,EACb,YAAY,EACZ,gBAAgB,EAGhB,gBAAgB,EAEjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAe,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI5D,QAAA,MAAM,OAAO;;;;;;;;;wBAyRC;gBAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;gBAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;aAAE;8BA9Jd,MAAM;oCAiOD,OAAO;;6BAfb,MAAM,KAAK,KAAK,GAAG,SAAS;;oCAdrB,MAAM,EAAE;sCA5LxC,MAAM,GAAG,MAAM,EAAE,WAAU,gBAAgB;qCA8PvB,MAAM,WAAW,gBAAgB;gCA/CzB,MAAM,SAAS,MAAM,UAAU,KAAK;gCAKpC,MAAM,SAAS,MAAM;kCAnIpD,MAAM,0BAAyB,qBAAqB;;;;;;oBAqEjD;YAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;SAAE;0BA9Jd,MAAM;gCAiOD,OAAO;;yBAfb,MAAM,KAAK,KAAK,GAAG,SAAS;;gCAdrB,MAAM,EAAE;kCA5LxC,MAAM,GAAG,MAAM,EAAE,WAAU,gBAAgB;iCA8PvB,MAAM,WAAW,gBAAgB;4BA/CzB,MAAM,SAAS,MAAM,UAAU,KAAK;4BAKpC,MAAM,SAAS,MAAM;8BAnIpD,MAAM,0BAAyB,qBAAqB;;CAka9D,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -591,7 +591,6 @@ var useForm = function useForm(props) {
591
591
  }
592
592
  context.lastValue = props.value;
593
593
  };
594
- updateValue();
595
594
  React.useEffect(function () {
596
595
  // 服务端错误更新
597
596
  if (!props.error) context.serverErrors = {};else {
@@ -607,6 +606,7 @@ var useForm = function useForm(props) {
607
606
 
608
607
  // 默认值更新
609
608
  React.useEffect(function () {
609
+ updateValue();
610
610
  context.removeLock = false;
611
611
  // 内部 onChange 改的 value, 不需要更新
612
612
  if (props.value === context.value) return;
@@ -1 +1 @@
1
- {"version":3,"file":"use-form.d.ts","sourceRoot":"","sources":["use-form.ts"],"names":[],"mappings":"AA+BA,OAAO,EAEL,aAAa,EACb,YAAY,EACZ,gBAAgB,EAGhB,gBAAgB,EAEjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAe,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI5D,QAAA,MAAM,OAAO;;;;;;;;;wBAyRC;gBAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;gBAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;aAAE;8BA9Jd,MAAM;oCAiOD,OAAO;;6BAfb,MAAM,KAAK,KAAK,GAAG,SAAS;;oCAdrB,MAAM,EAAE;sCA5LxC,MAAM,GAAG,MAAM,EAAE,WAAU,gBAAgB;qCA8PvB,MAAM,WAAW,gBAAgB;gCA/CzB,MAAM,SAAS,MAAM,UAAU,KAAK;gCAKpC,MAAM,SAAS,MAAM;kCAnIpD,MAAM,0BAAyB,qBAAqB;;;;;;oBAqEjD;YAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;SAAE;0BA9Jd,MAAM;gCAiOD,OAAO;;yBAfb,MAAM,KAAK,KAAK,GAAG,SAAS;;gCAdrB,MAAM,EAAE;kCA5LxC,MAAM,GAAG,MAAM,EAAE,WAAU,gBAAgB;iCA8PvB,MAAM,WAAW,gBAAgB;4BA/CzB,MAAM,SAAS,MAAM,UAAU,KAAK;4BAKpC,MAAM,SAAS,MAAM;8BAnIpD,MAAM,0BAAyB,qBAAqB;;CAma9D,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"use-form.d.ts","sourceRoot":"","sources":["use-form.ts"],"names":[],"mappings":"AA+BA,OAAO,EAEL,aAAa,EACb,YAAY,EACZ,gBAAgB,EAGhB,gBAAgB,EAEjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAe,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI5D,QAAA,MAAM,OAAO;;;;;;;;;wBAyRC;gBAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;gBAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;aAAE;8BA9Jd,MAAM;oCAiOD,OAAO;;6BAfb,MAAM,KAAK,KAAK,GAAG,SAAS;;oCAdrB,MAAM,EAAE;sCA5LxC,MAAM,GAAG,MAAM,EAAE,WAAU,gBAAgB;qCA8PvB,MAAM,WAAW,gBAAgB;gCA/CzB,MAAM,SAAS,MAAM,UAAU,KAAK;gCAKpC,MAAM,SAAS,MAAM;kCAnIpD,MAAM,0BAAyB,qBAAqB;;;;;;oBAqEjD;YAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;SAAE;0BA9Jd,MAAM;gCAiOD,OAAO;;yBAfb,MAAM,KAAK,KAAK,GAAG,SAAS;;gCAdrB,MAAM,EAAE;kCA5LxC,MAAM,GAAG,MAAM,EAAE,WAAU,gBAAgB;iCA8PvB,MAAM,WAAW,gBAAgB;4BA/CzB,MAAM,SAAS,MAAM,UAAU,KAAK;4BAKpC,MAAM,SAAS,MAAM;8BAnIpD,MAAM,0BAAyB,qBAAqB;;CAka9D,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -582,7 +582,6 @@ var useForm = function useForm(props) {
582
582
  }
583
583
  context.lastValue = props.value;
584
584
  };
585
- updateValue();
586
585
  React.useEffect(function () {
587
586
  // 服务端错误更新
588
587
  if (!props.error) context.serverErrors = {};else {
@@ -598,6 +597,7 @@ var useForm = function useForm(props) {
598
597
 
599
598
  // 默认值更新
600
599
  React.useEffect(function () {
600
+ updateValue();
601
601
  context.removeLock = false;
602
602
  // 内部 onChange 改的 value, 不需要更新
603
603
  if (props.value === context.value) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/hooks",
3
- "version": "3.6.1-beta.3",
3
+ "version": "3.6.1-beta.4",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",