Browse Source

fix: some props error

pull/1731/head
tangjinzhou 5 years ago
parent
commit
dc454ff943
  1. 2
      components/_util/proxyComponent.jsx

2
components/_util/proxyComponent.jsx

@ -9,7 +9,7 @@ export default function wrapWithConnect(WrappedComponent) {
const methods = WrappedComponent.methods || {}; const methods = WrappedComponent.methods || {};
const props = {}; const props = {};
Object.keys(tempProps).forEach(k => { Object.keys(tempProps).forEach(k => {
props[k] = { ...k, required: false }; props[k] = { ...tempProps[k], required: false };
}); });
WrappedComponent.props.__propsSymbol__ = PropTypes.any; WrappedComponent.props.__propsSymbol__ = PropTypes.any;
WrappedComponent.props.children = PropTypes.array.def([]); WrappedComponent.props.children = PropTypes.array.def([]);

Loading…
Cancel
Save