qt-public-ui
Version:
新设计规范下业务组件库
21 lines (20 loc) • 552 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var Loop = function Loop(props) {
var children = props.children,
_props$data = props.data,
data = _props$data === void 0 ? [] : _props$data;
if (data.length) {
return data.map(function (datum, index) {
return typeof children === 'function' ? children(datum, index) : children;
});
} else if (children) {
return children;
}
return null;
};
Loop.displayName = 'Loop';
var _default = exports["default"] = Loop;