shineout 3.6.1-beta.1 → 3.6.1-beta.2

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
@@ -514,5 +514,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
514
514
  // 此文件由脚本自动生成,请勿直接修改。
515
515
  // This file was generated automatically by a script. Please do not modify it directly.
516
516
  var _default = exports.default = {
517
- version: '3.6.1-beta.1'
517
+ version: '3.6.1-beta.2'
518
518
  };
package/dist/shineout.js CHANGED
@@ -12139,7 +12139,7 @@ var handleStyle = function handleStyle(style) {
12139
12139
  };
12140
12140
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12141
12141
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12142
- /* harmony default export */ var version = ('3.6.1-beta.1');
12142
+ /* harmony default export */ var version = ('3.6.1-beta.2');
12143
12143
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12144
12144
 
12145
12145
 
@@ -55639,11 +55639,12 @@ var PaginationJumper = function PaginationJumper(props) {
55639
55639
  pageSize = props.pageSize,
55640
55640
  disabled = props.disabled,
55641
55641
  text = props.text,
55642
+ current = props.current,
55642
55643
  onChange = props.onChange;
55643
55644
  var paginationStyle = jssStyle === null || jssStyle === void 0 || (_jssStyle$pagination = jssStyle.pagination) === null || _jssStyle$pagination === void 0 ? void 0 : _jssStyle$pagination.call(jssStyle);
55644
55645
  var rootClasses = classnames_default()(paginationStyle === null || paginationStyle === void 0 ? void 0 : paginationStyle.section, paginationStyle === null || paginationStyle === void 0 ? void 0 : paginationStyle.jumper);
55645
55646
  var txt = text.jumper ? text.jumper.split('{input}') : [];
55646
- var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(''),
55647
+ var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(String(current)),
55647
55648
  _useState2 = slicedToArray_default()(_useState, 2),
55648
55649
  value = _useState2[0],
55649
55650
  setValue = _useState2[1];
@@ -55651,23 +55652,28 @@ var PaginationJumper = function PaginationJumper(props) {
55651
55652
  return Math.ceil(total / pageSize) || 1;
55652
55653
  };
55653
55654
  var cleatInternalState = function cleatInternalState() {
55655
+ if (simple) return;
55654
55656
  setValue('');
55655
55657
  };
55656
55658
  var handleKeyDown = function handleKeyDown(e) {
55657
55659
  if (e.key === 'Enter' || e.keyCode === 13) {
55658
- var current = parseInt(e.target.value, 10);
55659
- if (!Number.isFinite(current)) return;
55660
- if (current < 1) current = 1;
55660
+ var _current = parseInt(e.target.value, 10);
55661
+ if (!Number.isFinite(_current)) return;
55662
+ if (_current < 1) _current = 1;
55661
55663
  var max = getMax();
55662
- if (current > max) current = max;
55663
- onChange(current);
55664
- setValue(String(current));
55664
+ if (_current > max) _current = max;
55665
+ onChange(_current);
55666
+ setValue(String(_current));
55665
55667
  setTimeout(cleatInternalState, 20);
55666
55668
  }
55667
55669
  };
55668
55670
  var handleChange = function handleChange(v) {
55669
55671
  setValue(v || '');
55670
55672
  };
55673
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
55674
+ if (!simple) return;
55675
+ setValue(String(current));
55676
+ }, [current, simple]);
55671
55677
  var renderInput = function renderInput() {
55672
55678
  return /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_input_input, {
55673
55679
  jssStyle: jssStyle,
@@ -56075,6 +56081,7 @@ var PaginationSimple = function PaginationSimple(props) {
56075
56081
  total: total,
56076
56082
  text: text,
56077
56083
  size: size,
56084
+ current: current,
56078
56085
  pageSize: pageSize,
56079
56086
  onChange: onChange
56080
56087
  });
@@ -56232,6 +56239,7 @@ var Pagination = function Pagination(props) {
56232
56239
  return /*#__PURE__*/(0,jsx_runtime.jsx)(pagination_jumper, objectSpread2_default()(objectSpread2_default()({}, props), {}, {
56233
56240
  text: text,
56234
56241
  total: total,
56242
+ current: current,
56235
56243
  pageSize: pageSize,
56236
56244
  onChange: onChange
56237
56245
  }), i);
@@ -69660,7 +69668,7 @@ var upload_interface = __webpack_require__(8821);
69660
69668
 
69661
69669
 
69662
69670
  /* harmony default export */ var src_0 = ({
69663
- version: '3.6.1-beta.1'
69671
+ version: '3.6.1-beta.2'
69664
69672
  });
69665
69673
  }();
69666
69674
  /******/ return __webpack_exports__;