rc-drawer
Advanced tools
Comparing version 2.0.0-beta.3 to 2.0.0
@@ -23,3 +23,2 @@ import * as React from 'react'; | ||
private passive; | ||
private isTransition; | ||
private startPos; | ||
@@ -38,5 +37,3 @@ constructor(props: IDrawerChildProps); | ||
private setLevelDomTransform; | ||
private toggleDrawerAndBody; | ||
private openDrawer; | ||
private closeDrawer; | ||
private toggleScrollingToDrawerAndBody; | ||
private addScrollingEffect; | ||
@@ -43,0 +40,0 @@ private remScrollingEffect; |
@@ -164,3 +164,3 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
_this.toggleDrawerAndBody(right); | ||
_this.toggleScrollingToDrawerAndBody(right); | ||
} | ||
@@ -173,3 +173,3 @@ | ||
_this.toggleDrawerAndBody = function (right) { | ||
_this.toggleScrollingToDrawerAndBody = function (right) { | ||
var _this$props4 = _this.props, | ||
@@ -189,5 +189,3 @@ getOpenCount = _this$props4.getOpenCount, | ||
if (right) { | ||
_this.addScrollingEffect(); | ||
_this.openDrawer(right); | ||
_this.addScrollingEffect(right); | ||
} | ||
@@ -217,5 +215,3 @@ | ||
if (right) { | ||
_this.remScrollingEffect(); | ||
_this.closeDrawer(right); | ||
_this.remScrollingEffect(right); | ||
} // 恢复事件 | ||
@@ -235,7 +231,14 @@ | ||
_this.openDrawer = function (right) { | ||
_this.addScrollingEffect = function (right) { | ||
var _this$props5 = _this.props, | ||
placement = _this$props5.placement, | ||
duration = _this$props5.duration, | ||
ease = _this$props5.ease; | ||
ease = _this$props5.ease, | ||
getOpenCount = _this$props5.getOpenCount; | ||
var openCount = getOpenCount && getOpenCount(); | ||
if (openCount === 1) { | ||
switchScrollingEffect(); | ||
} | ||
var widthTransition = "width ".concat(duration, " ").concat(ease); | ||
@@ -270,8 +273,14 @@ var transformTransition = "transform ".concat(duration, " ").concat(ease); | ||
_this.closeDrawer = function (right) { | ||
_this.remScrollingEffect = function (right) { | ||
var _this$props6 = _this.props, | ||
placement = _this$props6.placement, | ||
duration = _this$props6.duration, | ||
ease = _this$props6.ease; | ||
ease = _this$props6.ease, | ||
getOpenCount = _this$props6.getOpenCount; | ||
var openCount = getOpenCount && getOpenCount(); | ||
if (!openCount) { | ||
switchScrollingEffect(true); | ||
} | ||
if (transitionStr) { | ||
@@ -326,20 +335,2 @@ document.body.style.overflowX = 'hidden'; | ||
_this.addScrollingEffect = function () { | ||
var getOpenCount = _this.props.getOpenCount; | ||
var openCount = getOpenCount && getOpenCount(); | ||
if (openCount === 1) { | ||
switchScrollingEffect(); | ||
} | ||
}; | ||
_this.remScrollingEffect = function () { | ||
var getOpenCount = _this.props.getOpenCount; | ||
var openCount = getOpenCount && getOpenCount(); | ||
if (!openCount) { | ||
switchScrollingEffect(true); | ||
} | ||
}; | ||
_this.getCurrentDrawerSome = function () { | ||
@@ -346,0 +337,0 @@ return !Object.keys(currentDrawer).some(function (key) { |
@@ -34,3 +34,2 @@ import * as React from 'react'; | ||
constructor(props: IDrawerProps); | ||
componentWillUnmount(): void; | ||
private onHandleClick; | ||
@@ -37,0 +36,0 @@ private onClose; |
@@ -87,9 +87,4 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
_createClass(DrawerWrapper, [{ | ||
key: "componentWillUnmount", | ||
value: function componentWillUnmount() { | ||
console.log('wrapper'); | ||
} // tslint:disable-next-line:member-ordering | ||
}, { | ||
key: "render", | ||
// tslint:disable-next-line:member-ordering | ||
value: function render() { | ||
@@ -96,0 +91,0 @@ var _this2 = this; |
@@ -23,3 +23,2 @@ import * as React from 'react'; | ||
private passive; | ||
private isTransition; | ||
private startPos; | ||
@@ -38,5 +37,3 @@ constructor(props: IDrawerChildProps); | ||
private setLevelDomTransform; | ||
private toggleDrawerAndBody; | ||
private openDrawer; | ||
private closeDrawer; | ||
private toggleScrollingToDrawerAndBody; | ||
private addScrollingEffect; | ||
@@ -43,0 +40,0 @@ private remScrollingEffect; |
@@ -182,3 +182,3 @@ "use strict"; | ||
_this.toggleDrawerAndBody(right); | ||
_this.toggleScrollingToDrawerAndBody(right); | ||
} | ||
@@ -191,3 +191,3 @@ | ||
_this.toggleDrawerAndBody = function (right) { | ||
_this.toggleScrollingToDrawerAndBody = function (right) { | ||
var _this$props4 = _this.props, | ||
@@ -207,5 +207,3 @@ getOpenCount = _this$props4.getOpenCount, | ||
if (right) { | ||
_this.addScrollingEffect(); | ||
_this.openDrawer(right); | ||
_this.addScrollingEffect(right); | ||
} | ||
@@ -235,5 +233,3 @@ | ||
if (right) { | ||
_this.remScrollingEffect(); | ||
_this.closeDrawer(right); | ||
_this.remScrollingEffect(right); | ||
} // 恢复事件 | ||
@@ -253,7 +249,14 @@ | ||
_this.openDrawer = function (right) { | ||
_this.addScrollingEffect = function (right) { | ||
var _this$props5 = _this.props, | ||
placement = _this$props5.placement, | ||
duration = _this$props5.duration, | ||
ease = _this$props5.ease; | ||
ease = _this$props5.ease, | ||
getOpenCount = _this$props5.getOpenCount; | ||
var openCount = getOpenCount && getOpenCount(); | ||
if (openCount === 1) { | ||
(0, _switchScrollingEffect.default)(); | ||
} | ||
var widthTransition = "width ".concat(duration, " ").concat(ease); | ||
@@ -288,8 +291,14 @@ var transformTransition = "transform ".concat(duration, " ").concat(ease); | ||
_this.closeDrawer = function (right) { | ||
_this.remScrollingEffect = function (right) { | ||
var _this$props6 = _this.props, | ||
placement = _this$props6.placement, | ||
duration = _this$props6.duration, | ||
ease = _this$props6.ease; | ||
ease = _this$props6.ease, | ||
getOpenCount = _this$props6.getOpenCount; | ||
var openCount = getOpenCount && getOpenCount(); | ||
if (!openCount) { | ||
(0, _switchScrollingEffect.default)(true); | ||
} | ||
if (_utils.transitionStr) { | ||
@@ -344,20 +353,2 @@ document.body.style.overflowX = 'hidden'; | ||
_this.addScrollingEffect = function () { | ||
var getOpenCount = _this.props.getOpenCount; | ||
var openCount = getOpenCount && getOpenCount(); | ||
if (openCount === 1) { | ||
(0, _switchScrollingEffect.default)(); | ||
} | ||
}; | ||
_this.remScrollingEffect = function () { | ||
var getOpenCount = _this.props.getOpenCount; | ||
var openCount = getOpenCount && getOpenCount(); | ||
if (!openCount) { | ||
(0, _switchScrollingEffect.default)(true); | ||
} | ||
}; | ||
_this.getCurrentDrawerSome = function () { | ||
@@ -364,0 +355,0 @@ return !Object.keys(currentDrawer).some(function (key) { |
@@ -34,3 +34,2 @@ import * as React from 'react'; | ||
constructor(props: IDrawerProps); | ||
componentWillUnmount(): void; | ||
private onHandleClick; | ||
@@ -37,0 +36,0 @@ private onClose; |
@@ -101,9 +101,4 @@ "use strict"; | ||
_createClass(DrawerWrapper, [{ | ||
key: "componentWillUnmount", | ||
value: function componentWillUnmount() { | ||
console.log('wrapper'); | ||
} // tslint:disable-next-line:member-ordering | ||
}, { | ||
key: "render", | ||
// tslint:disable-next-line:member-ordering | ||
value: function render() { | ||
@@ -110,0 +105,0 @@ var _this2 = this; |
{ | ||
"name": "rc-drawer", | ||
"version": "2.0.0-beta.3", | ||
"version": "2.0.0", | ||
"description": "drawer component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
90040
1959