wargerm 0.4.18 → 0.4.19
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/dist/index.esm.js +8 -4
- package/dist/index.js +8 -4
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -9639,8 +9639,7 @@ var controlShow = function controlShow(f1, f2, value, timer) {
|
|
9639
9639
|
};
|
9640
9640
|
|
9641
9641
|
function DialogModel(props, ref) {
|
9642
|
-
var
|
9643
|
-
width = _props$width === void 0 ? 600 : _props$width,
|
9642
|
+
var width = props.width,
|
9644
9643
|
visible = props.visible,
|
9645
9644
|
destroyOnClose = props.destroyOnClose,
|
9646
9645
|
closeCb = props.closeCb,
|
@@ -9702,8 +9701,7 @@ function DialogModel(props, ref) {
|
|
9702
9701
|
className: classnames((_classNames = {}, _defineProperty(_classNames, className, true), _defineProperty(_classNames, 'model_container', true), _defineProperty(_classNames, "animate__animated", true), _defineProperty(_classNames, flag ? 'animate__bounceInDown' : 'animate__fadeOutRightBig', true), _classNames)),
|
9703
9702
|
style: _objectSpread2({
|
9704
9703
|
opacity: modelShowAync ? 1 : 0,
|
9705
|
-
width: typeof width == 'number' ? width + 'px' : width
|
9706
|
-
left: "calc(50% - ".concat(typeof width == 'number' ? width / 2 : width / 2, "px)")
|
9704
|
+
width: typeof width == 'number' ? width + 'px' : width
|
9707
9705
|
}, style)
|
9708
9706
|
}, /*#__PURE__*/React.createElement("div", {
|
9709
9707
|
className: 'model_wrap'
|
@@ -9732,6 +9730,12 @@ function DialogModel(props, ref) {
|
|
9732
9730
|
}
|
9733
9731
|
})), document.body);
|
9734
9732
|
}, [modelShowAync, modelShow, props, isDesChild]);
|
9733
|
+
useEffect(function () {
|
9734
|
+
var containerEl = containerRef.current;
|
9735
|
+
var containerElWidth = containerEl.offsetWidth;
|
9736
|
+
console.log(containerElWidth);
|
9737
|
+
containerEl.style.left = "calc(50% - ".concat(containerElWidth / 2, "px)");
|
9738
|
+
}, [modelShow]);
|
9735
9739
|
useEffect(function () {
|
9736
9740
|
var containerEl = containerRef.current;
|
9737
9741
|
var rEl = rRef.current;
|
package/dist/index.js
CHANGED
@@ -9677,8 +9677,7 @@ var controlShow = function controlShow(f1, f2, value, timer) {
|
|
9677
9677
|
};
|
9678
9678
|
|
9679
9679
|
function DialogModel(props, ref) {
|
9680
|
-
var
|
9681
|
-
width = _props$width === void 0 ? 600 : _props$width,
|
9680
|
+
var width = props.width,
|
9682
9681
|
visible = props.visible,
|
9683
9682
|
destroyOnClose = props.destroyOnClose,
|
9684
9683
|
closeCb = props.closeCb,
|
@@ -9740,8 +9739,7 @@ function DialogModel(props, ref) {
|
|
9740
9739
|
className: classnames__default['default']((_classNames = {}, _defineProperty(_classNames, className, true), _defineProperty(_classNames, 'model_container', true), _defineProperty(_classNames, "animate__animated", true), _defineProperty(_classNames, flag ? 'animate__bounceInDown' : 'animate__fadeOutRightBig', true), _classNames)),
|
9741
9740
|
style: _objectSpread2({
|
9742
9741
|
opacity: modelShowAync ? 1 : 0,
|
9743
|
-
width: typeof width == 'number' ? width + 'px' : width
|
9744
|
-
left: "calc(50% - ".concat(typeof width == 'number' ? width / 2 : width / 2, "px)")
|
9742
|
+
width: typeof width == 'number' ? width + 'px' : width
|
9745
9743
|
}, style)
|
9746
9744
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
9747
9745
|
className: 'model_wrap'
|
@@ -9770,6 +9768,12 @@ function DialogModel(props, ref) {
|
|
9770
9768
|
}
|
9771
9769
|
})), document.body);
|
9772
9770
|
}, [modelShowAync, modelShow, props, isDesChild]);
|
9771
|
+
React.useEffect(function () {
|
9772
|
+
var containerEl = containerRef.current;
|
9773
|
+
var containerElWidth = containerEl.offsetWidth;
|
9774
|
+
console.log(containerElWidth);
|
9775
|
+
containerEl.style.left = "calc(50% - ".concat(containerElWidth / 2, "px)");
|
9776
|
+
}, [modelShow]);
|
9773
9777
|
React.useEffect(function () {
|
9774
9778
|
var containerEl = containerRef.current;
|
9775
9779
|
var rEl = rRef.current;
|