shineout 3.1.26 → 3.1.27

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
@@ -476,5 +476,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
476
476
  // 此文件由脚本自动生成,请勿直接修改。
477
477
  // This file was generated automatically by a script. Please do not modify it directly.
478
478
  var _default = exports.default = {
479
- version: '3.1.26'
479
+ version: '3.1.27'
480
480
  };
package/dist/shineout.js CHANGED
@@ -11949,7 +11949,7 @@ var handleStyle = function handleStyle(style) {
11949
11949
  };
11950
11950
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
11951
11951
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
11952
- /* harmony default export */ var version = ('3.1.26');
11952
+ /* harmony default export */ var version = ('3.1.27');
11953
11953
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
11954
11954
 
11955
11955
 
@@ -21715,7 +21715,7 @@ var sliderStyle = {
21715
21715
  bottom: '100%',
21716
21716
  '&[dir=ltr]': {
21717
21717
  left: 0,
21718
- transform: 'translate(-50%, 10px)'
21718
+ transform: 'translate(-50%, -10px)'
21719
21719
  },
21720
21720
  '&[dir=rtl]': {
21721
21721
  right: 0,
@@ -35335,6 +35335,7 @@ var ResultInput = function ResultInput(props) {
35335
35335
  onChange: onChange,
35336
35336
  onBlur: handleBlur,
35337
35337
  open: focus,
35338
+ disabled: props.disabled,
35338
35339
  onPaste: handlePaste
35339
35340
  }), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
35340
35341
  className: styles.inputMirror,
@@ -35723,6 +35724,27 @@ var More = function More(props) {
35723
35724
  });
35724
35725
  itemsLength = after.length;
35725
35726
  }
35727
+ if (showNum < 0 || showNum >= data.length) {
35728
+ return /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
35729
+ children: [data, /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_tag_tag, {
35730
+ className: styles.tag,
35731
+ jssStyle: jssStyle,
35732
+ size: size,
35733
+ style: {
35734
+ position: 'absolute',
35735
+ zIndex: -100,
35736
+ userSelect: 'none',
35737
+ msUserSelect: 'none',
35738
+ contain: 'layout'
35739
+ },
35740
+ mode: visible ? 'fill' : 'bright',
35741
+ color: visible ? 'info' : 'default',
35742
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
35743
+ children: "+"
35744
+ })
35745
+ }, 'hidden')]
35746
+ });
35747
+ }
35726
35748
  return /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
35727
35749
  children: [shouldShowMore ? data : before, /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
35728
35750
  style: {
@@ -35876,7 +35898,8 @@ var result_Result = function Result(props) {
35876
35898
  convertBr: convertBr,
35877
35899
  onInputBlur: onInputBlur,
35878
35900
  onClearCreatedData: onClearCreatedData,
35879
- placeholder: placeholder2
35901
+ placeholder: placeholder2,
35902
+ disabled: isFunc(disabled) ? false : !!disabled
35880
35903
  })
35881
35904
  }, 'input');
35882
35905
  };
@@ -39982,7 +40005,8 @@ var TimeScroll = function TimeScroll(props) {
39982
40005
  var elRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
39983
40006
  var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
39984
40007
  timer: null,
39985
- changeTimer: null
40008
+ changeTimer: null,
40009
+ controlScroll: false
39986
40010
  }),
39987
40011
  context = _useRef.current;
39988
40012
  var _useResize = useResize({
@@ -39995,11 +40019,12 @@ var TimeScroll = function TimeScroll(props) {
39995
40019
  var el = elRef.current;
39996
40020
  if (!el) return;
39997
40021
  var lineHeight = el.childNodes[0].clientHeight;
40022
+ context.controlScroll = true;
39998
40023
  el.scrollTop = lineHeight * index;
39999
40024
  }, immudiate ? 0 : 30);
40000
40025
  };
40001
40026
  var changeToIndex = function changeToIndex(index) {
40002
- if (!times[index] || times[index].disabled || index === currentIndex) {
40027
+ if (!times[index] || times[index].disabled || index === currentIndex && !props.isEmpty) {
40003
40028
  return;
40004
40029
  }
40005
40030
  onChange(times[index].date);
@@ -40007,6 +40032,10 @@ var TimeScroll = function TimeScroll(props) {
40007
40032
  var handleScroll = function handleScroll(e) {
40008
40033
  if (context.changeTimer) clearTimeout(context.changeTimer);
40009
40034
  var el = e.currentTarget;
40035
+ if (context.controlScroll) {
40036
+ context.controlScroll = false;
40037
+ return;
40038
+ }
40010
40039
  context.changeTimer = setTimeout(function () {
40011
40040
  if (!el) return;
40012
40041
  var lineHeight = el.childNodes[0].clientHeight;
@@ -40107,6 +40136,7 @@ var Time = function Time(props) {
40107
40136
  jssStyle: props.jssStyle,
40108
40137
  times: item.times,
40109
40138
  currentIndex: item.currentIndex,
40139
+ isEmpty: props.value === null || props.value === undefined,
40110
40140
  onChange: func.handleChange
40111
40141
  }, item.mode);
40112
40142
  })
@@ -44234,6 +44264,13 @@ var useForm = function useForm(props) {
44234
44264
  size: size
44235
44265
  };
44236
44266
  }, [labelWidth, labelAlign, labelVerticalAlign, keepErrorHeight, inline, disabled, size]);
44267
+ var updateValue = function updateValue() {
44268
+ if (props.value !== context.lastValue && props.value !== context.value) {
44269
+ context.value = deepClone(props.value) || emptyObj;
44270
+ context.lastValue = props.value;
44271
+ }
44272
+ };
44273
+ updateValue();
44237
44274
  external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
44238
44275
  // 服务端错误更新
44239
44276
  if (!props.error) context.serverErrors = {};else {
@@ -44250,8 +44287,8 @@ var useForm = function useForm(props) {
44250
44287
  // 默认值更新
44251
44288
  external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
44252
44289
  context.removeLock = false;
44253
- if (props.value === context.lastValue) return;
44254
- context.value = deepClone(props.value) || emptyObj;
44290
+ // 内部 onChange 改的 value, 不需要更新
44291
+ if (props.value === context.value) return;
44255
44292
  if (initValidate && !context.resetTime) {
44256
44293
  var keys = Object.keys(context.validateMap).filter(function (key) {
44257
44294
  var oldValue = deepGet(context.lastValue || emptyObj, key);
@@ -62363,7 +62400,7 @@ var upload_interface = __webpack_require__(4412);
62363
62400
 
62364
62401
 
62365
62402
  /* harmony default export */ var src_0 = ({
62366
- version: '3.1.26'
62403
+ version: '3.1.27'
62367
62404
  });
62368
62405
  }();
62369
62406
  /******/ return __webpack_exports__;