2022-01-21 14:40:00 +08:00
|
|
|
/*
|
|
|
|
|
* @Author: chenxuan
|
|
|
|
|
* @Date: 2021-11-22 12:52:57
|
|
|
|
|
* @LastEditTime: 2022-01-19 15:29:29
|
|
|
|
|
* @LastEditors: chenxuan
|
|
|
|
|
*/
|
2020-12-27 23:45:31 +08:00
|
|
|
import React from "react";
|
|
|
|
|
export default function Hoc(WithComponent, title) {
|
|
|
|
|
return class HocCpmponent extends React.Component {
|
|
|
|
|
render() {
|
|
|
|
|
return (
|
|
|
|
|
<React.Fragment>
|
2024-04-12 14:20:25 +08:00
|
|
|
<h1>{title}</h1>
|
2020-12-27 23:45:31 +08:00
|
|
|
<WithComponent
|
2022-01-21 14:40:00 +08:00
|
|
|
title="title-呵呵呵呵呵呵呵呵!"
|
|
|
|
|
name="name-陈轩陈轩!"
|
2020-12-27 23:45:31 +08:00
|
|
|
></WithComponent>
|
|
|
|
|
</React.Fragment>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|