@alicloud/console-components
Version:
Alibaba Cloud React Components
22 lines (21 loc) • 950 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var hoist_non_react_statics_1 = __importDefault(require("hoist-non-react-statics"));
var hoist = function (target, source, custom) {
var result = (0, hoist_non_react_statics_1.default)(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;
};
exports.default = hoist;