first commit

This commit is contained in:
rayd1o
2026-03-05 11:46:58 +08:00
commit e7033775d8
20657 changed files with 1988940 additions and 0 deletions

19
frontend/node_modules/rc-util/es/Children/toArray.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
import isFragment from "../React/isFragment";
import React from 'react';
export default function toArray(children) {
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var ret = [];
React.Children.forEach(children, function (child) {
if ((child === undefined || child === null) && !option.keepEmpty) {
return;
}
if (Array.isArray(child)) {
ret = ret.concat(toArray(child));
} else if (isFragment(child) && child.props) {
ret = ret.concat(toArray(child.props.children, option));
} else {
ret.push(child);
}
});
return ret;
}