rc-drawer
Advanced tools
Comparing version 4.2.0 to 4.2.1
@@ -9,6 +9,7 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _createSuper from "@babel/runtime/helpers/esm/createSuper"; | ||
import * as React from 'react'; | ||
import classnames from 'classnames'; | ||
import getScrollBarSize from "rc-util/es/getScrollBarSize"; | ||
import KeyCode from "rc-util/es/KeyCode"; | ||
import * as React from 'react'; | ||
import omit from 'omit.js'; | ||
import { addEventListener, dataToArray, getTouchParentScroll, isNumeric, removeEventListener, transformArguments, transitionEnd, transitionStr, windowIsUndefined } from './utils'; | ||
@@ -162,8 +163,6 @@ var currentDrawer = {}; | ||
var _this$props4 = _this.props, | ||
getOpenCount = _this$props4.getOpenCount, | ||
getContainer = _this$props4.getContainer, | ||
showMask = _this$props4.showMask, | ||
open = _this$props4.open; | ||
var container = getContainer && getContainer(); | ||
var openCount = getOpenCount && getOpenCount(); // 处理 body 滚动 | ||
var container = getContainer && getContainer(); // 处理 body 滚动 | ||
@@ -179,6 +178,2 @@ if (container && container.parentNode === document.body && showMask) { | ||
if (openCount === 1) { | ||
document.body.style.overflow = 'hidden'; | ||
} | ||
document.body.style.touchAction = 'none'; // 手机禁滚 | ||
@@ -194,7 +189,2 @@ | ||
} else if (_this.getCurrentDrawerSome()) { | ||
// 没有弹框的状态下清除 overflow; | ||
if (!openCount) { | ||
document.body.style.overflow = ''; | ||
} | ||
document.body.style.touchAction = ''; | ||
@@ -507,3 +497,3 @@ | ||
}); | ||
return /*#__PURE__*/React.createElement("div", _extends({}, props, { | ||
return /*#__PURE__*/React.createElement("div", _extends({}, omit(props, ['switchScrollingEffect']), { | ||
tabIndex: -1, | ||
@@ -510,0 +500,0 @@ className: wrapperClassName, |
@@ -40,3 +40,4 @@ import { GetContainer } from 'rc-util/lib/PortalWrapper'; | ||
scrollLocker?: ScrollLocker; | ||
switchScrollingEffect?: () => void; | ||
} | ||
export {}; |
@@ -28,2 +28,4 @@ "use strict"; | ||
var React = _interopRequireWildcard(require("react")); | ||
var _classnames2 = _interopRequireDefault(require("classnames")); | ||
@@ -35,3 +37,3 @@ | ||
var React = _interopRequireWildcard(require("react")); | ||
var _omit = _interopRequireDefault(require("omit.js")); | ||
@@ -186,8 +188,6 @@ var _utils = require("./utils"); | ||
var _this$props4 = _this.props, | ||
getOpenCount = _this$props4.getOpenCount, | ||
getContainer = _this$props4.getContainer, | ||
showMask = _this$props4.showMask, | ||
open = _this$props4.open; | ||
var container = getContainer && getContainer(); | ||
var openCount = getOpenCount && getOpenCount(); // 处理 body 滚动 | ||
var container = getContainer && getContainer(); // 处理 body 滚动 | ||
@@ -203,6 +203,2 @@ if (container && container.parentNode === document.body && showMask) { | ||
if (openCount === 1) { | ||
document.body.style.overflow = 'hidden'; | ||
} | ||
document.body.style.touchAction = 'none'; // 手机禁滚 | ||
@@ -218,7 +214,2 @@ | ||
} else if (_this.getCurrentDrawerSome()) { | ||
// 没有弹框的状态下清除 overflow; | ||
if (!openCount) { | ||
document.body.style.overflow = ''; | ||
} | ||
document.body.style.touchAction = ''; | ||
@@ -530,3 +521,3 @@ | ||
}); | ||
return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({}, props, { | ||
return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({}, (0, _omit.default)(props, ['switchScrollingEffect']), { | ||
tabIndex: -1, | ||
@@ -533,0 +524,0 @@ className: wrapperClassName, |
@@ -40,3 +40,4 @@ import { GetContainer } from 'rc-util/lib/PortalWrapper'; | ||
scrollLocker?: ScrollLocker; | ||
switchScrollingEffect?: () => void; | ||
} | ||
export {}; |
{ | ||
"name": "rc-drawer", | ||
"version": "4.2.0", | ||
"version": "4.2.1", | ||
"description": "drawer component for react", | ||
@@ -74,4 +74,5 @@ "keywords": [ | ||
"classnames": "^2.2.6", | ||
"omit.js": "^2.0.2", | ||
"rc-util": "^5.6.2" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
79594
6
1872
+ Addedomit.js@^2.0.2
+ Addedomit.js@2.0.2(transitive)