UNPKG

@alicloud/console-components

Version:

Alibaba Cloud React Components

17 lines (16 loc) 688 B
import hoistNonReactStatics from 'hoist-non-react-statics'; var hoist = function (target, source, custom) { var result = hoistNonReactStatics(target, source, custom); /** * 兼容 fusion 的一些内置逻辑,例如: * Balloon 组件,仅在 displayName 为 Config(Button) 时设置属性 disabled 才不会影响 popup * https://github.com/alibaba-fusion/next/blob/84eb9767d644c7280c73deb2a3198c58a70d17ad/components/balloon/util.tsx#L6 */ // @ts-ignore if (source.displayName && target.displayName !== source.displayName) { // @ts-ignore result.displayName = source.displayName; } return result; }; export default hoist;