Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

杨成 / insu-core-sys

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • insu-core-sys
  • src
  • components
  • Common
  • PermBtn
  • index.js
  • 杨成's avatar
    创建文件 · 758b333a
    杨成 committed Dec 27, 2019
    758b333a Browse Files
index.js 371 Bytes
RawBlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
import React from 'react'

export default (title) => (WrappedComponent) => class HOC extends React.Component {
  render() {
    const newProps = {
      test: 'hoc'
    }
    return <div>
      <div className="demo-header">
        {title
          ? title
          : '我是标题'}
      </div>
      <WrappedComponent {...this.props} {...newProps} />
    </div>
  }
}