shineout 3.1.25 → 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.25'
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.25');
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,
@@ -25133,6 +25133,7 @@ var tooltipStyle = objectSpread2_default()(objectSpread2_default()({}, tooltip_a
25133
25133
  boxShadow: src.tooltipShadow,
25134
25134
  color: src.tooltipColor,
25135
25135
  wordWrap: 'break-word',
25136
+ pointerEvents: 'none',
25136
25137
  '&[data-soui-type^="light"]': {
25137
25138
  backgroundColor: src.tooltipLightBackgroundColor,
25138
25139
  color: src.tooltipLightColor,
@@ -35334,6 +35335,7 @@ var ResultInput = function ResultInput(props) {
35334
35335
  onChange: onChange,
35335
35336
  onBlur: handleBlur,
35336
35337
  open: focus,
35338
+ disabled: props.disabled,
35337
35339
  onPaste: handlePaste
35338
35340
  }), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
35339
35341
  className: styles.inputMirror,
@@ -35633,7 +35635,6 @@ Tag.Input = tag_input;
35633
35635
 
35634
35636
 
35635
35637
 
35636
-
35637
35638
  function getResetMore(onFilter, container, doms) {
35638
35639
  if (!container || !doms || !doms.length) return -1;
35639
35640
  var items = Array.from(doms);
@@ -35723,14 +35724,26 @@ var More = function More(props) {
35723
35724
  });
35724
35725
  itemsLength = after.length;
35725
35726
  }
35726
- if (after && after.length > 0) {
35727
- after = external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.map(after, function (item) {
35728
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(item, objectSpread2_default()(objectSpread2_default()({}, item.props), {}, {
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,
35729
35733
  style: {
35730
- opcacity: 1
35731
- }
35732
- }));
35733
- }) || after;
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
+ });
35734
35747
  }
35735
35748
  return /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
35736
35749
  children: [shouldShowMore ? data : before, /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
@@ -35885,7 +35898,8 @@ var result_Result = function Result(props) {
35885
35898
  convertBr: convertBr,
35886
35899
  onInputBlur: onInputBlur,
35887
35900
  onClearCreatedData: onClearCreatedData,
35888
- placeholder: placeholder2
35901
+ placeholder: placeholder2,
35902
+ disabled: isFunc(disabled) ? false : !!disabled
35889
35903
  })
35890
35904
  }, 'input');
35891
35905
  };
@@ -39991,7 +40005,8 @@ var TimeScroll = function TimeScroll(props) {
39991
40005
  var elRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
39992
40006
  var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
39993
40007
  timer: null,
39994
- changeTimer: null
40008
+ changeTimer: null,
40009
+ controlScroll: false
39995
40010
  }),
39996
40011
  context = _useRef.current;
39997
40012
  var _useResize = useResize({
@@ -40004,11 +40019,12 @@ var TimeScroll = function TimeScroll(props) {
40004
40019
  var el = elRef.current;
40005
40020
  if (!el) return;
40006
40021
  var lineHeight = el.childNodes[0].clientHeight;
40022
+ context.controlScroll = true;
40007
40023
  el.scrollTop = lineHeight * index;
40008
40024
  }, immudiate ? 0 : 30);
40009
40025
  };
40010
40026
  var changeToIndex = function changeToIndex(index) {
40011
- if (!times[index] || times[index].disabled || index === currentIndex) {
40027
+ if (!times[index] || times[index].disabled || index === currentIndex && !props.isEmpty) {
40012
40028
  return;
40013
40029
  }
40014
40030
  onChange(times[index].date);
@@ -40016,6 +40032,10 @@ var TimeScroll = function TimeScroll(props) {
40016
40032
  var handleScroll = function handleScroll(e) {
40017
40033
  if (context.changeTimer) clearTimeout(context.changeTimer);
40018
40034
  var el = e.currentTarget;
40035
+ if (context.controlScroll) {
40036
+ context.controlScroll = false;
40037
+ return;
40038
+ }
40019
40039
  context.changeTimer = setTimeout(function () {
40020
40040
  if (!el) return;
40021
40041
  var lineHeight = el.childNodes[0].clientHeight;
@@ -40116,6 +40136,7 @@ var Time = function Time(props) {
40116
40136
  jssStyle: props.jssStyle,
40117
40137
  times: item.times,
40118
40138
  currentIndex: item.currentIndex,
40139
+ isEmpty: props.value === null || props.value === undefined,
40119
40140
  onChange: func.handleChange
40120
40141
  }, item.mode);
40121
40142
  })
@@ -42353,10 +42374,9 @@ var Modal = function Modal(props) {
42353
42374
  return function () {
42354
42375
  var _props$shouldDestroy2;
42355
42376
  (_props$shouldDestroy2 = props.shouldDestroy) === null || _props$shouldDestroy2 === void 0 || _props$shouldDestroy2.call(props, true);
42356
- if (props.autoShow) {
42357
- var _props$onClose2;
42358
- (_props$onClose2 = props.onClose) === null || _props$onClose2 === void 0 || _props$onClose2.call(props);
42359
- }
42377
+ // if (props.autoShow) {
42378
+ // props.onClose?.();
42379
+ // }
42360
42380
  if (context.isMask) {
42361
42381
  context.isMask = false;
42362
42382
  hasMask = false;
@@ -44244,6 +44264,13 @@ var useForm = function useForm(props) {
44244
44264
  size: size
44245
44265
  };
44246
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();
44247
44274
  external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
44248
44275
  // 服务端错误更新
44249
44276
  if (!props.error) context.serverErrors = {};else {
@@ -44260,8 +44287,8 @@ var useForm = function useForm(props) {
44260
44287
  // 默认值更新
44261
44288
  external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
44262
44289
  context.removeLock = false;
44263
- if (props.value === context.lastValue) return;
44264
- context.value = deepClone(props.value) || emptyObj;
44290
+ // 内部 onChange 改的 value, 不需要更新
44291
+ if (props.value === context.value) return;
44265
44292
  if (initValidate && !context.resetTime) {
44266
44293
  var keys = Object.keys(context.validateMap).filter(function (key) {
44267
44294
  var oldValue = deepGet(context.lastValue || emptyObj, key);
@@ -62373,7 +62400,7 @@ var upload_interface = __webpack_require__(4412);
62373
62400
 
62374
62401
 
62375
62402
  /* harmony default export */ var src_0 = ({
62376
- version: '3.1.25'
62403
+ version: '3.1.27'
62377
62404
  });
62378
62405
  }();
62379
62406
  /******/ return __webpack_exports__;