Comparing version 4.0.4 to 4.1.0
@@ -6,3 +6,3 @@ export function hasClass(node, className) { | ||
var originClass = node.className; | ||
return originClass.indexOf(className) > -1; | ||
return (' ' + originClass + ' ').indexOf(' ' + className + ' ') > -1; | ||
} | ||
@@ -26,5 +26,5 @@ | ||
var originClass = node.className; | ||
node.className = originClass.replace(className, ''); | ||
node.className = (' ' + originClass + ' ').replace(' ' + className + ' ', ''); | ||
} | ||
} | ||
} |
@@ -14,3 +14,3 @@ 'use strict'; | ||
var originClass = node.className; | ||
return originClass.indexOf(className) > -1; | ||
return (' ' + originClass + ' ').indexOf(' ' + className + ' ') > -1; | ||
} | ||
@@ -34,5 +34,5 @@ | ||
var originClass = node.className; | ||
node.className = originClass.replace(className, ''); | ||
node.className = (' ' + originClass + ' ').replace(' ' + className + ' ', ''); | ||
} | ||
} | ||
} |
{ | ||
"name": "rc-util", | ||
"version": "4.0.4", | ||
"version": "4.1.0", | ||
"description": "Common Utils For React Component", | ||
@@ -56,4 +56,5 @@ "keywords": [ | ||
"babel-runtime": "6.x", | ||
"prop-types": "^15.5.10", | ||
"shallowequal": "^0.2.2" | ||
} | ||
} |
@@ -69,2 +69,18 @@ # rc-util | ||
### Portal | ||
Render children to the specific container; | ||
```jsx | ||
import Portal from 'rc-util/lib/Portal'; | ||
``` | ||
Props: | ||
| Prop | Type | Description | Default | | ||
|-------|------|-------------|---------| | ||
| children | ReactChildren | Content render to the container | - | | ||
| getContaienr | (): HTMLElement | A function to get the container | - | | ||
### getScrollBarSize | ||
@@ -71,0 +87,0 @@ |
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
63379
43
2155
261
4
+ Addedprop-types@^15.5.10
+ Addedjs-tokens@4.0.0(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addedprop-types@15.8.1(transitive)
+ Addedreact-is@16.13.1(transitive)