shineout 3.6.6-beta.6 → 3.6.6-fix.1

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.6-beta.6'
517
+ version: '3.6.6-fix.1'
518
518
  };
package/dist/shineout.js CHANGED
@@ -12217,7 +12217,7 @@ var handleStyle = function handleStyle(style) {
12217
12217
  };
12218
12218
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12219
12219
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12220
- /* harmony default export */ var version = ('3.6.6-beta.6');
12220
+ /* harmony default export */ var version = ('3.6.6-fix.1');
12221
12221
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12222
12222
 
12223
12223
 
@@ -34924,19 +34924,18 @@ function useInputAble(props) {
34924
34924
  var render = useRender(syncValue);
34925
34925
  var shouldUseState = delay || !control;
34926
34926
  var value = shouldUseState ? stateValue : valuePo;
34927
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
34928
- if (context.timer) {
34929
- clearTimeout(context.timer);
34930
- context.timer = null;
34931
- }
34927
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
34932
34928
  if (delay && control && props.value !== stateValue) {
34933
34929
  changeStateValue(props.value);
34930
+ } else if (context.timer) {
34931
+ clearTimeout(context.timer);
34932
+ context.timer = null;
34934
34933
  }
34935
34934
  }, [props.value, delay, control]);
34936
34935
  var forceDelayChange = use_persist_fn(function () {
34937
- if (context.timer && context.delayChange) {
34936
+ if (context.delayChange) context.delayChange();
34937
+ if (context.timer) {
34938
34938
  clearTimeout(context.timer);
34939
- context.delayChange();
34940
34939
  context.timer = null;
34941
34940
  context.delayChange = null;
34942
34941
  }
@@ -47557,7 +47556,8 @@ var Modal = function Modal(props) {
47557
47556
  renderEd: false,
47558
47557
  isMask: false,
47559
47558
  mouseDownTarget: null,
47560
- mouseUpTarget: null
47559
+ mouseUpTarget: null,
47560
+ content: null
47561
47561
  }),
47562
47562
  context = _useRef.current;
47563
47563
  var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(props.visible || props.autoShow),
@@ -47800,6 +47800,14 @@ var Modal = function Modal(props) {
47800
47800
  if (props.moveable && !props.fullScreen) {
47801
47801
  panelStyle.transform = "translate(".concat(moveInfo.pos.x, "px, ").concat(moveInfo.pos.y, "px)");
47802
47802
  }
47803
+ var renderContent = function renderContent() {
47804
+ if (!props.visible && context.content !== null) return context.content;
47805
+ return /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
47806
+ children: [renderHeader(), renderBody(), renderFooter(), renderResize()]
47807
+ });
47808
+ };
47809
+ var content = renderContent();
47810
+ context.content = content;
47803
47811
  return /*#__PURE__*/(0,jsx_runtime.jsx)(FormFooterProvider, {
47804
47812
  children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
47805
47813
  onClick: function onClick(e) {
@@ -47818,11 +47826,11 @@ var Modal = function Modal(props) {
47818
47826
  onMouseUp: handleMaskMouseUp,
47819
47827
  onClick: handleMaskClick,
47820
47828
  onAnimationStart: updateOrigin,
47821
- children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
47829
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
47822
47830
  ref: panelRef,
47823
47831
  className: classnames_default()(modalClasses === null || modalClasses === void 0 ? void 0 : modalClasses.panel, props.className),
47824
47832
  style: panelStyle,
47825
- children: [renderHeader(), renderBody(), renderFooter(), renderResize()]
47833
+ children: content
47826
47834
  })
47827
47835
  }))
47828
47836
  })
@@ -70073,7 +70081,7 @@ var upload_interface = __webpack_require__(8821);
70073
70081
 
70074
70082
 
70075
70083
  /* harmony default export */ var src_0 = ({
70076
- version: '3.6.6-beta.6'
70084
+ version: '3.6.6-fix.1'
70077
70085
  });
70078
70086
  }();
70079
70087
  /******/ return __webpack_exports__;