shineout 3.9.1-beta.6 → 3.9.1-beta.7
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 +1 -1
- package/dist/shineout.js +18 -13
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/index.js +1 -1
- package/package.json +5 -5
package/cjs/index.js
CHANGED
|
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
522
522
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
523
523
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
524
524
|
var _default = exports.default = {
|
|
525
|
-
version: '3.9.1-beta.
|
|
525
|
+
version: '3.9.1-beta.7'
|
|
526
526
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12400,7 +12400,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12400
12400
|
};
|
|
12401
12401
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12402
12402
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12403
|
-
/* harmony default export */ var version = ('3.9.1-beta.
|
|
12403
|
+
/* harmony default export */ var version = ('3.9.1-beta.7');
|
|
12404
12404
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12405
12405
|
|
|
12406
12406
|
|
|
@@ -50157,11 +50157,12 @@ var useModalConfig = function useModalConfig() {
|
|
|
50157
50157
|
var addModalInstance = function addModalInstance(instanceId) {
|
|
50158
50158
|
modal_content_state.mutate.instanceIds.push(instanceId);
|
|
50159
50159
|
};
|
|
50160
|
-
var addModalCascadeConfig = function addModalCascadeConfig(
|
|
50160
|
+
var addModalCascadeConfig = function addModalCascadeConfig(options) {
|
|
50161
50161
|
modal_content_state.mutate.cascadeConfigs.push({
|
|
50162
|
-
cascade:
|
|
50163
|
-
cascadeWidth:
|
|
50164
|
-
instanceId:
|
|
50162
|
+
cascade: options.cascade,
|
|
50163
|
+
cascadeWidth: options.cascadeWidth,
|
|
50164
|
+
instanceId: options.instanceId,
|
|
50165
|
+
position: options.position
|
|
50165
50166
|
});
|
|
50166
50167
|
};
|
|
50167
50168
|
var removeModalInstance = function removeModalInstance(instanceId) {
|
|
@@ -50264,6 +50265,7 @@ var Modal = function Modal(props) {
|
|
|
50264
50265
|
addModalInstance(context.instanceId);
|
|
50265
50266
|
addModalCascadeConfig({
|
|
50266
50267
|
instanceId: context.instanceId,
|
|
50268
|
+
position: props.position,
|
|
50267
50269
|
cascade: !!props.cascade && !!isPositionX,
|
|
50268
50270
|
cascadeWidth: typeof_default()(props.cascade) === 'object' ? props.cascade.width || 180 : 180
|
|
50269
50271
|
});
|
|
@@ -50272,7 +50274,7 @@ var Modal = function Modal(props) {
|
|
|
50272
50274
|
removeModalInstance(context.instanceId);
|
|
50273
50275
|
removeModalCascadeConfig(context.instanceId);
|
|
50274
50276
|
}
|
|
50275
|
-
}, [visible, animation, config.instanceIds]);
|
|
50277
|
+
}, [visible, props.position, animation, config.instanceIds]);
|
|
50276
50278
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(handleMaskVisible, [visible]);
|
|
50277
50279
|
var updateOrigin = function updateOrigin() {
|
|
50278
50280
|
// 更新transform-origin
|
|
@@ -50487,18 +50489,19 @@ var Modal = function Modal(props) {
|
|
|
50487
50489
|
})]
|
|
50488
50490
|
});
|
|
50489
50491
|
};
|
|
50490
|
-
if (!context.renderEd && !visible) return null;
|
|
50491
|
-
context.renderEd = true;
|
|
50492
50492
|
var cascadeStyle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
50493
50493
|
if (!props.cascade) return;
|
|
50494
|
-
var idx = config.instanceIds.findIndex(function (id) {
|
|
50495
|
-
return id === context.instanceId;
|
|
50496
|
-
});
|
|
50497
50494
|
var instance = 0;
|
|
50498
50495
|
var curCascadeConfig = config.cascadeConfigs.find(function (c) {
|
|
50499
50496
|
return c.instanceId === context.instanceId;
|
|
50500
50497
|
});
|
|
50501
|
-
|
|
50498
|
+
var samePositionConfigs = config.cascadeConfigs.filter(function (c) {
|
|
50499
|
+
return c.position === (curCascadeConfig === null || curCascadeConfig === void 0 ? void 0 : curCascadeConfig.position);
|
|
50500
|
+
});
|
|
50501
|
+
var currentIndex = samePositionConfigs.findIndex(function (c) {
|
|
50502
|
+
return c.instanceId === context.instanceId;
|
|
50503
|
+
});
|
|
50504
|
+
if (curCascadeConfig && currentIndex < samePositionConfigs.length - 1) {
|
|
50502
50505
|
instance = curCascadeConfig.cascadeWidth;
|
|
50503
50506
|
}
|
|
50504
50507
|
return {
|
|
@@ -50506,6 +50509,8 @@ var Modal = function Modal(props) {
|
|
|
50506
50509
|
transition: instance ? 'transform 0.3s ease 0.05s' : 'transform 0.2s ease'
|
|
50507
50510
|
};
|
|
50508
50511
|
}, [config.cascadeConfigs, config.instanceIds]);
|
|
50512
|
+
if (!context.renderEd && !visible) return null;
|
|
50513
|
+
context.renderEd = true;
|
|
50509
50514
|
var panelStyle = objectSpread2_default()(objectSpread2_default()({
|
|
50510
50515
|
transformOrigin: origin,
|
|
50511
50516
|
top: props.fullScreen ? undefined : top
|
|
@@ -74418,7 +74423,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
74418
74423
|
|
|
74419
74424
|
|
|
74420
74425
|
/* harmony default export */ var src_0 = ({
|
|
74421
|
-
version: '3.9.1-beta.
|
|
74426
|
+
version: '3.9.1-beta.7'
|
|
74422
74427
|
});
|
|
74423
74428
|
}();
|
|
74424
74429
|
/******/ return __webpack_exports__;
|