Skip to content

Commit

Permalink
Merge pull request #16 from CJY0208/develop
Browse files Browse the repository at this point in the history
增加 wrapper 外层类名,以实现样式控制
  • Loading branch information
CJY0208 authored Dec 6, 2019
2 parents 88a52e9 + ecf8671 commit af8d3c2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-activation",
"version": "0.3.3",
"version": "0.3.4",
"description": "<KeepAlive /> for React like <keep-alive /> in vue",
"main": "index.js",
"scripts": {
Expand Down
5 changes: 3 additions & 2 deletions src/core/KeepAlive.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ class KeepAlive extends Component {
return (
<div
key="keep-alive-placeholder"
className="ka-wrapper"
ref={node => {
this.placeholder = node
}}
Expand All @@ -266,8 +267,8 @@ class KeepAlive extends Component {
// 兼容 SSR 服务端渲染
function SSRKeepAlive({ children }) {
return (
<div key="keep-alive-placeholder">
<div key="keeper-container">{children}</div>
<div key="keep-alive-placeholder" className="ka-wrapper">
<div key="keeper-container" className="ka-content">{children}</div>
</div>
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/Keeper.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default class Keeper extends Component {
this.wrapper = node
}}
>
<div key="keeper-container">
<div key="keeper-container" className="ka-content">
<Bridge id={id} bridgeProps={bridgeProps}>
<AliveNodeProvider value={this.contextValue}>
{children}
Expand Down

0 comments on commit af8d3c2

Please sign in to comment.