shineout 3.4.4-beta.3 → 3.4.4-beta.5

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.
package/cjs/index.js CHANGED
@@ -492,5 +492,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
492
492
  // 此文件由脚本自动生成,请勿直接修改。
493
493
  // This file was generated automatically by a script. Please do not modify it directly.
494
494
  var _default = exports.default = {
495
- version: '3.4.4-beta.3'
495
+ version: '3.4.4-beta.5'
496
496
  };
package/dist/shineout.js CHANGED
@@ -11984,7 +11984,7 @@ var handleStyle = function handleStyle(style) {
11984
11984
  };
11985
11985
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
11986
11986
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
11987
- /* harmony default export */ var version = ('3.4.4-beta.3');
11987
+ /* harmony default export */ var version = ('3.4.4-beta.5');
11988
11988
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
11989
11989
 
11990
11990
 
@@ -34017,7 +34017,17 @@ var input_Input = function Input(props) {
34017
34017
  var forwardProps = removeProps(commonProps, objectSpread2_default()({}, inputFormatParams));
34018
34018
  return /*#__PURE__*/(0,jsx_runtime.jsx)(simple_input, objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, forwardProps), inputFormatProps), {}, {
34019
34019
  value: (_inputFormatProps$val = inputFormatProps.value) !== null && _inputFormatProps$val !== void 0 ? _inputFormatProps$val : '',
34020
- hasSuffix: !!props.suffix
34020
+ hasSuffix: !!props.suffix,
34021
+ onKeyDown: function onKeyDown(e) {
34022
+ var _props$onKeyDown;
34023
+ e.preventDefault();
34024
+ if (e.key === 'Enter' && !e.defaultPrevented) {
34025
+ var _props$onChange;
34026
+ var value = e.target.value;
34027
+ (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, value);
34028
+ }
34029
+ (_props$onKeyDown = props.onKeyDown) === null || _props$onKeyDown === void 0 || _props$onKeyDown.call(props, e);
34030
+ }
34021
34031
  }));
34022
34032
  };
34023
34033
  /* harmony default export */ var base_src_input_input = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().memo(input_Input));
@@ -38936,7 +38946,11 @@ function useFormControl(props) {
38936
38946
  setErrorState(error);
38937
38947
  }
38938
38948
  if (!shallowEqual(value, latestInfo.valueState)) {
38939
- setValueState(value);
38949
+ if (value === undefined && defaultValue !== undefined) {
38950
+ setValueState(defaultValue);
38951
+ } else {
38952
+ setValueState(value);
38953
+ }
38940
38954
  latestInfo.valueState = value;
38941
38955
  }
38942
38956
  });
@@ -46261,10 +46275,12 @@ var useForm = function useForm(props) {
46261
46275
  });
46262
46276
  var handleSubmit = function handleSubmit(other) {
46263
46277
  return function (e) {
46264
- var _other$onSubmit;
46265
46278
  e.preventDefault();
46266
- submit();
46267
- other === null || other === void 0 || (_other$onSubmit = other.onSubmit) === null || _other$onSubmit === void 0 || _other$onSubmit.call(other, e);
46279
+ setTimeout(function () {
46280
+ var _other$onSubmit;
46281
+ submit();
46282
+ other === null || other === void 0 || (_other$onSubmit = other.onSubmit) === null || _other$onSubmit === void 0 || _other$onSubmit.call(other, e);
46283
+ }, 10);
46268
46284
  };
46269
46285
  };
46270
46286
  var validateFieldset = function validateFieldset(name) {
@@ -65265,7 +65281,7 @@ var upload_interface = __webpack_require__(8821);
65265
65281
 
65266
65282
 
65267
65283
  /* harmony default export */ var src_0 = ({
65268
- version: '3.4.4-beta.3'
65284
+ version: '3.4.4-beta.5'
65269
65285
  });
65270
65286
  }();
65271
65287
  /******/ return __webpack_exports__;