import { useModel } from 'umi'; export function connectModel(key, name) { return function (WrappedComponent) { return function (props) { const model = useModel(name); const data = { [key]: model }; return ; }; }; }