qt-public-ui
Version:
新设计规范下业务组件库
15 lines • 422 B
JavaScript
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';
export default Loop;