import React, { Component } from "react" export const pageList: any[] = [] export default function (options: any) { return (WrappedComponent: any) => { const { path, // 页面路径 } = options class HOC extends React.Component { constructor(props: any) { super(props) } componentDidMount() {} componentWillUnmount() {} render() { return } } pageList.push([{ ...options, Component: HOC }]) return HOC } }