马老师DDD+SOA的事件驱动微服务读写分离架构
// 获取 props children
const childrenLength = arguments.length - 2;
if(childrenLength === 1) {
props.children = children;
} else if(childrenLength > 1) {
const childArray = Array(childrenLength); // 如果多个元素,置为数组
for(let i = 0; i < childrenLength; i++) {
childArray[i] = arguments[i+2];
}
props.children = childArray;
}